Using this procedure, a user can lower the priority of a process. However, superuser can raise or lower the priority of a process.
This section describes the syntax of the /usr/bin/nice command and not the C-shell built-in nicecommand. For information about the C-shell nice command, see the csh(1) man page.
Determine whether you want to change the priority of a process, either as a user or as superuser. Then, select one of the following:
As a user, lower the priority of a command by increasing the nice number.
The following nice command executes command-name with a lower priority by raising the nice number by 5 units.
$ /usr/bin/nice -5 command-name |
In the preceding command, the minus sign designates that what follows is an option. This command could also be specified as follows:
% /usr/bin/nice -n 5 command-name |
The following nice command lowers the priority of command-name by raising the nice number by the default increment of 10 units, but not beyond the maximum value of 39.
% /usr/bin/nice command-name |
As superuser or assuming an equivalent role, raise or lower the priority of a command by changing the nice number.
The following nice command raises the priority of command-name by lowering the nice number by 10 units, but not below the minimum value of 0.
# /usr/bin/nice --10 command-name |
In the preceding command, the first minus sign designates that what follows is an option. The second minus sign indicates a negative number.
The following nice command lowers the priority of command-name by raising the nice number by 5 units, but not beyond the maximum value of 39.
# /usr/bin/nice -5 command-name |
For more information, see the nice(1) man page.