Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ps(1) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getty(1M)

kill(1)

nice(1)

priocntl(1)






       ps(1)                                                          ps(1)


       NAME
             ps - report process status

       SYNOPSIS
             ps [options]

       DESCRIPTION
             The ps command prints information about active processes and
             lightweight processes, or LWPs.  Without options, ps prints
             information about processes associated with the controlling
             terminal.  The output contains only the process ID, terminal
             identifier, cumulative execution time, and the command name.
             Otherwise, the information that is displayed is controlled by
             the options.

             Some options accept lists as arguments.  Items in a list can
             be either separated by commas or else enclosed in double
             quotes and separated by commas or spaces.  Values for proclist
             and grplist must be numeric.

             The options are:

             -e          Print information about every process now running.
             -d          Print information about all processes except
                         session leaders.
             -a          Print information about all processes most
                         frequently requested: all those except session
                         leaders and processes not associated with a
                         terminal.
             -j          Print session ID and process group ID.
             -f          Generate a full listing.  (See below for
                         significance of columns in a full listing.)
             -l          Generate a long listing.  (See below.)
             -L          Print status of active LWPs within a process.
             -P          Print the processor number on which an LWP is
                         running when the LWP has been explicitly bound by
                         a user.
             -y          Must be combined with -l option.  Changes the long
                         listing: prints the RSS and SZ fields in kilobytes
                         and does not print the F and ADDR fields.
             -c          Print information in a format that reflects
                         scheduler properties as described in priocntl(1).
                         The -c option affects the output of the -f and -l
                         options, as described below.




                           Copyright 1994 Novell, Inc.               Page 1













      ps(1)                                                          ps(1)


            -t termlist List only process data associated with the
                        terminal given in termlist.  Terminal identifiers
                        may be specified in one of two forms: the device's
                        file name (for example, term/04) or, if the
                        device's file name starts with term, just the
                        digit identifier (for example, 04).
            -p proclist List only process data whose process ID numbers
                        are given in proclist.
            -u uidlist  List only process data whose user ID number or
                        login name is given in uidlist.  In the listing,
                        the numerical user ID will be printed unless you
                        give the -f option, which prints the login name.
            -g grplist  List only process data whose group leader's ID
                        number(s) appears in grplist.  (A group leader is
                        a process whose process ID number is identical to
                        its process group ID number.
            -s sesslist List information on all session leaders whose IDs
                        appear in sesslist.

            Under the -f option, ps tries to determine the command name
            and arguments given when the process was created by examining
            the user block.  Failing this, the command name is printed, as
            it would have appeared without the -f option, in square
            brackets.

            The column headings and the meaning of the columns in a ps
            listing are given below; the letters f and l identify the
            option (full or long, respectively) that causes the
            corresponding heading to appear; all means that the heading
            always appears.
            Note that these two options 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 process, or the LWP if the -L option
                            is specified.

                               00    Process has terminated: process table
                                     entry now available.
                               01    A system process: always in primary
                                     memory.
                               02    Parent is tracing process.
                               04    Tracing parent's signal has stopped
                                     process: parent is waiting
                                     [ptrace(2)].


                          Copyright 1994 Novell, Inc.               Page 2













       ps(1)                                                          ps(1)


                                08    Process is currently in primary
                                      memory.
                                10    Process currently in primary memory:
                                      locked until an event completes.
                                20    Process cannot be swapped.

             S     (l)       The state of the process, or the LWP if the -L
                             option is specified:

                                O     Process is running on a processor.
                                S     Sleeping: process is waiting for an
                                      event to complete.
                                R     Runnable: process is on run queue.
                                I     Idle: process is being created.
                                Z     Zombie state: process terminated and
                                      parent not waiting.
                                T     Traced: process stopped by a signal
                                      because parent is tracing it.
                                X     SXBRK state: process is waiting for
                                      more primary memory.

             UID    (f,l)     The user ID number of the process owner of
                              the LWP (the login name is printed under the
                              -f option).

             PID    (all)     The process ID of the LWP (This information
                              is necessary to kill a process).  When a
                              process is multithreaded, a pid appears for
                              each active process.

             PPID   (f,l)     The process ID of the parent process.

             CLS    (f,l)     Scheduling class for the process, or the LWP
                              when the -L option is specified.  Printed
                              only when the -c option is used.

             PRI    (l)       The priority of the process, or the LWP when
                              the -L option is specified.  Without the -c
                              option, higher numbers mean lower priority.
                              With the -c option, higher numbers mean
                              higher priority.

             ADDR   (l)       The memory address of the process.





                           Copyright 1994 Novell, Inc.               Page 3













      ps(1)                                                          ps(1)


            SZ     (l)       The size (in pages or clicks) of the virtual
                             address space of the process.  When the -y
                             option is specified, the size is in
                             kilobytes.

            WCHAN  (l)       The address of an event for which the process
                             is sleeping or in SXBRK state; if blank, the
                             process is running.  For an individual LWP if
                             -L is specified.

            STIME  (f)       The starting time of the process, given in
                             hours, minutes, and seconds.  (A process
                             begun more than twenty-four hours before the
                             ps inquiry is executed is given in months and
                             days.)

            LTIME            The execution time for an individual LWP.

            TTY    (all)     The controlling terminal for the process (the
                             message, ?, is printed when there is no
                             controlling terminal).

            TIME   (all)     The cumulative execution time for the
                             process.

            COMD   (all)     The command name (the full command name and
                             its arguments are printed under the -f
                             option).

            NLWP             The number of LWPs in the process.

            PSR              The processor id of the processor on which
                             the LWP is running when the user has
                             explicitly bound the LWP to a particular
                             processor.  When a ``-'' is listed, the LWP
                             has not been explicitly bound, but is
                             executing on a scheduler-assigned processor.

            RSS              Stable resident set size in kilobytes.

            A process that has exited and has a parent, but has not yet
            been waited for by the parent, is marked <defunct>.

         Files




                          Copyright 1994 Novell, Inc.               Page 4













       ps(1)                                                          ps(1)


             /dev
             /dev/sxt/*
             /dev/term/*
             /dev/xt/*      terminal (``tty'') names searcher files
             /proc/*        process information
             /etc/passwd    UID information supplier
             /etc/ps_data   internal data structure
             /usr/lib/locale/locale/LC_MESSAGES/uxcore
                            language-specific message file [See LANG on
                            environ(5).]

       REFERENCES
             getty(1M), kill(1), nice(1), priocntl(1)

       NOTICES
             Things can change while ps is running; the snap-shot it gives
             is true only for a split-second, and it may not be accurate by
             the time you see it.  Some data printed for defunct processes
             is irrelevant.

             If no termlist, proclist, uidlist, or grplist is specified, ps
             checks stdin, stdout, and stderr in that sequence, looking for
             the controlling terminal and attempts to report on processes
             associated with the controlling terminal.  In this case, if
             stdin, stdout, and stderr are all redirected, ps will not find
             a controlling terminal, so there will be no report.

             ps -ef may not report the start of a tty login session, but
             rather an earlier time, when a getty was last respawned on the
             tty line.

             The -y option has no effect unless combined with the -l
             option.  It is identical to the -x option in System V Release
             4 MP.














                           Copyright 1994 Novell, Inc.               Page 5








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