p The following .Ar who parameters name the target processes, as either process IDs, process group IDs, or user names. The .Fl gpu options control the interpretation as follows: l -tag -width Ds t Fl g Interpret .Ar who parameters as process group ID's. t Fl p Interpret .Ar who parameters as process IDs. This is the default. t Fl u Interpret .Ar who parameters as user names. .El
p Each .Ar who parameter is processed separately and updates the priority of the processes it names as follows: l -tag -width "with Ds" t with Fl g All processes in the process group are updated to the selected priority. If an .Ar increment is used, the increment is added to the highest priority found among the members of the process group prior to the change. t with Fl p The named process is updated to the selected priority. If an .Ar increment is used, the increment is added to the process's previous priority. t with Fl u All processes belonging to the specified user are updated to the selected priority. If an .Ar increment is used, the increment is added to the highest priority found among the processes belonging to the user prior to the change. .El
p In conventional terminology a .Dq high priority process receives a lot of CPU time and a .Dq low priority process receives relatively little. .Dq Niceness is the inverse concept: a process with a high niceness level receives relatively little CPU time. It is about the process being nice to the rest of the system, rather than the system being nice to the process.
p The numerical priority values accepted by .Nm are .Em called priorities but are actually nicenesses. They range from .Dv PRIO_MIN (-20) to .Dv PRIO_MAX (20). .Dv PRIO_MIN is the highest priority, lowest niceness, and receives the most CPU time. .Dv PRIO_MAX is the lowest priority, highest niceness, and receives the least CPU time. This is confusing but enshrined in historical practice and standards. If in doubt, check with .Xr ps 1 : processes running with elevated priority (getting more CPU time) include .Sq < in the FLAGS column; processes running with reduced priority (getting less CPU time) show .Sq N for .Dq nice in FLAGS. The default priority is 0.
p At priority 20, processes will specifically run only when nothing else wants to.
p Users other than the super-user may only alter the priority of processes they own, and only by increasing the niceness. (This prevents overriding administrative fiats.) The super-user may alter the priority of any process to any legal value. .Sh FILES l -tag -width /etc/passwd -compact t Pa /etc/passwd to map user names to user ID's .El .Sh EXAMPLES d -literal -offset indent renice +1 987 -u daemon root -p 32 .Ed
p changes the priority of process ID's 987 and 32, and all processes owned by users daemon and root. .Sh SEE ALSO .Xr nice 1 , .Xr prenice 1 , .Xr getpriority 2 , .Xr setpriority 2 .Sh HISTORY The .Nm command appeared in x 4.0 . .Sh BUGS Non-super-users cannot increase scheduling priorities of their own processes, even if they were the ones that decreased the priorities in the first place.