Friday, August 22, 2008

Giving Maximum processing time to any process

To give maximum processing time to any process, first the PID of the process has to be determined using the command ps. Say you have firefox running and you want to determine its PID.
$ ps -A | grep firefox

on my system gives the following output
12845 pts/0 00:04:00 firefox

so 12845 is the required PID.
By issuing the following command we can give maximum priority (-20) to the particular process -
$ sudo renice -20 12845
This can be ascertained using the 'top' command.

No comments: