Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
help:general_linux:priority [2016/05/18 14:07]
jebailie [System Priorities]
help:general_linux:priority [2017/12/30 20:54] (current)
mlsmith [NICE & RENICE]
Line 14: Line 14:
 ===== NICE & RENICE ===== ===== NICE & RENICE =====
  
-Now, to make your process run with a different priority than normal, there are the ''nice'' and ''renice'' commands. For a process already running, the renice value will change the priority. For example, to change the priority of a running process from the standard 20 to 25 (so that it runs after the other processes in the queue,) first use ''ls'' to get the PID. Let's say the PID is 941. Then, type ''renice -n 5 -p 941'' Alternatively, if you know a process should run at a lower priority when you start it, the ''nice'' command will start it off with a lower priority. The easiest way is to use the default ''nice'' value of 4 lower than your terminal NIce value. For example, ''nice a.out'' should start a.out at a NIce value of 24 if you haven't changed your terminal NIce value.+Now, to make your process run with a different priority than normal, there are the ''nice'' and ''renice'' commands. For a process already running, the renice value will change the priority. For example, to change the priority of a running process from the standard 20 to 25 (so that it runs after the other processes in the queue,) first use ''ps'' to get the PID. Let's say the PID is 941. Then, type ''renice -n 5 -p 941'' Alternatively, if you know a process should run at a lower priority when you start it, the ''nice'' command will start it off with a lower priority. The easiest way is to use the default ''nice'' value of 4 lower than your terminal NIce value. For example, ''nice a.out'' should start a.out at a NIce value of 24 if you haven't changed your terminal NIce value.
  
 So, now you know all about how to deal with processes and their priorities on our system. For more information, check the man pages (you can run man through the emacs Help menu, off this web page ([[http://wiki.cs.vassar.edu/cgi-bin/man/man2html?ps|ps]], [[http://wiki.cs.vassar.edu/cgi-bin/man/man2html?kill|kill]], [[http://wiki.cs.vassar.edu/cgi-bin/man/man2html?nice|nice]], [[http://wiki.cs.vassar.edu/cgi-bin/man/man2html?renice|renice]]) or from a terminal with the ''man'' command.) So, now you know all about how to deal with processes and their priorities on our system. For more information, check the man pages (you can run man through the emacs Help menu, off this web page ([[http://wiki.cs.vassar.edu/cgi-bin/man/man2html?ps|ps]], [[http://wiki.cs.vassar.edu/cgi-bin/man/man2html?kill|kill]], [[http://wiki.cs.vassar.edu/cgi-bin/man/man2html?nice|nice]], [[http://wiki.cs.vassar.edu/cgi-bin/man/man2html?renice|renice]]) or from a terminal with the ''man'' command.)