Discussion Locked

NICE a shell script.

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an application where users(non-root) select a menu item that executes a shell script. What command do I place in the shell script to nice/renice it so it runs at max priority? The shell script isn't owned by root.

5 replies

by murpe

If you have 'top' running on your system, the user can alter ONLY his/her processes to run at a higher priority. There is one limitation, though. You cannot re-nice a process to a negative level (ie. -5, -10) as those are root-based only since it can affect performance and kernel issues.

-- M

by murpe

As a follow-up, here is a piece of information about renice-ing processes:

renice -18 PID

(as root) Change the priority of a running process to minus 18. Normal users can only adjust processes they own, and only up from the current value (make them run slower). One could also renice +10 -u peter to make user peter use fewer cpu clicks so that other user don't suffer when he runs his computing intensive tasks.

-- M

This discussion is closed to new replies.