Gracefully logging off another user.
kassube at gmx.net
Wed Nov 12 10:21:27 GMT 2008
Colin Murphy wrote:
> renice and suspend sound like options, better to leave the application
> ticking over rather than killing it if at all possible. I know very
> little about renice and suspend though. How would the owner of a
> process de-renice an app, or would this happen automatically when they
> next make use of it?
If you want to go the renice way, only root can renice processes to give
them a higher priority. Therefore the other users can't do it themselves
unless they are in the admin group. You can renice their processes with
sudo renice 19 -u user
in a terminal where you replace "user" with the appropriate user name.
That will give the processes lowest priority. With the command
sudo renice 0 -u user
you can undo the previous command. It isn't perfect because all those
processes will have a "nice value" of 0 (the default value) afterwards
even if the other user had intentionally reniced some processes to lower
priority. If you forget to give the other users normal priority they can
still work with the lower priority but it may be a bit slow. However they
can logout and login again to get normal priority.
With the suspend way it would be the command
sudo pkill -STOP -u user
to stop the processes of that user. With the command
sudo pkill -CONT -u user
the processes will continue. However if you forget the last command the
other user can't do anything, not even logout and login again because
_all_ his processes are suspended.
Finally a thought about your original problem of users with high resource
use. Could it be that they have no programs running except the screen
saver? Some screen savers are real resource hogs (and cost real money).
Check with the "top -i" command which program uses all the CPU cycles. If
it really is the screen saver, ask the other users to select another one,
preferrably the blank screen.
More information about the ubuntu-users