next up previous contents
Next: tar Up: Helpful Unix Commands Previous: cancel   Contents

nice/renice

A command's nice value represents how much priority it has with cpu time. Commands can be run with nice values between 0 and 39 with 0 being the highest priority and 39 the least. You can increment or decrement this value using -n $ <$value$ >$. The value used with this flag can either be positive or negative. A negative value would decrease the process' nice value, thereby increasing its priority, while a positive value would do the opposite. The command renice can be used the change the nice value of a command while it is running. Again you use the increment flag and instead of the command name you use the process id.

lightning:~>nice -n 5 top

For example, if top usually ran with a nice value of 15, this would change it to run with a nice value of 20. It would then have a lower priority.

lightning:~>renice -n 10 2956

The process 2956 would be have a nice value 10 higher than it had previously, giving it lower priority.



Computer Support Group 2002-10-07