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