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