Etiquette: Running Nice on other desktop machines: Difference between revisions

From csml-wiki.northwestern.edu
Jump to navigation Jump to search
(Created page with "When using someone else's machine, it's polite to use the command '''nice''' and '''renice'''. '''Nice''' changes the priority of a task. When using another machine, you wou...")
 
mNo edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
When using someone else's machine, it's polite to use the command '''nice''' and '''renice'''.
When using someone else's machine, it's polite to use the command '''nice''' and '''renice'''.


'''Nice''' changes the priority of a task. When using another machine, you would want to set your task to a lower priority as to not interfere with the user's tasks. Priority ranges from -20 (highest) to 20 (lowest).
'''Nice''' changes the priority of a task. When using another machine, you want to set your task to a lower priority as to not interfere with the user's tasks. Priority ranges from -20 (highest) to 20 (lowest).


nice [options] [command]
nice [options] [command]
Line 9: Line 9:
nice -19 ~/run.py
nice -19 ~/run.py


UNIX priority levels are counted from negative (highest) to positive. Note that <code>nice -n</code> specifies a priority of <code>n</code> whereas <code>nice --n</code> specifies a priority of <code>-n</code>.
In this example, -19 would be a low priority and --19 would be a high priority.



'''Renice''' ...
'''Renice''' allows you to reset the priority of a process that is already running.

renice [-n] [PID] [options]

Replace [-n] with the desired priority, and [PID] with the process ID number.

Latest revision as of 20:39, 25 February 2016

When using someone else's machine, it's polite to use the command nice and renice.

Nice changes the priority of a task. When using another machine, you want to set your task to a lower priority as to not interfere with the user's tasks. Priority ranges from -20 (highest) to 20 (lowest).

nice [options] [command]

Example:

nice -19 ~/run.py

UNIX priority levels are counted from negative (highest) to positive. Note that nice -n specifies a priority of n whereas nice --n specifies a priority of -n.


Renice allows you to reset the priority of a process that is already running.

renice [-n] [PID] [options]

Replace [-n] with the desired priority, and [PID] with the process ID number.