Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ps(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(1)

nice(1)

priocntl(1)

renice(1)

sh(1)

getty(1M)

ps(1)                                                                 ps(1)

NAME
     ps - report process status

SYNOPSIS
     ps [-aAdeflcjx] [-g grplist] [-G grplist] [-o format] [-p proclist]
        [-t termlist] [-u uidlist] [-U uidlist] [-s sesslist]

DESCRIPTION
     ps outputs information about active processes. This report represents
     a snapshot of the system or process status at a given moment and could
     be outdated within a split-second, so it may not reflect the actual
     situation by the time it is displayed.

OPTIONS
     No option specified:
          ps outputs information about processes associated with the
          current terminal and whose effective user ID corresponds to the
          user ID of the caller. The output consists of a short listing
          comprising:

          -  the process ID (PID)

          -  the terminal identifier (TTY)

          -  the cumulative execution time (TIME)

          -  the command name (CMD).

          The significance of the output columns is explained in the sec-
          tion entitled OUTPUT.

     -a   Outputs information about all processes associated with a termi-
          nal, except process group leaders.

     -A   Outputs information about all processes. Similar to -e.

     -c   Also outputs information relating to process class and priority
          [see priocntl(1)].

     -d   Outputs information about all processes associated with a termi-
          nal as well as those which are not. Process group leaders are not
          taken into account.

     -e   Outputs information about all processes. Similar to -A.

     -f   Outputs a full listing with supplementary information on each
          process. The columns displayed in a full listing are explained in
          more detail in the section entitled OUTPUT.

          If -f is specified, ps outputs the command name and arguments.
          However, the arguments are displayed only if the process belongs
          to the user who called ps, or if ps was called by root.



Page 1                       Reliant UNIX 5.44                Printed 11/98

ps(1)                                                                 ps(1)

          If the command name for the process contains non-printing charac-
          ters, the command name is enclosed within square brackets [...].
          If the -f option is specified without other options, the informa-
          tion output refers to processes associated with the controlling
          terminal.

     -g grplist
          Restricts listing to data about processes whose process group
          leaders are given in grplist.

          grplist
               grplist is a list containing the process ID numbers of pro-
               cess group leaders. This list can be specified in one of two
               forms: a comma-separated list of numbers, or a list of
               numbers enclosed in double quotes with the numbers separated
               by commas and/or blanks.

     -G grplist
          same as -g with specification of the real group ID.

     -j   Outputs the session ID and the process group ID.

     -l   Outputs a long listing with detailed information on each process.
          The output columns in a long listing are explained in the section
          entitled OUTPUT. If the -l option is specified without other
          options, the information output refers to processes associated
          with the controlling terminal. The -x option can be specified for
          64-bit systems (see also this option).

     -o format
          (o - output) Defines the output format. Several -o options can be
          specified. The specified formats are then output one after the
          other.

          format
               format is a list of variables and, where applicable, their
               headings for the individual output columns (see OUTPUT).
               format has the following format: The variables are separated
               by a comma, or format is enclosed in quotes "...", whereby
               the variables can then be separated by a comma and/or a
               blank. A new heading text must always appear at the end of
               the list. Additional variables are specified in a further
               option -o.











Page 2                       Reliant UNIX 5.44                Printed 11/98

ps(1)                                                                 ps(1)

     -p proclist
          Restricts listing to data about processes whose process ID
          numbers are given in proclist.

          proclist
               proclist is a list of process ID numbers.

               The numbers must be separated by commas, or alternatively,
               the whole list can be enclosed in double quotes with the
               numbers separated by commas and/or blanks.

     -s sesslist
          Restricts listing to data about processes associated with a ses-
          sion listed in sesslist.

          sesslist
               sesslist is a list of session ID numbers. This list can be
               specified in one of two forms: a comma-separated list of
               numbers, or a list of numbers enclosed in double quotes with
               the numbers separated by commas and/or blanks.

     -t termlist
          Restricts listing to data about the processes associated with the
          terminals named in termlist.

          termlist
               termlist is a list of terminal identifiers which may be
               specified in one of two forms: either the device's file name
               (e.g. term/tty04) or, if the device's file name is con-
               structed with tty, just the digit identifier (e.g. 004).

               The terminal identifiers must be separated by commas, or
               alternatively, the whole list can be enclosed in double
               quotes with the entries separated by commas and/or blanks.

     -u uidlist
          Restricts listing to data about processes whose process owner is
          given in uidlist.

          uidlist
               uidlist is a list of user ID numbers or login names.

               The entries in uidlist must be separated by commas, or
               alternatively, the whole list can be enclosed in double
               quotes with the entries separated by commas and/or blanks.

     -U uidlist
          same as -u with specification of the real user ID.

     -x   This option only works for 64-bit systems. The ADDR and WCHAN
          fields are represented as 64 bits long. The -l option must also
          be set for this option to be effective.


Page 3                       Reliant UNIX 5.44                Printed 11/98

ps(1)                                                                 ps(1)

OUTPUT
   Default output format

     The headings and the meanings of the columns in a ps default listing
     are given below. The letters in parentheses indicate the option that
     causes the corresponding column to appear. "all" means that the column
     appears for all options. Note that options -c, -j, -f and -l determine
     only what information is provided for a process; they do not determine
     which processes will be listed.

     F (l)       Flags (hexadecimal and additive) associated with the pro-
                 cess. These flags are machine-dependent and have therefore
                 been omitted here.

     S (l)       State of the process:

                 0  Process running

                 S  Sleeping: process waiting for an event

                 R  Runnable: process is runnable

                 I  Idle:process being created

                 Z  Zombie state: process is terminated, but its exit
                    status has not yet been queried by the parent with a
                    wait(2) system call

                 T  Traced: traced process stopped by a parent process

                 X  SXBRK state: process waiting for more memory.

     UID (f, l)  (= User ID) The user ID number of the process owner. If
                 the -f option is set, the login name is output instead of
                 the UID.

                 Only the first 7 characters of the user ID are output.

     PID (all)   (= Process ID) The process ID number of the process. Every
                 process is assigned a unique PID when it is created. You
                 can use this number in a kill command, for example, if you
                 want to terminate a particular process.

     PPID (f, l) (= Parent Process ID) The process ID of the parent pro-
                 cess.

     PGID (j)    Process group ID.







Page 4                       Reliant UNIX 5.44                Printed 11/98

ps(1)                                                                 ps(1)

     SID (j)     Session ID.

     C (f, l)    Processor utilization for scheduling.

     CLS (c)     Scheduling class (processes handled by the scheduler).

     PRI (l, c)  Priority of the process. Higher numbers normally mean
                 lower priority. However, if the -c option is specified,
                 higher numbers mean higher priority.

     NI (l)      Nice value, i.e. value by which process priority was
                 changed [see nice(1)]. Only processes in the time-sharing
                 class have a nice value.

     ADDR (l)    Core address (physical page frame number) of the user area
                 if resident; the disk address if swapped out.

     SZ (l)      Size in blocks of the core image of the process.

     WCHAN (l)   Address of the event for which the process is waiting. If
                 the column is blank, the process is running.

     STIME (f)   Starting time of the process. The time is output within
                 the first 24 hours; thereafter, the date.

     TTY (all)   The controlling terminal for the process. A ? is output
                 when there is no controlling terminal.

     TIME (all)  The cumulative execution time for the process in minutes
                 and seconds.

     CMD (all)   The command name. If the -f option is specified, the full
                 command name and its arguments are output.

                 Processes which have terminated, but whose exit status has
                 not yet been queried by the parent with a wait() system
                 call, is marked <defunct>.

















Page 5                       Reliant UNIX 5.44                Printed 11/98

ps(1)                                                                 ps(1)

     If termlist, proclist, uidlist, or grplist is not specified, ps will
     try to determine the controlling terminal by checking the standard
     input, standard output, and standard error in that order. It will then
     report on the processes associated with the controlling terminal. If
     the above three channels are all redirected, ps will not find a con-
     trolling terminal and hence not produce a report.

   User-defined output format

     You can create your own output format using the -o option. Each column
     of the output format is represented by one of the variables listed
     below.

     The heading assigned by default can be changed by entering an equals
     sign after the variable and then specifying the text for the heading.

          Example: -o user=username

     A new heading text must always appear at the end of the list of vari-
     ables. Further variables can then be specified using the -o option.

     The fields defined with the -o option are output in the specified
     sequence. The field lengths are at least as long as the defined head-
     ing text. If the new heading text is empty (e.g. -o user=), the field
     length corresponds to at least the default heading. If all of the
     heading texts are empty, no heading lines are output.

     ruser Real user number of the process owner. Where possible, the login
           name is output instead of the UID.

           Default heading: RUSER

     user  Effective user number of the process owner. Where possible, the
           login name is output instead of the UID.

           Default heading: USER

     rgroup
           Real ID of the process group. Where possible, the group name is
           is output instead of the GID.

           Default heading: RGROUP

     group Effective ID of the process group. Where possible, the group
           name is output instead of the GID.

           Default heading: GROUP







Page 6                       Reliant UNIX 5.44                Printed 11/98

ps(1)                                                                 ps(1)

     pid   Process ID number (decimal).

           Default heading: PID

     ppid  Process ID number of the father process (decimal).

           Default heading: PPID

     pgid  ID number of the process group (decimal).

           Default heading: PGID

     pcpu  Ratio of CPU time already used to time still available, speci-
           fied in percent.

           Default heading: %CPU

     vsz   Size of the process in the virtual memory in Kbytes.

           Default heading: VSZ

     nice  Priority value of the process (decimal) [see nice(1)].

           Default heading: NI

     etime Time expired since the start of the process. The time is speci-
           fied in the following format:

           [[dd-]hh:]mm:ss

           dd stands for the number of days, hh for the number of hours, mm
           for the number of minutes, and ss for the number of seconds.

           Default heading: ELAPSED

     time  CPU time expired since the start of the process. The time is
           specified in the following format:

           [dd-]hh:mm:ss

           dd stands for the number of days, hh for the number of hours, mm
           for the number of minutes, and ss for the number of seconds.

           Default heading: TIME

     tty   Data display terminal controlling the process.

           Default heading: TT






Page 7                       Reliant UNIX 5.44                Printed 11/98

ps(1)                                                                 ps(1)

     comm  Name of the executed command.

           Default heading: COMMAND

     args  Name of the executed command with all arguments. The list of
           arguments can be truncated for space reasons.

           Default heading: COMMAND

EXAMPLES
     ps is called with the -l option to display a long listing of informa-
     tion on all active processes on the controlling terminal:

     $ ps -l

      F S   UID   PID  PPID  C PRI NI     ADDR     SZ    WCHAN TTY     TIME CMD
     10 S   110  1455  1453  0  30 20 c0fec9d8     23 d114f200 tty004  0:02 sh
     10 O   110  1862  1455 12  50 20 c0fec870     60          tty004  0:00 ps
     18 S   110  1858  1455 10  20 20 c0fecaf8     55 d115f280 tty004  1:03 find

     The find command is now to be terminated by calling kill with the pro-
     cess ID number displayed in the PID column. A subsequent call to ps
     then confirms that the corresponding process no longer exists.

     $ kill 1858
     $ ps

        PID TTY      TIME COMD
       1455 tty004   0:02 sh
       1873 tty004   0:00 ps
     1858 Terminated

LOCALE
     The LCMESSAGES environment variable governs the language in which
     message texts are displayed.

     LCTIME governs the format of time strings when used in conjunction
     with the -f option.

     LCCOLLATE governs the collating sequence.

     If LCMESSAGES, LCTIME or LCCOLLATE is undefined or is defined as
     the null string, it defaults to the value of LANG. If LANG is likewise
     undefined or null, the system acts as if it were not international-
     ized.

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

     If any of the locale variables has an invalid value, the system acts
     as if none of the variables was set.


Page 8                       Reliant UNIX 5.44                Printed 11/98

ps(1)                                                                 ps(1)

NOTES
     If an I/O-intensive process is running, it may not be recognized by ps
     because the accompanying data is locked.

FILES
     /dev/sxt/*
          Special files for virtual tty devices

     /dev/term/tty*
          Special files for terminal interfaces

     /dev/xt/*
          Special files for multiplex mode

     /etc/passwd
          Information on login names

     /etc/psdata
          Contains internal data structures

     /proc
          Process file system

SEE ALSO
     kill(1), nice(1), priocntl(1), renice(1), sh(1), getty(1M).





























Page 9                       Reliant UNIX 5.44                Printed 11/98

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