/usr/bin/nice [-increment | -n increment] command [argument]...
/usr/xpg4/bin/nice [-increment | -n increment] command [argument]...
nice [-increment | +increment] [command]
nice 实用程序调用 command,并请求其以不同的系统调度优先级运行。priocntl(1) 命令是更通用的调度程序功能接口。
调用进程(一般为用户的 shell)必须属于支持 nice 的调度类。
如果使用了 C shell(请参见 csh(1)),则必须指定命令的完整路径。否则,将调用 csh 内置的 nice 版本。请参见下文的“csh Builtin”部分。
如果 nice 执行命令时使用参数,则使用缺省的 shell /usr/bin/sh(请参见 sh(1))。
如果 nice 执行命令时使用参数,则使用 /usr/xpg4/bin/sh(请参见 ksh88(1))。
nice 也是一个 csh 内置命令,其行为不同于实用程序版本。有关说明,请参见 csh(1)。
支持以下选项:
increment 是一个正的或负的十进制整数,它会影响实用程序的执行,就像实用程序调用了采用 increment 选项参数数值的 nice() 函数一样。请参见 nice(2)。nice() 错误将被忽略,但 EINVAL 除外。如果不指定,则采用增量 10。
通过使用负增量(如 –10),超级用户可以用高于正常优先级的优先级运行命令。非特权用户指定的负 increment 将被忽略。
支持下列操作数:
要调用的命令的名称。如果 command 指定了任何特殊的内置实用程序(请参见 shell_builtins(1)),将会产生无法预料的结果。
在调用 command 时作为参数提供的任何字符串。
有关影响 nice 执行的以下环境变量的描述,请参见 environ(5):LANG、LC_ALL、LC_CTYPE、LC_MESSAGES、PATH 和 NLSPATH。
如果调用 command,则 nice 的退出状态将是 command 的退出状态。否则,nice 将以下列值之一退出:
出现错误。
找到了 command,但无法调用。
找不到 command。
有关下列属性的说明,请参见 attributes(5):
|
|
csh(1)、ksh88(1)、nohup(1)、priocntl(1)、sh(1)、shell_builtins(1)、nice(2)、attributes(5)、environ(5)、standards(5)