xref: /illumos-gate/usr/src/man/man1/nice.1 (revision 4c28a617e3922d92a58e813a5b955eb526b9c386)

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
http://www.opengroup.org/bookstore/.

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 SunOS 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.

This notice shall appear on any product containing this material.

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.

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.

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]


Copyright 1989 AT&T
Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.

NICE 1 "Jan 23, 2004"
NAME
nice - invoke a command with an altered scheduling priority
SYNOPSIS

/usr/bin/nice [-increment | -n increment] command
 [argument]...

/usr/xpg4/bin/nice [-increment | -n increment] command
 [argument]...
"csh Builtin"

nice [-increment | +increment] [command]
DESCRIPTION

The nice utility invokes command, requesting that it be run with a different system scheduling priority. The priocntl(1) command is a more general interface to scheduler functions.

The invoking process (generally the user's shell) must be in a scheduling class that supports nice.

If the C shell (see csh(1)) is used, the full path of the command must be specified. Otherwise, the csh built-in version of nice will be invoked. See csh Builtin below.

If nice executes commands with arguments, it uses the default shell /usr/bin/sh (see sh(1)).

"csh Builtin"

nice is also a csh built-in command with behavior different from the utility versions. See csh(1) for description.

OPTIONS

The following options are supported: -increment | -n increment

increment is a positive or negative decimal integer that has the same effect on the execution of the utility as if the utility had called the nice() function with the numeric value of the increment option-argument. See nice(2). nice() errors, other than EINVAL, are ignored. If not specified, an increment of 10 is assumed. The super-user may run commands with priority higher than normal by using a negative increment such as -10. A negative increment assigned by an unprivileged user is ignored.

OPERANDS

The following operands are supported: command

The name of a command that is to be invoked. If command names any of the special built-in utilities (see shell_builtins(1)), the results are undefined.

argument

Any string to be supplied as an argument when invoking command.

ENVIRONMENT VARIABLES

See environ(5) for descriptions of the following environment variables that affect the execution of nice: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, PATH, and NLSPATH.

EXIT STATUS

If command is invoked, the exit status of nice will be the exit status of command. Otherwise, nice will exit with one of the following values: 1-125

An error occurred.

126

command was found but could not be invoked.

127

command could not be found.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
CSI Enabled
ATTRIBUTE TYPE ATTRIBUTE VALUE
CSI Enabled
Interface Stability Standard
SEE ALSO

csh(1), ksh(1), nohup(1), priocntl(1), sh(1), shell_builtins(1), nice(2), attributes(5), environ(5), standards(5)