xref: /freebsd/usr.bin/renice/renice.8 (revision 380a989b3223d455375b4fae70fd0b9bdd43bafb)
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. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     @(#)renice.8	8.1 (Berkeley) 6/9/93
33.\"
34.Dd June 9, 1993
35.Dt RENICE 8
36.Os BSD 4
37.Sh NAME
38.Nm renice
39.Nd alter priority of running processes
40.Sh SYNOPSIS
41.Nm renice
42.Ar priority
43.Oo
44.Op Fl p
45.Ar pid ...
46.Oc
47.Oo
48.Op Fl g
49.Ar pgrp ...
50.Oc
51.Oo
52.Op Fl u
53.Ar user ...
54.Oc
55.Sh DESCRIPTION
56.Nm Renice
57alters the
58scheduling priority of one or more running processes.
59The following
60.Ar who
61parameters are interpreted as process ID's, process group
62ID's, or user names.
63.Nm Renice Ns 'ing
64a process group causes all processes in the process group
65to have their scheduling priority altered.
66.Nm Renice Ns 'ing
67a user causes all processes owned by the user to have
68their scheduling priority altered.
69By default, the processes to be affected are specified by
70their process ID's.
71.Pp
72Options supported by
73.Nm renice :
74.Bl -tag -width Ds
75.It Fl g
76Force
77.Ar who
78parameters to be interpreted as process group ID's.
79.It Fl u
80Force the
81.Ar who
82parameters to be interpreted as user names.
83.It Fl p
84Resets the
85.Ar who
86interpretation to be (the default) process ID's.
87.El
88.Pp
89For example,
90.Bd -literal -offset
91renice +1 987 -u daemon root -p 32
92.Ed
93.Pp
94would change the priority of process ID's 987 and 32, and
95all processes owned by users daemon and root.
96.Pp
97Users other than the super-user may only alter the priority of
98processes they own,
99and can only monotonically increase their ``nice value''
100within the range 0 to
101.Dv PRIO_MAX
102(20).
103(This prevents overriding administrative fiats.)
104The super-user
105may alter the priority of any process
106and set the priority to any value in the range
107.Dv PRIO_MIN
108(\-20)
109to
110.Dv PRIO_MAX .
111Useful priorities are:
11220 (the affected processes will run only when nothing else
113in the system wants to),
1140 (the ``base'' scheduling priority),
115anything negative (to make things go very fast).
116.Sh FILES
117.Bl -tag -width /etc/passwd -compact
118.It Pa /etc/passwd
119to map user names to user ID's
120.El
121.Sh SEE ALSO
122.Xr getpriority 2 ,
123.Xr setpriority 2
124.Sh BUGS
125Non super-users can not increase scheduling priorities of their own processes,
126even if they were the ones that decreased the priorities in the first place.
127.Sh HISTORY
128The
129.Nm
130command appeared in
131.Bx 4.0 .
132