OOPS(8)                                                   OOPS(8)

          oops - process status

          oops [ acegklstuvwx# ] [ core ] [ swap ] [ namelist ]

          Oops prints information about processes.  Normally, only the
          invoker's processes are candidates to be printed by oops.
          Specifying a causes other user's processes to be candidates
          to be printed; specifying x includes processes without con-
          trol terminals in the candidate pool.

          All output formats include, for each process, the process id
          PID, control terminal of the process TT, cpu time used by
          the process TIME (this includes both user and system time),
          the state STAT of the process, and an indication of the com-
          mand 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 a runnable process, T for
          a stopped process, P for a process in page wait, D for one
          in disk (or other short term) wait, S for one sleeping for
          less than about 20 seconds, and I for an idle (sleeping
          longer than about 20 seconds) process.  The second letter is
          W if the process is swapped out, blank if it is resident in
          memory.  The third letter is a blank if the process is run-
          ning with normal scheduling priority, N if the priority is
          reduced (nice), < if the priority is raised.  The final let-
          ter is an A if special paging behaviour has been requested.

          Here are the options:

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

          c    causes the system's internal idea of the command name
               to be used, rather than the command arguments 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 (environ(7)) to be printed.

          g    includes process group leaders (usually shells) which
               are normally excluded.

          k    causes the file /vmcore is used in place of /dev/kmem
               and /dev/mem.  This is used for postmortem system

     OOPS(8)                                                   OOPS(8)

          l    asks for a long listing, with fields PPID, CP, PRI, NI,
               ADDR, SIZE, RSS and WCHAN as described below.

          s    adds the size SSIZ of the kernel stack of each process
               (for use by system maintainers) to the basic output

          tx   restricts output to processes whose controlling tty is
               x (which should be specified as printed by oops, e.g.
               t3 for tty3, tco for console, td0 for ttyd0, t? for
               processes with no tty, etc).  This option must be the
               last one given.

          u    allegedly user oriented output is produced.  This
               includes fields USER, %CPU, NICE, SIZE, and RSS as
               described below.

          v    virtual memory statistics; includes fields RE, SL,
               PAGEIN, SIZE, RSS, SRS, TSIZ, TRS, %CPU and %MEM,
               described below.

          w    use a wide output format (132 columns rather than 80);
               if repeated, use arbitrarily wide output.  This infor-
               mation is used to decide how much of long argument
               lists to print.

          x    asks about even processes with no terminal.

          #    A process number may be given, in which case the output
               is restricted to that process.  This option must also
               be last.

          A second argument tells oops where to look for core if the k
          option is given, instead of /vmcore. A third argument is the
          name of a swap file to use instead of the default /dev/drum.
          If a fourth argument is given, it is taken to be the file
          containing the system's namelist.  Otherwise, /unix is used.

          Fields which are not common to all output formats:
          USER      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 com-
                    puted varies (since processes may be very young)
                    it is possible for the sum of all %CPU fields to
                    exceed 100%.
          NICE      (or NI) process scheduling increment (see nice(2))
          SIZE      virtual size of the process (in 1024 byte units)
          RSS       real memory (resident set) size of the process (in
                    1024 byte units)
          SRS       number of real memory pages (RSS) if and when

     OOPS(8)                                                   OOPS(8)

          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)
          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
          PRI       process priority (non-positive when in non-
                    interruptible wait)
          ADDR      swap address of the process
          WCHAN     event on which process is waiting (an address in
                    the system), with the initial part of the address
                    trimmed off; e.g. 0x80004000 prints as 4000.

          F         flags associated with process as in
                SLOAD       000001  in core
                SSYS        000002  swapper or pager process
                SLOCK       000004  process being swapped out
                SSWAP       000008  save area flag
                STRC        000010  process is being traced
                SWTED       000020  another tracing flag
                SULOCK      000040  user settable lock in core
                SPAGE       000080  process in page wait state
                SKEEP       000100  another flag to prevent swap out
                SDLYU       000200  delayed unlock of pages
                SWEXIT      000400  working on exiting
                SPHYSIO     000800  doing physical i/o (bio.c)
                SPAGI       008000  init data space on demand, from inode
                SSEQL       010000  user warned of sequential vm behavior
                SUANOM      020000  user warned of anomalous vm behavior
                STIMO       040000  timing out during sleep
                SDETACH     080000  detached inherited by init
                SNUSIG      100000  using new signal mechanism

          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>.  Oops
          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.

          /unix         system namelist
          /dev/kmem     kernel memory
          /dev/drum     swap device

     OOPS(8)                                                   OOPS(8)

          /vmcore       core file
          /dev          searched to find swap device and tty names

          kill(1), ps(1), pstat(8)

          Things can change while oops is running; the picture it
          gives is only a close approximation to reality.
          Oops duplicates ps(1); it is useful mainly for examining
          kernel crash dumps, or when /proc is not mounted.