set default nice values for different users

set default nice values for different users

Post by Ibrahi » Thu, 10 Oct 2002 16:29:57



Hi everyone,

We have few Sun workstations here and each is assigned to 1 user.

I need to set a lower priority to all other processes which does not
belong to the user.

For eg, user A is assigned to SunA workstation and user B is assigned to
SunB workstation.
If user B runs any process on SunA, then his processes must be set to a
lower priority automatically.

I do not want to use renice command to lower the priority every time a
user complains.

Any ideas or suggestions pls!!??

Thanx in advance

 
 
 

set default nice values for different users

Post by John » Thu, 10 Oct 2002 18:37:25



Quote:> Hi everyone,

> We have few Sun workstations here and each is assigned to 1 user.

> I need to set a lower priority to all other processes which does not
> belong to the user.

> For eg, user A is assigned to SunA workstation and user B is assigned to
> SunB workstation.
> If user B runs any process on SunA, then his processes must be set to a
> lower priority automatically.

> I do not want to use renice command to lower the priority every time a
> user complains.

Nothing clever leaps to mind, so why not have cron run a script
which renices anything run by "wrong" users (apart from system
users (whose UIDs are < 100 iirc)).

John.

 
 
 

set default nice values for different users

Post by Richard L. Hamilt » Thu, 10 Oct 2002 21:12:18






>> Hi everyone,

>> We have few Sun workstations here and each is assigned to 1 user.

>> I need to set a lower priority to all other processes which does not
>> belong to the user.

>> For eg, user A is assigned to SunA workstation and user B is assigned to
>> SunB workstation.
>> If user B runs any process on SunA, then his processes must be set to a
>> lower priority automatically.

>> I do not want to use renice command to lower the priority every time a
>> user complains.

> Nothing clever leaps to mind, so why not have cron run a script
> which renices anything run by "wrong" users (apart from system
> users (whose UIDs are < 100 iirc)).

Might be able to get the Linux pam_limits module to work; it allows
setting resource limits and priority on a per-user, per-system basis.
Warning: it has had some bugs in the past; I haven't read enough to
know whether all the known ones have been fixed yet.

--

 
 
 

set default nice values for different users

Post by Richard L. Hamilt » Fri, 11 Oct 2002 20:58:06








>>> Hi everyone,

>>> We have few Sun workstations here and each is assigned to 1 user.

>>> I need to set a lower priority to all other processes which does not
>>> belong to the user.

>>> For eg, user A is assigned to SunA workstation and user B is assigned to
>>> SunB workstation.
>>> If user B runs any process on SunA, then his processes must be set to a
>>> lower priority automatically.

>>> I do not want to use renice command to lower the priority every time a
>>> user complains.

>> Nothing clever leaps to mind, so why not have cron run a script
>> which renices anything run by "wrong" users (apart from system
>> users (whose UIDs are < 100 iirc)).

> Might be able to get the Linux pam_limits module to work; it allows
> setting resource limits and priority on a per-user, per-system basis.
> Warning: it has had some bugs in the past; I haven't read enough to
> know whether all the known ones have been fixed yet.

FYI, pam_limits as is doesn't compile on Solaris, but it doesn't take
much to make it happen; I sent the originator a patch.  Some of the
rlimits on Linux don't exist on Solaris, but priority and other non-rlimit
stuff, as well as rlimits present on Solaris, should be ok, although I've
only tried priority. core file limits, and limits on maximum login sessions
per user so far.

--

 
 
 

set default nice values for different users

Post by Jeremiah DeWitt Weine » Sun, 13 Oct 2002 04:44:27



> For eg, user A is assigned to SunA workstation and user B is assigned to
> SunB workstation.
> If user B runs any process on SunA, then his processes must be set to a
> lower priority automatically.

        If renicing user B's shell is acceptable (and I don't see why it
wouldn't be), you could put some logic in /etc/profile that says

if [ $USER != $primary_user ] ; then
        renice $$
fi

        Any processes forked from the shell will inherit its niceness.
Modify as appropriate for your environment.

--
If mail to me bounces, try removing the "+STRING" part of the address.

 
 
 

1. How to set default nice value?

Hello,
could anybody please give me a hint.
I want to set up the system init file for a given shell  like
/etc/cshrc or /etc/profile or /etc/zshenv
such that for all/some users (using the corresponding shell) their shell and
all processes started by their shell run at a given "nice value".
The idea is e.g. that a remote user has lower priority than some local users.

Thanks for any hints,
Helmut Jarausch.

2. I can't run setup from anything but the boot floppies

3. Setting different timeout values at different times of the day

4. MX record problem

5. nice values for different groups (suggestions wanted)

6. multicast problem

7. Apache: different default locations for different users?

8. Good Linux handbook to get newbie started w/LinuxPPC?

9. Default nice values

10. Nice. Nice nice nice.

11. Setting ulimit/umask/nice value in /etc/passwd entry?

12. Touchpad configuration, setting buttons to different values.

13. Setting the default white pixel value for XF86?????