9070 Remove wanboot from gate
[unleashed.git] / usr / src / man / man1 / renice.1
blob1fe1692e92733f5274fef61c5cbbe2dfb3cd358b
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved
3 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
4 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
7 .\"  This notice shall appear on any product containing this material.
8 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
10 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
11 .TH RENICE 1 "Jan 9, 2004"
12 .SH NAME
13 renice \- alter priority of running processes
14 .SH SYNOPSIS
15 .LP
16 .nf
17 \fBrenice\fR [\fB-n\fR \fIincrement\fR] [\fB-i\fR \fIidtype\fR] \fIID\fR...
18 .fi
20 .LP
21 .nf
22 \fBrenice\fR [\fB-n\fR \fIincrement\fR] [\fB-g\fR | \fB-p\fR | \fB-u\fR] \fIID\fR...
23 .fi
25 .LP
26 .nf
27 \fBrenice\fR \fIpriority\fR [\fB-p\fR] \fIpid\fR... [\fB-g\fR \fIgid\fR]... [\fB-p\fR \fIpid\fR]...
28      [\fB-u\fR \fIuser\fR]...
29 .fi
31 .LP
32 .nf
33 \fBrenice\fR \fIpriority\fR \fB-g\fR \fIgid\fR... [\fB-g\fR \fIgid\fR]... [\fB-p\fR \fIpid\fR]...
34      [\fB-u\fR \fIuser\fR]...
35 .fi
37 .LP
38 .nf
39 \fBrenice\fR \fIpriority\fR \fB-u\fR \fIuser\fR... [\fB-g\fR \fIgid\fR]... [\fB-p\fR \fIpid\fR]...
40      [\fB-u\fR \fIuser\fR]...
41 .fi
43 .SH DESCRIPTION
44 .sp
45 .LP
46 The \fBrenice\fR command alters the scheduling priority of one or more running
47 processes. By default, the processes to be affected are specified by their
48 process \fBID\fRs.
49 .sp
50 .LP
51 If the first operand is a number within the valid range of priorities
52 (\fB\(mi20\fR to \fB20\fR), \fBrenice\fR will treat it as a \fIpriority\fR (as
53 in all but the first synopsis form). Otherwise, \fBrenice\fR will treat it as
54 an \fIID\fR (as in the first synopsis form).
55 .SS "Altering Process Priority"
56 .sp
57 .LP
58 Users other than the privileged user may only alter the priority of processes
59 they own, and can only monotonically increase their "nice value" within the
60 range \fB0\fR to \fB19\fR. This prevents overriding administrative fiats. The
61 privileged user may alter the priority of any process and set the priority to
62 any value in the range \fB\(mi20\fR to \fB19\fR. Useful priorities are:
63 \fB19\fR (the affected processes will run only when nothing else in the system
64 wants to); \fB0\fR (the "base" scheduling priority),; and any negative value
65 (to make things go very fast). \fB20\fR is an acceptable nice value, but will
66 be rounded down to \fB19\fR.
67 .SH OPTIONS
68 .sp
69 .LP
70 \fBrenice\fR supports the following option features:
71 .RS +4
72 .TP
73 .ie t \(bu
74 .el o
75 The first operand, \fIpriority\fR, must precede the options and can have the
76 appearance of a multi-digit option.
77 .RE
78 .RS +4
79 .TP
80 .ie t \(bu
81 .el o
82 The \fB-g\fR, \fB-p\fR, and \fB-u\fR options can each take multiple
83 option-arguments.
84 .RE
85 .RS +4
86 .TP
87 .ie t \(bu
88 .el o
89 The \fIpid\fR option-argument can be used without its \fB-p\fR option.
90 .RE
91 .RS +4
92 .TP
93 .ie t \(bu
94 .el o
95 The \fB-i\fR option can be used to specify the \fIID\fR type for the \fBID\fR
96 list. This is preferred in specifying \fIID\fR type over the use of the
97 \fB-g\fR | \fB-p\fR | \fB-u\fR syntax, which is now obsolete. See NOTES.
98 .RE
99 .sp
101 The following options are supported:
103 .ne 2
105 \fB\fB-g\fR\fR
107 .RS 16n
108 Interprets all operands or just the \fIgid\fR arguments as unsigned decimal
109 integer process group IDs.
113 .ne 2
115 \fB\fB-i\fR\fR
117 .RS 16n
118 This option, together with the \fIID\fR list arguments, specifies a class of
119 processes to which the \fBrenice\fR command is to apply. The interpretation of
120 the \fBID\fR list depends on the value of \fIidtype\fR. The valid \fIidtype\fR
121 arguments are: \fBpid\fR, \fBpgid\fR, \fBuid\fR, \fBgid\fR, \fBsid\fR,
122 \fBtaskid\fR, \fBprojid\fR, and \fBzoneid\fR.
126 .ne 2
128 \fB\fB-n\fR \fIincrement\fR\fR
130 .RS 16n
131 Specifies how the system scheduling priority of the specified process or
132 processes is to be adjusted. The \fIincrement\fR option-argument is a positive
133 or negative decimal integer that will be used to modify the system scheduling
134 priority of the specified process or processes. Positive \fIincrement\fR values
135 cause a lower system scheduling priority. Negative \fIincrement\fR values may
136 require appropriate privileges and will cause a higher system scheduling
137 priority.
141 .ne 2
143 \fB\fB-p\fR\fR
145 .RS 16n
146 Interprets all operands or just the \fIpid\fR arguments as unsigned decimal
147 integer process \fBID\fRs. The \fB-p\fR option is the default if no options are
148 specified.
152 .ne 2
154 \fB\fB-u\fR\fR
156 .RS 16n
157 Interprets all operands or just the \fIuser\fR argument as users. If a user
158 exists with a user name equal to the operand, then the user \fBID\fR of that
159 user will be used in further processing. Otherwise, if the operand represents
160 an unsigned decimal integer, it will be used as the numeric user \fBID\fR of
161 the user.
164 .SH OPERANDS
167 The following operands are supported:
169 .ne 2
171 \fB\fIID\fR\fR
173 .RS 12n
174 A process \fBID\fR, process group \fBID\fR, or user name/user \fBID\fR,
175 depending on the option selected.
179 .ne 2
181 \fB\fIpriority\fR\fR
183 .RS 12n
184 The value specified is taken as the actual system scheduling priority, rather
185 than as an increment to the existing system scheduling priority. Specifying a
186 scheduling priority higher than that of the existing process may require
187 appropriate privileges.
190 .SH EXAMPLES
192 \fBExample 1 \fRAdjusting the scheduling priority of process IDs
195 Adjust the system scheduling priority so that process \fBID\fRs \fB987\fR and
196 \fB32\fR would have a lower scheduling priority:
199 .in +2
201 example% \fBrenice -n 5 -p 987 32\fR
203 .in -2
207 \fBExample 2 \fRAdjusting the scheduling priority of group IDs
210 Adjust the system scheduling priority so that group \fBID\fRs \fB324\fR and
211 \fB76\fR would have a higher scheduling priority, if the user has the
212 appropriate privileges to do so:
215 .in +2
217 example% \fBrenice -n -4 -g 324 76\fR
219 .in -2
223 \fBExample 3 \fRAdjusting the scheduling priority of a user ID and user name
226 Adjust the system scheduling priority so that numeric user ID \fB8\fR and user
227 \fBsas\fR would have a lower scheduling priority:
230 .in +2
232 example% \fBrenice -n 4 -u 8 sas\fR
234 .in -2
237 .SH ENVIRONMENT VARIABLES
240 See \fBenviron\fR(5) for descriptions of the following environment variables
241 that affect the execution of \fBrenice\fR: \fBLANG\fR, \fBLC_ALL\fR,
242 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
243 .SH EXIT STATUS
246 The following exit values are returned:
248 .ne 2
250 \fB\fB0\fR\fR
252 .RS 6n
253 Successful completion.
257 .ne 2
259 \fB\fB>0\fR\fR
261 .RS 6n
262 An error occurred.
265 .SH FILES
267 .ne 2
269 \fB\fB/etc/passwd\fR\fR
271 .RS 15n
272 map user names to user \fBID\fRs
275 .SH ATTRIBUTES
278 See \fBattributes\fR(5) for descriptions of the following attributes:
283 box;
284 c | c
285 l | l .
286 ATTRIBUTE TYPE  ATTRIBUTE VALUE
288 Interface Stability     Standard
291 .SH SEE ALSO
294 \fBnice\fR(1), \fBpasswd\fR(1), \fBpriocntl\fR(1), \fBattributes\fR(5),
295 \fBenviron\fR(5), \fBstandards\fR(5)
296 .SH NOTES
299 The \fBrenice\fR syntax
301 .in +2
303 \fBrenice [-n \fIincrement\fR] [-i \fIidtype\fR] \fIID\fR ...\fR
305 .in -2
310 is preferred over the old syntax
312 .in +2
314 \fBrenice [-n \fIincrement\fR] [-g | -p| -u] \fIID\fR ...\fR
316 .in -2
321 which is now obsolete.
324 If you make the priority very negative, then the process cannot be interrupted.
327 To regain control you must make the priority greater than \fB0\fR.
330 Users other than the privileged user cannot increase scheduling priorities of
331 their own processes, even if they were the ones that decreased the priorities
332 in the first place.
335 The \fBpriocntl\fR command subsumes the function of \fBrenice\fR.