xref: /freebsd/usr.bin/renice/renice.8 (revision 734e82fe33aa764367791a7d603b383996c6b40b)
1.\" Copyright (c) 1983, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"     @(#)renice.8	8.1 (Berkeley) 6/9/93
29.\"
30.Dd October 27, 2020
31.Dt RENICE 8
32.Os
33.Sh NAME
34.Nm renice
35.Nd alter priority of running processes
36.Sh SYNOPSIS
37.Nm
38.Ar priority
39.Op Oo Fl gpu Oc Ar target
40.Nm
41.Fl n Ar increment
42.Op Oo Fl gpu Oc Ar target
43.Sh DESCRIPTION
44The
45.Nm
46utility alters the
47scheduling priority of one or more running processes.
48The following
49.Ar target
50parameters are interpreted as process ID's (the default), process group
51ID's, user ID's or user names.
52The
53.Nm Ns 'ing
54of a process group causes all processes in the process group
55to have their scheduling priority altered.
56The
57.Nm Ns 'ing
58of a user causes all processes owned by the user to have
59their scheduling priority altered.
60.Pp
61The following options are available:
62.Bl -tag -width indent
63.It Fl n
64Instead of changing the specified processes to the given priority,
65interpret the following argument as an increment to be applied to
66the current priority of each process.
67.It Fl g
68Interpret
69.Ar target
70parameters as process group ID's.
71.It Fl p
72Interpret
73.Ar target
74parameters as process ID's (the default).
75.It Fl u
76Interpret
77.Ar target
78parameters as user names or user ID's.
79.El
80.Pp
81Users other than the super-user may only alter the priority of
82processes they own,
83and can only monotonically increase their ``nice value''
84within the range 0 to
85.Dv PRIO_MAX
86(20).
87(This prevents overriding administrative fiats.)
88The super-user
89may alter the priority of any process
90and set the priority to any value in the range
91.Dv PRIO_MIN
92(\-20)
93to
94.Dv PRIO_MAX .
95Useful priorities are:
9620 (the affected processes will run only when nothing else
97in the system wants to),
980 (the ``base'' scheduling priority),
99anything negative (to make things go very fast).
100.Sh FILES
101.Bl -tag -width /etc/passwd -compact
102.It Pa /etc/passwd
103to map user names to user ID's
104.El
105.Sh EXAMPLES
106Change the priority of process ID's 987 and 32, and
107all processes owned by users daemon and root.
108.Pp
109.Dl "renice +1 987 -u daemon root -p 32"
110.Sh SEE ALSO
111.Xr nice 1 ,
112.Xr rtprio 1 ,
113.Xr getpriority 2 ,
114.Xr setpriority 2
115.Sh STANDARDS
116The
117.Nm
118utility conforms to
119.St -p1003.1-2001 .
120.Sh HISTORY
121The
122.Nm
123utility appeared in
124.Bx 4.0 .
125.Sh BUGS
126Non super-users cannot increase scheduling priorities of their own processes,
127even if they were the ones that decreased the priorities in the first place.
128