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