xref: /freebsd/usr.bin/renice/renice.8 (revision b52b9d56d4e96089873a75f9e29062eec19fabba)
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.\" $FreeBSD$
34.\"
35.Dd June 9, 1993
36.Dt RENICE 8
37.Os
38.Sh NAME
39.Nm renice
40.Nd alter priority of running processes
41.Sh SYNOPSIS
42.Nm
43.Op Ar priority | Op Fl n Ar increment
44.Op Oo Fl p Oc Ar pid ...
45.Op Oo Fl g Oc Ar pgrp ...
46.Op Oo Fl u Oc Ar user ...
47.Sh DESCRIPTION
48The
49.Nm
50utility alters the
51scheduling priority of one or more running processes.
52The following
53.Ar who
54parameters are interpreted as process ID's, process group
55ID's, user ID's or user names.
56The
57.Nm Ns 'ing
58of a process group causes all processes in the process group
59to have their scheduling priority altered.
60The
61.Nm Ns 'ing
62of a user causes all processes owned by the user to have
63their scheduling priority altered.
64By default, the processes to be affected are specified by
65their process ID's.
66.Pp
67The following options are available:
68.Bl -tag -width indent
69.It Fl g
70Force
71.Ar who
72parameters to be interpreted as process group ID's.
73.It Fl n
74Instead of changing the specified processes to the given priority,
75interpret the following argument as an increment to be applied to
76the current priority of each process.
77.It Fl u
78Force the
79.Ar who
80parameters to be interpreted as user names or user ID's.
81.It Fl p
82Reset the
83.Ar who
84interpretation to be (the default) process ID's.
85.El
86.Pp
87For example,
88.Pp
89.Dl "renice +1 987 -u daemon root -p 32"
90.Pp
91would change the priority of process ID's 987 and 32, and
92all processes owned by users daemon and root.
93.Pp
94Users other than the super-user may only alter the priority of
95processes they own,
96and can only monotonically increase their ``nice value''
97within the range 0 to
98.Dv PRIO_MAX
99(20).
100(This prevents overriding administrative fiats.)
101The super-user
102may alter the priority of any process
103and set the priority to any value in the range
104.Dv PRIO_MIN
105(\-20)
106to
107.Dv PRIO_MAX .
108Useful priorities are:
10920 (the affected processes will run only when nothing else
110in the system wants to),
1110 (the ``base'' scheduling priority),
112anything negative (to make things go very fast).
113.Sh FILES
114.Bl -tag -width /etc/passwd -compact
115.It Pa /etc/passwd
116to map user names to user ID's
117.El
118.Sh SEE ALSO
119.Xr nice 1 ,
120.Xr rtprio 1 ,
121.Xr getpriority 2 ,
122.Xr setpriority 2
123.Sh STANDARDS
124The
125.Nm
126utility conforms to
127.St -p1003.1-2001 .
128.Sh HISTORY
129The
130.Nm
131utility appeared in
132.Bx 4.0 .
133.Sh BUGS
134Non super-users cannot increase scheduling priorities of their own processes,
135even if they were the ones that decreased the priorities in the first place.
136