Annotation of src/usr.bin/renice/renice.8, Revision 1.20
1.20 ! jmc 1: .\" $OpenBSD: renice.8,v 1.19 2009/01/30 08:42:38 sobrado 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.20 ! jmc 32: .Dd $Mdocdate: January 30 2009 $
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
1.18 millert 40: .Fl n Ar increment
1.1 deraadt 41: .Oo
1.15 jmc 42: .Op Fl g
43: .Ar pgrp ...
44: .Oc
45: .Oo
1.1 deraadt 46: .Op Fl p
47: .Ar pid ...
48: .Oc
49: .Oo
50: .Op Fl u
51: .Ar user ...
52: .Oc
53: .Sh DESCRIPTION
1.8 aaron 54: .Nm
1.18 millert 55: alters the scheduling priority of one or more running processes by
56: .Ar increment .
1.15 jmc 57: Processes may be selected using the parameters
58: .Ar pid
59: (process ID),
60: .Ar pgrp
61: (process group ID),
62: and
63: .Ar user
1.18 millert 64: (user name or ID).
1.15 jmc 65: If no flag is specified,
66: the default is to select by process ID.
1.1 deraadt 67: .Pp
1.11 aaron 68: Users other than the superuser may only alter the priority of
1.1 deraadt 69: processes they own,
1.10 aaron 70: and can only monotonically increase their
71: .Dq nice value
1.1 deraadt 72: within the range 0 to
73: .Dv PRIO_MAX
74: (20).
75: (This prevents overriding administrative fiats.)
1.11 aaron 76: The superuser
1.1 deraadt 77: may alter the priority of any process
78: and set the priority to any value in the range
79: .Dv PRIO_MIN
80: (\-20)
81: to
82: .Dv PRIO_MAX .
1.15 jmc 83: .Pp
1.1 deraadt 84: Useful priorities are:
85: 20 (the affected processes will run only when nothing else
86: in the system wants to),
1.10 aaron 87: 0 (the
88: .Dq base
89: scheduling priority),
1.1 deraadt 90: anything negative (to make things go very fast).
1.15 jmc 91: .Pp
92: The options are as follows:
93: .Bl -tag -width Ds
1.19 sobrado 94: .It Fl g Ar pgrp ...
1.15 jmc 95: Alter the scheduling priority of all processes in process group
96: .Ar pgrp .
1.18 millert 97: .It Fl n Ar increment
98: A positive or negative decimal integer used to modify the
99: scheduling priority.
1.19 sobrado 100: .It Fl p Ar pid ...
1.15 jmc 101: Alter the scheduling priority of process
102: .Ar pid .
1.19 sobrado 103: .It Fl u Ar user ...
1.18 millert 104: Alter the scheduling priority of all processes belonging to
105: .Ar user ,
106: which may be a user name or ID.
1.15 jmc 107: .El
1.1 deraadt 108: .Sh FILES
109: .Bl -tag -width /etc/passwd -compact
110: .It Pa /etc/passwd
1.9 aaron 111: for mapping user names to user IDs
1.1 deraadt 112: .El
1.15 jmc 113: .Sh EXAMPLES
114: The following example
115: changes the priority of process IDs 987 and 32,
116: and all processes owned by users daemon and root:
117: .Bd -literal -offset indent
1.18 millert 118: # renice -n +1 987 -u daemon root -p 32
1.15 jmc 119: .Ed
1.1 deraadt 120: .Sh SEE ALSO
1.4 deraadt 121: .Xr nice 1 ,
1.1 deraadt 122: .Xr getpriority 2 ,
123: .Xr setpriority 2
1.16 jmc 124: .Sh STANDARDS
125: The
126: .Nm
127: utility is compliant with the
1.20 ! jmc 128: .St -p1003.1-2008
1.16 jmc 129: specification,
130: but its presence is optional.
1.18 millert 131: .Pp
132: The historical behavior of passing the increment as the first
133: argument is supported for backwards compatibility.
1.16 jmc 134: .Pp
135: The arguments to flags
136: .Op Fl gpu
137: are extensions to that specification.
1.1 deraadt 138: .Sh HISTORY
139: The
140: .Nm
141: command appeared in
142: .Bx 4.0 .
1.12 aaron 143: .Sh BUGS
144: Non-superusers cannot increase scheduling priorities of their own processes,
145: even if they were the ones that decreased the priorities in the first place.