Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nice(1) [sunos man page]

nice(1) 							   User Commands							   nice(1)

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. /usr/bin/nice If nice executes commands with arguments, it uses the default shell /usr/bin/sh (see sh(1)). /usr/xpg4/bin/nice If nice executes commands with arguments, it uses /usr/xpg4/bin/sh (see ksh(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_MES- SAGES, 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 val- ues: 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: /usr/bin/nice +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ /usr/xpg4/bin/nice +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWxcu4 | +-----------------------------+-----------------------------+ |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) SunOS 5.10 23 Jan 2004 nice(1)

Check Out this Related Man Page

nice(1) 						      General Commands Manual							   nice(1)

NAME
nice - Runs a command at a different priority SYNOPSIS
Current syntax nice [-n priority] command [argument...] Obsolescent syntax nice [-priority] command [argument...] Note The C shell has a built-in version of the nice command. If you are using the C shell, and want to guarantee that you are using the command described here, you must specify the full path /usr/bin/nice. See the csh(1) reference page for a description of the built-in command. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: nice: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Specifies how the system scheduling priority of the executed utility is adjusted. The priority argument is a positive or negative decimal integer. Positive priority values cause a lower or unchanged system scheduling priority. Negative priority values might require appropriate privileges and cause a higher or unchanged system scheduling priority. Specifies how the system scheduling priority of the executed utility is adjusted. (Obsolescent) OPERANDS
The name of a utility that is to be invoked. Any string to be supplied as an argument to the utility named by the command operand. DESCRIPTION
The nice command lets you run the specified command at a lower priority. The value of priority can range from 1 to 19, with 19 being the lowest priority. The default value of priority is 10. [Tru64 UNIX] If you have superuser authority, you can run commands at a higher priority by specifying priority as a negative number; for example, -10. NOTES
The csh command contains a built-in subcommand named nice. The command and subcommand do not necessarily work the same way. For informa- tion on the subcommand, see the csh command. EXIT STATUS
The nice command returns the following exit values: An error occurred in the nice utility. The specified command was found but could not be invoked. The specified command could not be found. EXAMPLES
To run a low priority command in the background, enter: nice cc -c *.c & This runs the command cc -c *.c at low priority in the background. Your terminal is free so that you can run other commands while cc is running. See the sh command for details about starting background processes with an & (ampersand). To specify a very low prior- ity, enter: nice -n 15 cc -c *.c & This runs cc in the background at a priority that is even lower than the default priority set by nice. To specify a very high pri- ority (ksh and sh only), enter: nice -n -10 wall <<end System shutdown in 2 minutes! end This runs wall at a higher priority than all user processes. Doing this slows down everything else running on the system. If you do not have superuser authority when you run this command, then the wall command runs at the normal priority. The <<end and end arguments define a Here Document, which uses the text entered before the end line as standard input for the com- mand. For more details, see the Inline Input (Here) Documents section on the sh(1) reference page. ENVIRONMENT VARIABLES
The following environment variables affect the execution of nice: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. Determines the search path used to locate the command invoked. SEE ALSO
Commands: csh(1), nohup(1), renice(8) Functions: nice(3), setpriority(2) Standards: standards(5) nice(1)
Man Page