Annotation of src/usr.bin/renice/renice.8, Revision 1.14
1.14 ! millert 1: .\" $OpenBSD: renice.8,v 1.13 2002/02/13 08:33:47 mpech Exp $
1.10 aaron 2: .\"
1.6 millert 3: .\" Copyright (c) 1983, 1991, 1993
4: .\" The Regents of the University of California. All rights reserved.
1.1 deraadt 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.
1.14 ! millert 14: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 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: .\"
1.6 millert 30: .\" from: @(#)renice.8 8.1 (Berkeley) 6/9/93
1.1 deraadt 31: .\"
1.6 millert 32: .Dd June 9, 1993
1.1 deraadt 33: .Dt RENICE 8
1.7 aaron 34: .Os
1.1 deraadt 35: .Sh NAME
36: .Nm renice
37: .Nd alter priority of running processes
38: .Sh SYNOPSIS
39: .Nm renice
40: .Ar priority
41: .Oo
42: .Op Fl p
43: .Ar pid ...
44: .Oc
45: .Oo
46: .Op Fl g
47: .Ar pgrp ...
48: .Oc
49: .Oo
50: .Op Fl u
51: .Ar user ...
52: .Oc
53: .Sh DESCRIPTION
1.8 aaron 54: .Nm
1.11 aaron 55: alters the scheduling
1.3 kstailey 56: .Ar priority
57: (an integer) of one or more running processes.
1.1 deraadt 58: The following
59: .Ar who
1.5 aaron 60: parameters (pid, pgrp and user) are interpreted as process IDs, process group
61: IDs, or user names.
62: .Nm renice Ns ing
1.1 deraadt 63: a process group causes all processes in the process group
1.8 aaron 64: to have their scheduling priority altered.
1.5 aaron 65: .Nm renice Ns ing
1.1 deraadt 66: a user causes all processes owned by the user to have
67: their scheduling priority altered.
68: By default, the processes to be affected are specified by
1.5 aaron 69: their process IDs.
1.1 deraadt 70: .Pp
1.9 aaron 71: The options are as follows:
1.1 deraadt 72: .Bl -tag -width Ds
73: .It Fl g
1.8 aaron 74: Force
1.1 deraadt 75: .Ar who
1.5 aaron 76: parameters to be interpreted as process group IDs.
1.1 deraadt 77: .It Fl u
78: Force the
79: .Ar who
80: parameters to be interpreted as user names.
81: .It Fl p
82: Resets the
83: .Ar who
1.5 aaron 84: interpretation to be (the default) process IDs.
1.1 deraadt 85: .El
86: .Pp
87: For example,
88: .Bd -literal -offset
1.13 mpech 89: # renice +1 987 -u daemon root -p 32
1.1 deraadt 90: .Ed
91: .Pp
1.5 aaron 92: would change the priority of process IDs 987 and 32, and
1.1 deraadt 93: all processes owned by users daemon and root.
94: .Pp
1.11 aaron 95: Users other than the superuser may only alter the priority of
1.1 deraadt 96: processes they own,
1.10 aaron 97: and can only monotonically increase their
98: .Dq nice value
1.1 deraadt 99: within the range 0 to
100: .Dv PRIO_MAX
101: (20).
102: (This prevents overriding administrative fiats.)
1.11 aaron 103: The superuser
1.1 deraadt 104: may alter the priority of any process
105: and set the priority to any value in the range
106: .Dv PRIO_MIN
107: (\-20)
108: to
109: .Dv PRIO_MAX .
110: Useful priorities are:
111: 20 (the affected processes will run only when nothing else
112: in the system wants to),
1.10 aaron 113: 0 (the
114: .Dq base
115: scheduling priority),
1.1 deraadt 116: anything negative (to make things go very fast).
117: .Sh FILES
118: .Bl -tag -width /etc/passwd -compact
119: .It Pa /etc/passwd
1.9 aaron 120: for mapping user names to user IDs
1.1 deraadt 121: .El
122: .Sh SEE ALSO
1.4 deraadt 123: .Xr nice 1 ,
1.1 deraadt 124: .Xr getpriority 2 ,
125: .Xr setpriority 2
126: .Sh HISTORY
127: The
128: .Nm
129: command appeared in
130: .Bx 4.0 .
1.12 aaron 131: .Sh BUGS
132: Non-superusers cannot increase scheduling priorities of their own processes,
133: even if they were the ones that decreased the priorities in the first place.