Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ps(1) — UTek 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(1)

w(1)

cvt(4)



PS(1)                   COMMAND REFERENCE                   PS(1)



NAME
     ps - process status

SYNOPSIS
     ps [ -a ] [ -c ] [ -e ] [ -f swapfile ] [ -g ] [ -k corefile
     ] [ -l ] [ -n namelist ]
     [ -p proclist ] [ -s ] [ -t termlist ] [ -u ] [ -v ] [ -w ]
     [ -x ]

DESCRIPTION
     Ps prints information about processes.  Normally, only the
     current user's processes are included in the output (see the
     -a option described below).

     All output formats include, for each process, the process id
     PID, the control terminal of the process TT, the cpu time
     used by the process TIME (this includes both user and system
     time), the state of the process STAT, and an indication of
     the COMMAND which is running.

     The state is given by a sequence of four letters, e.g. RWNA.
     The first letter indicates the runnability of the process: R
     for runnable processes, T for stopped processes, P for
     processes in page wait, D for those in disk (or other short
     term) waits, S for those sleeping for less than about 20
     seconds, and I for idle (sleeping longer than about 20
     seconds) processes.  The second letter indicates whether a
     process is swapped out, showing W if it is, or a blank if it
     is loaded (in-core); a process which has specified a soft
     limit on memory requirements and which is exceeding that
     limit shows   >   (such a process is necessarily not
     swapped).

     The third letter indicates whether a process is running with
     altered CPU scheduling priority (nice); if the process
     priority is reduced, an N is shown, if the process priority
     has been artificially raised then a   <   is shown;
     processes running without special treatment have just a
     blank.  The final letter indicates any special treatment of
     the process for virtual memory replacement.  Currently the
     possibilities are A (VA_ANOM), S (VA_SEQL), and a blank
     (VA_NORM).  An A typically represents a lisp program in
     garbage collection; S is typical of large image processing
     programs which are using virtual memory to sequentially
     address voluminous data.

OPTIONS
     -a Asks for information about all processes with terminals
        (ordinarily only one's own processes are displayed).

     -c Prints the command name, as stored internally in the
        system for purposes of accounting, rather than the



Printed 5/12/88                                                 1





PS(1)                   COMMAND REFERENCE                   PS(1)



        command arguments, which are kept in the process' address
        space.  This is more reliable, if less informative, since
        the process is free to destroy the latter information.

     -e Asks for the environment to be printed as well as the
        arguments to the command.

     -f swapfile
        Swapfile is used as the name of a swap file to use
        instead of the default /dev/drum.

     -g Asks for all processes.  Without this option, ps only
        prints interesting processes.  Processes are deemed to be
        uninteresting if they are process group leaders.  This
        normally eliminates top-level command interpreters and
        processes waiting for users to login on free terminals.

     -k corefile
        Causes corefile, a core image of the kernel, to be used
        in place of /dev/kmem and /dev/mem.  This is used for
        postmortem system debugging.

     -l Asks for a long listing, with fields F, UID, PPID, CP,
        PRI, NI, ADDR, SIZE, RSS and WCHAN, as described in this
        document.

     -n namelist
        The file namelist is used as the file containing the
        system's namelist, where kernel symbols are obtained.
        Otherwise, kernel symbols are obtained from the table
        /dev/cvt (see cvt(4)).

     -p proclist
        The output is restricted to data about processes whose
        process ID's are given in proclist. Proclist is a list of
        process ID's separated from one another by a comma, or a
        list of process ID's enclosed in double quotes and
        separated from one another by a comma and/or one or more
        spaces.

     -s Adds the size SSIZ of the kernel stack of each process
        (for use by system maintainers) to the basic output
        format.

     -t termlist
        The output is restricted to data about processes whose
        controlling tty's are specified in termlist. Termlist is
        a list of tty's separated from one another by a comma, or
        a list of tty's enclosed in double quotes and separated
        from one another by a comma and/or one or more spaces.
        Tty's may be specified in one of two forms: the device's
        file name (e.g. tty04) or if the device's file name



Printed 5/12/88                                                 2





PS(1)                   COMMAND REFERENCE                   PS(1)



        starts with tty, just the digit identifier (e.g. 04).

     -u A user-oriented output is produced.  This includes fields
        USER, %CPU, %MEM, SIZE, and RSS as described in this
        document.

     -v A version of the output containing virtual memory
        statistics is output.  This includes fields SL, RE,
        PAGEIN, SIZE, RSS, LIM, TSIZ, TRS, %CPU and %MEM,
        described below.

     -w Use a wide output format (132 columns rather than 80); if
        repeated, e.g. ww, use arbitrarily wide output.  This
        information is used to decide how much of long commands
        to print.

     -x Asks about processes with no terminal.

     Fields which are not common to all output formats:

          USER   name of the owner of the process

          %CPU   cpu utilization of the process; this is a
                 decaying average over up to a minute of previous
                 (real) time.  Since the time base over which
                 this is computed varies (since processes may be
                 very young) it is possible for the sum of all
                 %CPU fields to exceed 100%.

          NI     process scheduling increment (see
                 setpriority(2)).

          SIZE   virtual size of the process in pages (see
                 getpagesize(2)).

          RSS    real memory (resident set) size of the process
                 in pages (see getpagesize(2)).

          LIM    soft limit on memory used, specified via a call
                 to setrlimit(2); if no limit has been specified
                 then show as xx.

          TSIZ   size of text (shared program) image.

          TRS    size of resident (real memory) set of text.

          %MEM   percentage of real memory used by this process.

          RE     residency time of the process (seconds in core).

          SL     sleep time of the process (seconds blocked).




Printed 5/12/88                                                 3





PS(1)                   COMMAND REFERENCE                   PS(1)



          PAGEIN number of disk i/o's resulting from references
                 by the process to pages not loaded in core.

          UID    numerical user-id of process owner.

          PPID   numerical id of parent of process.

          CP     short-term cpu utilization factor (used in
                 scheduling).

          PRI    process priority (non-positive when in non-
                 interruptible wait).  Note: This is a different
                 number than the priority for the nice command
                 and the setpriority(2) function call.

          ADDR   swap address of the process.

          WCHAN  event on which process is waiting (an address in
                 the system), with the initial two digits of the
                 address trimmed off, e.g. 81004000 prints as
                 4000.

          F      flags associated with process as in
                 <sys/proc.h>:


           SLOAD     0000001   in core
           SSYS      0000002   swapper or pager process
           SLOCK     0000004   process being swapped out
           SSWAP     0000008   save area flag
           STRC      0000010   process is being traced
           SWTED     0000020   another tracing flag
           SULOCK    0000040   user settable lock in core
           SPAGE     0000080   process in page wait state
           SKEEP     0000100   another flag to prevent swap out
           SOMASK    0000200   restore old mask after taking signal
           SWEXIT    0000400   working on exiting
           SPHYSIO   0000800   doing physical i/o (bio.c)
           SVFORK    0001000   process resulted from vfork()
           SVFDONE   0002000   another vfork flag
           SNOVM     0004000   no vm, parent in a vfork()
           SPAGI     0008000   init data space on demand from inode
           SSEQL     0010000   user warned of sequential vm behavior
           SUANOM    0020000   user warned of anomalous vm behavior
           STIMO     0040000   timing out during sleep
           SOUSIG    0100000   using old signal mechanism
           SOWEUPC   0200000   owe process an addupc() call at next ast
           SSEL      0400000   selecting; wakeup/waiting danger
           SLOGIN    0800000   a login process (legit child of init)
           SPTECHG   1000000   pte's for process have changed





Printed 5/12/88                                                 4





PS(1)                   COMMAND REFERENCE                   PS(1)



          A process that has exited and has a parent, but has not
          yet been waited for by the parent is marked <defunct>;
          a process which is blocked trying to exit is marked
          <exiting>.  Ps makes an educated guess as to the file
          name and arguments given when the process was created
          by examining memory or the swap area.  The method is
          inherently somewhat unreliable and in any event a
          process is entitled to destroy this information, so the
          names cannot be counted on too much.

FILES
     /dev/cvt  Table of kernel symbols

     /dev/kmem Kernel memory

     /dev/drum Swap device

     /dev      Searched to find swap device and tty names

DIAGNOSTICS
     The diagnostices produced by ps are intended to be self-
     explanatory.

RETURN VALUE
     [NO_ERRS]      Command completed without error.

     [NP_WARN]      An error warranting a warning message
                    occurred. Execution continues.

     [NP_ERR]       An error occurred that was not a system
                    error.  Execution terminated.

     [P_ERR]        A system error occurred. Execution
                    terminated.  See intro(2) for more
                    information on system errors.

CAVEATS
     Things can change while ps is running; the picture it gives
     is only a close approximation to reality.

     For compatibility, the "old" ps syntax is also supported.
     This syntax is:

          ps [ acegklsuvwx[#|tn] [ namelist [ corefile [ swapfile ] ] ] ]

SEE ALSO
     kill(1), w(1), and cvt(4).








Printed 5/12/88                                                 5





































































%%index%%
na:192,71;
sy:263,663;
de:926,2085;
op:3011,364;3639,2700;6603,2096;8963,2384;11611,578;
fi:12189,259;
di:12448,223;
rv:12671,571;
ca:13242,393;
se:13635,138;
%%index%%000000000192

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