xref: /minix/usr.bin/renice/renice.8 (revision ebfedea0)
1.\"	$NetBSD: renice.8,v 1.15 2012/12/06 07:52:12 wiz 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.\"
32.Dd December 6, 2012
33.Dt RENICE 8
34.Os
35.Sh NAME
36.Nm renice
37.Nd alter priority of running processes
38.Sh SYNOPSIS
39.Nm
40.Ar priority
41.Oo
42.Op Fl p
43.Ar pid ...
44.Oc
45.Oo
46.Fl g
47.Ar pgrp ...
48.Oc
49.Oo
50.Fl u
51.Ar user ...
52.Oc
53.Nm
54.Fl n
55.Ar increment
56.Oo
57.Op Fl p
58.Ar pid ...
59.Oc
60.Oo
61.Fl g
62.Ar pgrp ...
63.Oc
64.Oo
65.Fl u
66.Ar user ...
67.Oc
68.Sh DESCRIPTION
69.Nm
70alters the
71scheduling priority of one or more running processes.
72The following
73.Ar who
74parameters are interpreted as process ID's, process group
75ID's, or user names.
76.Nm Ns 'ing
77a process group causes all processes in the process group
78to have their scheduling priority altered.
79.Nm Ns 'ing
80a user causes all processes owned by the user to have
81their scheduling priority altered.
82By default, the processes to be affected are specified by
83their process ID's.
84.Pp
85Options supported by
86.Nm :
87.Bl -tag -width Ds
88.It Fl g
89Force
90.Ar who
91parameters to be interpreted as process group ID's.
92.It Fl n
93Instead of changing the specified processes to the given priority,
94interpret the following argument as an increment to be applied to
95the current priority of each process.
96.It Fl u
97Force the
98.Ar who
99parameters to be interpreted as user names.
100.It Fl p
101Resets the
102.Ar who
103interpretation to be (the default) process ID's.
104.El
105.Pp
106For example,
107.Bd -literal -offset indent
108renice +1 987 -u daemon root -p 32
109.Ed
110.Pp
111would change the priority of process ID's 987 and 32, and
112all processes owned by users daemon and root.
113.Pp
114Users other than the super-user may only alter the priority of
115processes they own,
116and can only monotonically increase their ``nice value''
117within the range 0 to
118.Dv PRIO_MAX
119(20).
120(This prevents overriding administrative fiats.)
121The super-user
122may alter the priority of any process
123and set the priority to any value in the range
124.Dv PRIO_MIN
125(\-20)
126to
127.Dv PRIO_MAX .
128.Pp
129Useful priorities are:
1300, the ``base'' scheduling priority;
13120, the affected processes will run only when nothing at the base priority
132wants to;
133anything negative, the processes will receive a scheduling preference.
134.Sh FILES
135.Bl -tag -width /etc/passwd -compact
136.It Pa /etc/passwd
137to map user names to user ID's
138.El
139.Sh SEE ALSO
140.Xr nice 1 ,
141.Xr prenice 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