Annotation of src/usr.bin/renice/renice.8, Revision 1.12
1.12 ! aaron 1: .\" $OpenBSD: renice.8,v 1.11 2000/04/15 11:45:55 aaron 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.
14: .\" 3. All advertising materials mentioning features or use of this software
15: .\" must display the following acknowledgement:
16: .\" This product includes software developed by the University of
17: .\" California, Berkeley and its contributors.
18: .\" 4. Neither the name of the University nor the names of its contributors
19: .\" may be used to endorse or promote products derived from this software
20: .\" without specific prior written permission.
21: .\"
22: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32: .\" SUCH DAMAGE.
33: .\"
1.6 millert 34: .\" from: @(#)renice.8 8.1 (Berkeley) 6/9/93
1.1 deraadt 35: .\"
1.6 millert 36: .Dd June 9, 1993
1.1 deraadt 37: .Dt RENICE 8
1.7 aaron 38: .Os
1.1 deraadt 39: .Sh NAME
40: .Nm renice
41: .Nd alter priority of running processes
42: .Sh SYNOPSIS
43: .Nm renice
44: .Ar priority
45: .Oo
46: .Op Fl p
47: .Ar pid ...
48: .Oc
49: .Oo
50: .Op Fl g
51: .Ar pgrp ...
52: .Oc
53: .Oo
54: .Op Fl u
55: .Ar user ...
56: .Oc
57: .Sh DESCRIPTION
1.8 aaron 58: .Nm
1.11 aaron 59: alters the scheduling
1.3 kstailey 60: .Ar priority
61: (an integer) of one or more running processes.
1.1 deraadt 62: The following
63: .Ar who
1.5 aaron 64: parameters (pid, pgrp and user) are interpreted as process IDs, process group
65: IDs, or user names.
66: .Nm renice Ns ing
1.1 deraadt 67: a process group causes all processes in the process group
1.8 aaron 68: to have their scheduling priority altered.
1.5 aaron 69: .Nm renice Ns ing
1.1 deraadt 70: a user causes all processes owned by the user to have
71: their scheduling priority altered.
72: By default, the processes to be affected are specified by
1.5 aaron 73: their process IDs.
1.1 deraadt 74: .Pp
1.9 aaron 75: The options are as follows:
1.1 deraadt 76: .Bl -tag -width Ds
77: .It Fl g
1.8 aaron 78: Force
1.1 deraadt 79: .Ar who
1.5 aaron 80: parameters to be interpreted as process group IDs.
1.1 deraadt 81: .It Fl u
82: Force the
83: .Ar who
84: parameters to be interpreted as user names.
85: .It Fl p
86: Resets the
87: .Ar who
1.5 aaron 88: interpretation to be (the default) process IDs.
1.1 deraadt 89: .El
90: .Pp
91: For example,
92: .Bd -literal -offset
93: renice +1 987 -u daemon root -p 32
94: .Ed
95: .Pp
1.5 aaron 96: would change the priority of process IDs 987 and 32, and
1.1 deraadt 97: all processes owned by users daemon and root.
98: .Pp
1.11 aaron 99: Users other than the superuser may only alter the priority of
1.1 deraadt 100: processes they own,
1.10 aaron 101: and can only monotonically increase their
102: .Dq nice value
1.1 deraadt 103: within the range 0 to
104: .Dv PRIO_MAX
105: (20).
106: (This prevents overriding administrative fiats.)
1.11 aaron 107: The superuser
1.1 deraadt 108: may alter the priority of any process
109: and set the priority to any value in the range
110: .Dv PRIO_MIN
111: (\-20)
112: to
113: .Dv PRIO_MAX .
114: Useful priorities are:
115: 20 (the affected processes will run only when nothing else
116: in the system wants to),
1.10 aaron 117: 0 (the
118: .Dq base
119: scheduling priority),
1.1 deraadt 120: anything negative (to make things go very fast).
121: .Sh FILES
122: .Bl -tag -width /etc/passwd -compact
123: .It Pa /etc/passwd
1.9 aaron 124: for mapping user names to user IDs
1.1 deraadt 125: .El
126: .Sh SEE ALSO
1.4 deraadt 127: .Xr nice 1 ,
1.1 deraadt 128: .Xr getpriority 2 ,
129: .Xr setpriority 2
130: .Sh HISTORY
131: The
132: .Nm
133: command appeared in
134: .Bx 4.0 .
1.12 ! aaron 135: .Sh BUGS
! 136: Non-superusers cannot increase scheduling priorities of their own processes,
! 137: even if they were the ones that decreased the priorities in the first place.