DragonFly On-Line Manual Pages

Search: Section:  


NICE(1) 	       DragonFly General Commands Manual	       NICE(1)

NAME

nice -- execute a utility at an altered scheduling priority

SYNOPSIS

nice [-n increment] utility [argument ...]

DESCRIPTION

The nice utility runs utility at an altered scheduling priority, by incrementing its ``nice'' value by the specified increment, or a default value of 10. The lower the nice value of a process, the higher its scheduling priority. The superuser may specify a negative increment in order to run a utility with a higher scheduling priority. Some shells may provide a builtin nice command which is similar or iden- tical to this utility. Consult the builtin(1) manual page.

EXIT STATUS

If utility is invoked, the exit status of nice is the exit status of utility. An exit status of 126 indicates utility was found, but could not be exe- cuted. An exit status of 127 indicates utility could not be found.

EXAMPLES

$ nice -n 5 date Execute utility `date' at priority 5 assuming the priority of the shell is 0. # nice -n 16 nice -n -35 date Execute utility `date' at priority -19 assuming the priority of the shell is 0 and you are the super-user.

COMPATIBILITY

The traditional -increment option has been deprecated but is still sup- ported.

SEE ALSO

builtin(1), csh(1), idprio(1), rtprio(1), getpriority(2), setpriority(2), renice(8)

STANDARDS

The nice utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').

HISTORY

A nice utility appeared in Version 4 AT&T UNIX. DragonFly 5.3 June 6, 1993 DragonFly 5.3 NICE(3) DragonFly Library Functions Manual NICE(3)

NAME

nice -- set program scheduling priority

LIBRARY

Standard C Library (libc, -lc)

SYNOPSIS

#include <unistd.h> int nice(int incr);

DESCRIPTION

This interface is obsoleted by setpriority(2). The nice() function obtains the scheduling priority of the process from the system and sets it to the priority value specified in incr. The pri- ority is a value in the range -20 to 20. The default priority is 0; lower priorities cause more favorable scheduling. Only the super-user may lower priorities. Children inherit the priority of their parent processes via fork(2).

RETURN VALUES

Upon successful completion, nice() returns the new nice value. Other- wise, -1 is returned, the process' nice value is not changed, and errno is set appropriately.

ERRORS

The nice() function will fail if: [EPERM] The incr argument is negative and the calling process does not have super-user privileges.

SEE ALSO

nice(1), fork(2), setpriority(2), renice(8)

HISTORY

A nice() syscall appeared in Version 6 AT&T UNIX. DragonFly 5.3 June 25, 2009 DragonFly 5.3

Search: Section: