Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nice(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ps(1)

nohup(1)

priocntl(1)

renice(1)

nice(2)

nice(1)                                                             nice(1)

NAME
     nice - run a command at low priority (be nice)

SYNOPSIS
     nice [-n increment] [--] command

DESCRIPTION
     nice can be used to influence the priority with which a command is
     executed. The priority of a process determines when it is allocated to
     the next available processor. High priority values correspond to low
     priorities and vice versa. Priority values are defined by means of
     various parameters:

     -  the time a process has been allocated to the processor

     -  the time a process has been waiting for the processor

     -  the value you specify in the nice command line.

     The invoking process (generally the user's shell) must be in the
     time-sharing scheduling class [see priocntl(1)]. The specified command
     is executed in the time-sharing class.

     If you are not a system administrator, you can only use nice to
     increase the priority number, i.e. to decrease the priority of the
     process (this is known as being "nice" to other users).

     A system administrator can also reduce the priority number and thus
     increase the priority.

OPTIONS
     -n increment
          Determines the priority for command. increment is an integer.

          For users without special privileges:
               The increment argument lies in the range 1-19. The priority
               number is increased, i.e. the specified command is run with
               a lower priority. nice treats an increment greater than 19
               as equivalent to 19.

          For the system administrator only:
               increment lies in the range -20 to 19. Negative increments
               decrease the priority number and hence raise the correspond-
               ing priority. nice treats an increment that is less than -20
               as equivalent to -20.

          It treats an increment greater than 19 as equivalent to 19.

          This corresponds to the old option -increment which is still sup-
          ported.

          Included in the output of the ps -l command is the NI column.



Page 1                       Reliant UNIX 5.44                Printed 11/98

nice(1)                                                             nice(1)

          This column displays a numeric value between 0 and 39, where:

          0   corresponds to nice -n -20

          39  corresponds to nice -n 19

          -n not specified: An increment of 10 is assumed by default.

     --   If command begins with a dash (-), the end of the command-line
          options must be marked with --.

     command
          Any command or shell script.

EXIT STATUS
     nice returns the exit status of the executed command. Otherwise it
     returns one of the following values:

     1-125  An error occurred with the command nice.

     126    The specified command exists but cannot be executed.

     127    The specified command could not be found.

LOCALE
     The LCMESSAGES environment variable governs the language in which
     message texts are displayed. If LCMESSAGES is undefined or is defined
     as the null string, it defaults to the value of LANG. If LANG is like-
     wise undefined or null, the system acts as if it were not internation-
     alized.

     The LCALL environment variable governs the entire locale. LCALL
     takes precedence over all the other environment variables which affect
     internationalization.

EXAMPLES

     Example 1

     The command ps -ale is to run with lower priority:

     $ nice -n 15 ps -ale

     Example 2

     The system administrator now runs the same command with increased
     priority:

     # nice -n -5 ps -ale

SEE ALSO
     ps(1), nohup(1), priocntl(1), renice(1), nice(2).


Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026