renice(1)
NAME
renice − alter priority of running processes
SYNOPSIS
renice [-n priority_change] [-g|-p| -u] id ...
DESCRIPTION
renice alters the system nice value (relative system scheduling priority) of one or more running processes specified by id. The new system nice value is equal to 20 + priority_change, and is limited to the range from 0 through 39. If priority_change is a negative value, priority is increased provided the user has appropriate privileges. See nice(1) for an explanation of system nice values.
Except for users with appropriate privileges, only the process owner can alter process priority, and can only monotonically increase the system nice value within the range 20 to 39 (this prevents overriding any current administrative restrictions). Users with appropriate privileges can alter the priority of any process and set the system nice value for the process to any value in the range 0 through 39 where 20 is the default system nice value for ordinary user processes. System nice values greater than 20 run at lower relative priority; values less than 20 run at higher relative priority.
Each specified id parameter is interpreted as a process ID, process group ID, or user name, depending on which option is used. Using renice on a process group causes all processes in that process group to have their scheduling priority altered. renice on a user changes the scheduling priority of all processes owned by that user. If no -g, -p, or -g option is specified, ids are interpreted as process ID s by default.
Options
renice recognizes the following options:
-g Interpret each ID as a process group ID. Only users with appropriate privileges can use this option.
-n increment Change the system nice value of each affected process to 20 + increment. If increment is negative, the system nice value is 20 minus the absolute value of increment. Only users with appropriate privileges can increase scheduling priority. If this option is not used, priority_change defaults to 10.
-p Interpret each ID as a process ID. This is the default option if none is specified.
-u Interpret each ID as a user name. Only users with appropriate privileges can use this option for user ID s other than their own.
RETURN VALUES
renice returns a 0 when successful, and a non-zero value when unsuccessful.
EXTERNAL INFLUENCES
Single-byte character code sets are supported.
DIAGNOSTICS
renice reports the old and new priority (system nice value) of the affected process(es) if the operation requested completed successfully. Otherwise, an error message is displayed to indicate the reason for failure.
EXAMPLES
Use renice default values to decrease the priority of process 923. renice defaults to -p option, and priority_change defaults to 10, setting the process to a system nice value of 30:
renice 923
Change the system nice value for all processes owned by user john and user 123 to 33 (priority_change=13):
renice -n 13 -u john 123
Change the system nice value of all processes in process group 20 to 10 (lowering the system nice value requires appropriate privileges).
renice -n -10 -g 20
WARNINGS
Users who do not have the appropriate privileges cannot increase scheduling priorities of their own processes, even if they were the one who decreased the priority in the first place.
FILES
/etc/passwd to map user names to user ID’s
SEE ALSO
nice(1), getpriority(2), nice(2).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992