The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

renice - set system scheduling priorities of running processes

 SYNOPSIS



renice [-n increment][ -g| -p| -u] ID...

renice nice_value[-p] pid...[-g gid...][-p pid...][-u user...]

renice nice_value -g gid...[-g gid...][-p pid...][-u user...]

renice nice_value -u user...[-g gid...][-p pid...][-u user...]


 DESCRIPTION

The renice utility requests that the system scheduling priorities (see the definition of system scheduling priority in the XBD specification, Glossary  ) of one or more running processes be changed. By default, the applicable processes are specified by their process IDs. When a process group is specified (see -g), the request applies to all processes in the process group.

The system scheduling priority is bounded in an implementation-dependent manner. If the requested increment (or nice_value in the obsolescent versions) would raise or lower the system scheduling priority of the executed utility beyond implementation-dependent limits, then the limit whose value was exceeded is used.

When a user is reniced, the request applies to all processes whose saved set-user-ID matches the user ID corresponding to the user.

Regardless of which options are supplied or any other factor, renice will not alter the system scheduling priorities of any process unless the user requesting such a change has appropriate privileges to do so for the specified process. If the user lacks appropriate privileges to perform the requested action, the utility will return an error status.

The saved set-user-ID of the user's process will be checked instead of its effective user ID when renice attempts to determine the user ID of the process in order to determine whether the user has appropriate privileges.

 OPTIONS

The renice utility supports the XBD specification, Utility Syntax Guidelines  . The obsolescent version conforms with the following exceptions:

The following options are supported:

-g
Interpret all operands (or just the gid arguments in the obsolescent version) as unsigned decimal integer process group IDs.
-n increment
Specify how the system scheduling priority of the specified process or processes is to be adjusted. The increment option-argument is a positive or negative decimal integer that will be used to modify the system scheduling priority of the specified process or processes. Positive increment values cause a lower system scheduling priority. Negative increment values may require appropriate privileges and will cause a higher system scheduling priority.
-p
Interpret all operands (or just the pid arguments in the obsolescent version) as unsigned decimal integer process IDs. The -p option is the default if no options are specified.
-u
Interpret all operands (or just the user arguments in the obsolescent version) as users. If a user exists with a user name equal to the operand, then the user ID of that user will be used in further processing. Otherwise, if the operand represents an unsigned decimal integer, it will be used as the numeric user ID of the user.

 OPERANDS

The following operands are supported:
ID
A process ID, process group ID or user name/user ID, depending on the option selected.
nice_value
The value specified is taken as the actual system scheduling priority, rather than as an increment to the existing system scheduling priority. Specifying a scheduling priority higher than that of the existing process may require appropriate privileges.

 STDIN

Not used.

 INPUT FILES

None.

 ENVIRONMENT VARIABLES

The following environment variables affect the execution of renice:
LANG
Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
LC_ALL
If set to a non-empty string value, override the values of all the other internationalisation variables.
LC_CTYPE
Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments).
LC_MESSAGES
Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
NLSPATH
Determine the location of message catalogues for the processing of LC_MESSAGES .

 ASYNCHRONOUS EVENTS

Default.

 STDOUT

Not used.

 STDERR

Used only for diagnostic messages.

 OUTPUT FILES

None.

 EXTENDED DESCRIPTION

None.

 EXIT STATUS

The following exit values are returned:
0
Successful completion.
>0
An error occurred.

 CONSEQUENCES OF ERRORS

Default.

 APPLICATION USAGE

None.

 EXAMPLES

  1. Adjust the system scheduling priority so that process IDs 987 and 32 would have a lower scheduling priority:
    
    renice -n 5 -p 987 32
    
    

  2. Adjust the system scheduling priority so that group IDs 324 and 76 would have a higher scheduling priority, if the user has the appropriate privileges to do so:
    
    renice -n -4 -g 324 76
    
    

  3. Adjust the system scheduling priority so that numeric user ID 8 and user sas would have a lower scheduling priority:
    
    renice -n 4 -u 8 sas
    
    

Useful nice values on historical systems include 19 or 20 (the affected processes will run only when nothing else in the system attempts to run), 0 (the base scheduling priority), and any negative number (to make processes run faster).

 FUTURE DIRECTIONS

None.

 SEE ALSO

nice.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]