'\" te .\" Copyright (c) 2004, 2011, Oracle and/or its affiliates.All rights reserved. .\" Copyright 1989 AT&T .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" 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 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.This notice shall appear on any product containing this material. .TH nice 1 "2011 年 7 月 12 日" "SunOS 5.11" "用户命令" .SH 名称 nice \- 调用命令并更改调度优先级 .SH 用法概要 .LP .nf \fB/usr/bin/nice\fR [\fB-\fIincrement\fR\fR | \fB-n\fR \fIincrement\fR] \fIcommand\fR [\fIargument\fR]... .fi .LP .nf \fB/usr/xpg4/bin/nice\fR [\fB-\fIincrement\fR\fR | \fB-n\fR \fIincrement\fR] \fIcommand\fR [\fIargument\fR]... .fi .SS "csh Builtin" .LP .nf \fBnice\fR [\fB-\fIincrement\fR\fR | +\fIincrement\fR] [\fIcommand\fR] .fi .SH 描述 .sp .LP \fBnice\fR 实用程序调用 \fBcommand\fR,并请求其以不同的系统调度优先级运行。\fBpriocntl\fR(1) 命令是更通用的调度程序功能接口。 .sp .LP 调用进程(一般为用户的 shell)必须属于支持 \fBnice\fR 的调度类。 .sp .LP 如果使用了 C shell(请参见 \fBcsh\fR(1)),则必须指定命令的完整路径。否则,将调用 \fBcsh\fR 内置的 \fBnice\fR 版本。请参见下文的\fB\fR“csh Builtin”部分。 .SS "/usr/bin/nice" .sp .LP 如果 \fBnice\fR 执行命令时使用参数,则使用缺省的 shell \fB/usr/bin/sh\fR(请参见 \fBsh\fR(1))。 .SS "/usr/xpg4/bin/nice" .sp .LP 如果 \fBnice\fR 执行命令时使用参数,则使用 \fB/usr/xpg4/bin/sh\fR(请参见 \fBksh88\fR(1))。 .SS "csh Builtin" .sp .LP \fBnice\fR 也是一个 \fBcsh\fR 内置命令,其行为不同于实用程序版本。有关说明,请参见 \fBcsh\fR(1)。 .SH 选项 .sp .LP 支持以下选项: .sp .ne 2 .mk .na \fB\fB-\fR\fIincrement\fR | \fB-n\fR \fIincrement\fR\fR .ad .RS 29n .rt \fIincrement\fR 是一个正的或负的十进制整数,它会影响实用程序的执行,就像实用程序调用了采用 \fIincrement\fR 选项参数数值的 \fBnice()\fR 函数一样。请参见 \fBnice\fR(2)。\fBnice()\fR 错误将被忽略,但 \fBEINVAL\fR 除外。如果不指定,则采用增量 \fB10\fR。 .sp 通过使用负增量(如 \fB–10\fR),超级用户可以用高于正常优先级的优先级运行命令。非特权用户指定的负 \fIincrement\fR 将被忽略。 .RE .SH 操作数 .sp .LP 支持下列操作数: .sp .ne 2 .mk .na \fB\fIcommand\fR\fR .ad .RS 12n .rt 要调用的命令的名称。如果 \fIcommand\fR 指定了任何特殊的内置实用程序(请参见 \fBshell_builtins\fR(1)),将会产生无法预料的结果。 .RE .sp .ne 2 .mk .na \fB\fIargument\fR\fR .ad .RS 12n .rt 在调用 \fIcommand\fR 时作为参数提供的任何字符串。 .RE .SH 环境变量 .sp .LP 有关影响 \fBnice\fR 执行的以下环境变量的说明,请参见 \fBenviron\fR(5):\fBLANG\fR、\fBLC_ALL\fR、\fBLC_CTYPE\fR、\fBLC_MESSAGES\fR、\fBPATH\fR 和 \fBNLSPATH\fR。 .SH 退出状态 .sp .LP 如果调用 \fIcommand\fR,则 \fBnice\fR 的退出状态将是 \fIcommand\fR 的退出状态。否则,\fBnice\fR 将以下列值之一退出: .sp .ne 2 .mk .na \fB\fB1-125\fR\fR .ad .RS 9n .rt 出现错误。 .RE .sp .ne 2 .mk .na \fB\fB126\fR\fR .ad .RS 9n .rt 找到了 \fIcommand\fR,但无法调用。 .RE .sp .ne 2 .mk .na \fB\fB127\fR\fR .ad .RS 9n .rt 找不到 \fIcommand\fR。 .RE .SH 属性 .sp .LP 有关下列属性的说明,请参见 \fBattributes\fR(5): .SS "/usr/bin/nice" .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性类型属性值 _ 可用性system/core-os _ CSIEnabled(已启用) .TE .SS "/usr/xpg4/bin/nice" .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性类型属性值 _ 可用性system/xopen/xcu4 _ CSIEnabled(已启用) _ 接口稳定性Committed(已确定) _ 标准请参见 \fBstandards\fR(5)。 .TE .SH 另请参见 .sp .LP \fBcsh\fR(1)、\fBksh88\fR(1)、\fBnohup\fR(1)、\fBpriocntl\fR(1)、\fBsh\fR(1)、\fBshell_builtins\fR(1)、\fBnice\fR(2)、\fBattributes\fR(5)、\fBenviron\fR(5)、\fBstandards\fR(5)