2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document. The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
25 .\" This notice shall appear on any product containing this material.
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
45 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
47 .TH NICE 1 "Jan 23, 2004"
49 nice \- invoke a command with an altered scheduling priority
53 \fB/usr/bin/nice\fR [\fB-\fIincrement\fR\fR | \fB-n\fR \fIincrement\fR] \fIcommand\fR
59 \fB/usr/xpg4/bin/nice\fR [\fB-\fIincrement\fR\fR | \fB-n\fR \fIincrement\fR] \fIcommand\fR
66 \fBnice\fR [\fB-\fIincrement\fR\fR | +\fIincrement\fR] [\fIcommand\fR]
72 The \fBnice\fR utility invokes \fBcommand\fR, requesting that it be run with a
73 different system scheduling priority. The \fBpriocntl\fR(1) command is a more
74 general interface to scheduler functions.
77 The invoking process (generally the user's shell) must be in a scheduling class
78 that supports \fBnice\fR.
81 If the C shell (see \fBcsh\fR(1)) is used, the full path of the command must be
82 specified. Otherwise, the \fBcsh\fR built-in version of \fBnice\fR will be
83 invoked. See \fBcsh Builtin\fR below.
86 If \fBnice\fR executes commands with arguments, it uses the default shell
87 \fB/usr/bin/sh\fR (see \fBsh\fR(1)).
91 \fBnice\fR is also a \fBcsh\fR built-in command with behavior different from
92 the utility versions. See \fBcsh\fR(1) for description.
96 The following options are supported:
100 \fB\fB-\fR\fIincrement\fR | \fB-n\fR \fIincrement\fR\fR
103 \fIincrement\fR is a positive or negative decimal integer that has the same
104 effect on the execution of the utility as if the utility had called the
105 \fBnice()\fR function with the numeric value of the \fIincrement\fR
106 option-argument. See \fBnice\fR(2). \fBnice()\fR errors, other than
107 \fBEINVAL\fR, are ignored. If not specified, an increment of \fB10\fR is
110 The super-user may run commands with priority higher than normal by using a
111 negative increment such as \fB-10\fR\&. A negative \fIincrement\fR assigned by
112 an unprivileged user is ignored.
118 The following operands are supported:
125 The name of a command that is to be invoked. If \fIcommand\fR names any of the
126 special built-in utilities (see \fBshell_builtins\fR(1)), the results are
136 Any string to be supplied as an argument when invoking \fIcommand\fR.
139 .SH ENVIRONMENT VARIABLES
142 See \fBenviron\fR(5) for descriptions of the following environment variables
143 that affect the execution of \fBnice\fR: \fBLANG\fR, \fBLC_ALL\fR,
144 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBPATH\fR, and \fBNLSPATH\fR.
148 If \fIcommand\fR is invoked, the exit status of \fBnice\fR will be the exit
149 status of \fIcommand\fR. Otherwise, \fBnice\fR will exit with one of the
166 \fIcommand\fR was found but could not be invoked.
175 \fIcommand\fR could not be found.
181 See \fBattributes\fR(5) for descriptions of the following attributes:
190 ATTRIBUTE TYPE ATTRIBUTE VALUE
195 .SS "/usr/xpg4/bin/nice"
203 ATTRIBUTE TYPE ATTRIBUTE VALUE
207 Interface Stability Standard
213 \fBcsh\fR(1), \fBksh\fR(1), \fBnohup\fR(1), \fBpriocntl\fR(1), \fBsh\fR(1),
214 \fBshell_builtins\fR(1), \fBnice\fR(2), \fBattributes\fR(5), \fBenviron\fR(5),