Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ps(C) — OpenDesktop 1.1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(C)

nice(C)


     PS(C)                                UNIX System V



     Name
          ps - reports process status


     Syntax
          ps [ options ]


     Description
          ps  prints  certain  information  about  active   processes.
          Entering  ps  without any options calls up information about
          processes  associated  with  the  current   terminal.    The
          following options control the amount and type of information
          displayed.


     Options
          -e          Prints information about all processes.

          -d          Prints information about all  processes,  except
                      process group leaders.

          -a          Prints information about all  processes,  except
                      process   group   leaders   and   processes  not
                      associated with a terminal.

          -f          Generates a full  listing.   Normally,  a  short
                      listing  containing  only  process  ID, terminal
                      (``tty'') identifier, cumulative execution time,
                      and  the  command name is printed.  Under the -f
                      option, ps tries  to  determine  and  print  the
                      process'  original  command  name and arguments.
                      If  it  cannot,  it  prints  the  short  listing
                      version   of  the  command  name  within  square
                      brackets.  See below for the meaning of  columns
                      in a full listing.

          -l          Generates  a  long  listing,  including  status,
                      priority, location, and memory usage information
                      for each process.

          -t tlist    Restricts listing to data  about  the  processes
                      associated  with  the  terminals given in tlist,
                      where tlist can be in one of two forms:  a  list
                      of   terminal  identifiers  separated  from  one
                      another by  a  comma,  or  a  list  of  terminal
                      identifiers   enclosed   in  double  quotes  and
                      separated from one another by a comma and/or one
                      or more spaces.

          -p plist    Restricts listing to data about processes  whose
                      process  ID  numbers  are  given in plist, where
                      plist is in the same format as tlist.

          -u ulist    Restricts listing to data about processes  whose
                      user  ID  numbers  or  login  names are given in
                      ulist, where ulist is  in  the  same  format  as
                      tlist.  In the listing, the numerical user ID is
                      printed unless the -f option is used,  in  which
                      case the login name is printed.

          -g glist    Restricts listing to data about processes  whose
                      process  groups  are given in glist, where glist
                      is a list of process group leaders and is in the
                      same format as tlist.

          -s swapdev  Uses the file swapdev  in  place  of  /dev/swap.
                      This is useful when examining a corefile.

          -n namelist The  argument  is  taken  as  the  name  of   an
                      alternate namelist (/unix is the default).


     Display Columns
          The column headings and the meaning of the columns in  a  ps
          listing  are  given  below; the letters f and l indicate the
          option (full or long) that causes the corresponding  heading
          to  appear; all means that the heading always appears.  Note
          that these two options only determine  what  information  is
          provided   for  a  process;  they  do  not  determine  which
          processes will be listed.

     F     (l)
                          A status word consisting of flags associated
                          with  the  process.  Each flag is associated
                          with a bit in the status word.  These  flags
                          are  added  to  form  a single octal number.
                          Process flag bits and their meanings are:
                              01    in core;
                              02    system process;
                              04    locked in core (e.g., for physical
                                    I/O);
                              10    being swapped;
                              20    being traced by another process.

     S     (l)

          The state of the process:
                              0     non-existent;
                              S     sleeping;
                              R     running;
                              I     intermediate;
                              Z     terminated;
                              T     stopped;
                              B     waiting.

     UID   (f,l)

          The user ID number of the process owner; the login  name  is
          printed  under  the  -f  option.   Login names are truncated
          after 7 characters.
     PID   (all)

          The process ID; used when killing a process (see kill(C)).
     PPID  (f,l)

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

          Processor utilization for scheduling.
     STIME (f)

          Starting time of the process.
     PRI   (l)

          The priority of  the  process;  higher  numbers  mean  lower
          priority.
     NI    (l)

          Nice value; used in priority computation.
     ADDR1,

     ADDR2 (l)

          The memory addresses (physical page frame numbers) of u-area
          of  the  process,  if resident; otherwise, the disk address.
          ADDR1 gives the frame number of the first  half  of  the  u-
          area, and ADDR2 gives the number of the second half.
     SZ    (l)

          The size in blocks of the core image of the process, but not
          including  the  size  of  text  shared with other processes.
          Since this size includes the current size of the  stack,  it
          will vary as the stack size varies.
     WCHAN (l)

          The event for which the process is waiting or  sleeping;  if
          blank, the process is running.
     TTY   (all)

          The controlling terminal for the process.
     TIME  (all)

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

          The command name; the full command name  and  its  arguments
          are printed under the -f option.
          A process that has exited and has a parent, but has not  yet
          been waited for by the parent, is marked <defunct>.


     Files
          /unix     system namelist

          /dev/mem  memory

          /dev      searched  to  find  swap   device   and   terminal
                    (``tty'') names.


     See Also
          kill(C), nice(C)


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

          Some data printed for defunct processes are irrelevant.


     Authorization
          The behavior of this utility is affected  by  assignment  of
          the  mem authorization, which is usually reserved for system
          administrators.  If you do not have this authorization,  the
          output  will  be  restricted  to  data  pertaining  to  your
          activities only.  Refer to the ``Using  a  Trusted  System''
          chapter of the User's Guide for more details.


     Standards Conformance
          ps is conformant with:
          AT&T SVID Issue 2, Select Code 307-127;
          and The X/Open Portability Guide II of January 1987.


     (printed 2/15/90)                                      PS(C)












































































































































































































































































































































































































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