macro and text revision (-mdoc version 3)
[unix-history] / usr / src / usr.bin / renice / renice.8
CommitLineData
b42074ab 1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
f56e8d15 2.\" All rights reserved.
c229b29d 3.\"
c45a9e4d 4.\" %sccs.include.redist.man%
c229b29d 5.\"
b42074ab 6.\" @(#)renice.8 6.5 (Berkeley) %G%
f56e8d15 7.\"
b42074ab
CL
8.Dd
9.Dt RENICE 8
10.Os BSD 4
11.Sh NAME
12.Nm renice
13.Nd alter priority of running processes
14.Sh SYNOPSIS
15.Nm renice
16.Ar priority
17.Oo
18.Op Fl p
19.Ar pid ...
20.Oc
21.Oo
22.Op Fl g
23.Ar pgrp ...
24.Oc
25.Oo
26.Op Fl u
27.Ar user ...
28.Oc
29.Sh DESCRIPTION
30.Nm Renice
8d36c088
KM
31alters the
32scheduling priority of one or more running processes.
b42074ab
CL
33The following
34.Ar who
8d36c088
KM
35parameters are interpreted as process ID's, process group
36ID's, or user names.
b42074ab 37.Nm Renice Ns 'ing
8d36c088
KM
38a process group causes all processes in the process group
39to have their scheduling priority altered.
b42074ab 40.Nm Renice Ns 'ing
8d36c088
KM
41a user causes all processes owned by the user to have
42their scheduling priority altered.
43By default, the processes to be affected are specified by
b42074ab
CL
44their process ID's.
45.Pp
46Options supported by
47.Nm renice :
48.Bl -tag -width Ds
49.It Fl g
50Force
51.Ar who
52parameters to be interpreted as process group ID's.
53.It Fl u
54Force the
55.Ar who
56parameters to be interpreted as user names.
57.It Fl p
58Resets the
59.Ar who
8d36c088 60interpretation to be (the default) process ID's.
b42074ab
CL
61.El
62.Pp
8d36c088 63For example,
b42074ab
CL
64.Bd -literal -offset
65renice +1 987 -u daemon root -p 32
66.Ed
67.Pp
8d36c088
KM
68would change the priority of process ID's 987 and 32, and
69all processes owned by users daemon and root.
b42074ab 70.Pp
8d36c088
KM
71Users other than the super-user may only alter the priority of
72processes they own,
73and can only monotonically increase their ``nice value''
b42074ab
CL
74within the range 0 to
75.Dv PRIO_MAX
76(20).
8d36c088
KM
77(This prevents overriding administrative fiats.)
78The super-user
79may alter the priority of any process
b42074ab
CL
80and set the priority to any value in the range
81.Dv PRIO_MIN
82(\-20)
83to
84.Dv PRIO_MAX .
8d36c088 85Useful priorities are:
2b0388bc 8620 (the affected processes will run only when nothing else
8d36c088
KM
87in the system wants to),
880 (the ``base'' scheduling priority),
89anything negative (to make things go very fast).
b42074ab
CL
90.Sh FILES
91.Bl -tag -width /etc/passwd -compact
92.It Pa /etc/passwd
93to map user names to user ID's
94.El
95.Sh SEE ALSO
96.Xr getpriority 2 ,
97.Xr setpriority 2
98.Sh BUGS
8d36c088
KM
99Non super-users can not increase scheduling priorities of their own processes,
100even if they were the ones that decreased the priorities in the first place.
b42074ab
CL
101.Sh HISTORY
102The
103.Nm
104command appeared in
105.Bx 4.0 .