4.3BSD-Reno/share/man/cat1/ps.0

Compare this file to the similar file:
Show the results in this format:

PS(1)			    UNIX Reference Manual			 PS(1)

NNAAMMEE
     ppss - display current process status

SSYYNNOOPPSSIISS
     ppss [--aacceeggkkllnnssttuuvvwwxxUU##]

DDEESSCCRRIIPPTTIIOONN
     PPss displays the current process status.  Normally, only your processes
     are candidates to be printed by ppss; specifying --aa causes other users'
     processes to be candidates to be printed; specifying --xx includes
     processes without control terminals in the candidate pool.  While ppss is a
     fairly accurate snapshot of the system, PPss cannot begin and finish a
     snapshot of the system as fast as some processes themselves change state.
     At times there may be minor discrepancies.

     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 in-
     cludes both user and system time), the state STAT of the process, and an
     indication of the COMMAND which is running.  The state is given by a se-
     quence of letters, e.g. ``RWNA''.	The first letter indicates the runna-
     bility 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.  Additional char-
     acters after these, if any, indicate additional state information.  The
     letter W indicates that 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.  An additional letter may
     indicate whether a process is running with altered CPU scheduling priori-
     ty (nice); if the process priority is reduced, an N is shown, if the pro-
     cess priority has been artificially raised then a `<' is shown.  The fi-
     nal optional letter indicates any special treatment of the process for
     virtual memory replacement; the letters correspond to options to the vad-
     vise(2) call; currently the possibilities are A standing for VA_ANOM and
     S for VA_SEQL.  An A typically represents a lisp(1) in garbage collec-
     tion, and S is typical of large image processing programs which are using
     virtual memory to sequentially address voluminous data.

     Here are the options:

     --aa        asks for information regarding processes associated with termi-
	       nals (ordinarily only one's own processes are displayed).

     --cc        prints the command name, as stored internally in the system for
	       purposes of accounting, rather than the command arguments,
	       which are kept in the process' address space.  This is more re-
	       liable, if less informative, since the process is free to des-
	       troy the latter information.

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

     --gg        Asks for all processes.	Without this option, ppss only prints
	       ``interesting'' processes.  Processes are deemed to be unin-
	       teresting if they are process group leaders.  This normally el-
	       iminates top-level command interpreters and processes waiting
	       for users to login on free terminals.

     --kk        causes the file /_v_m_c_o_r_e to be used instead of /_d_e_v/_k_m_e_m and
	       /_d_e_v/_m_e_m for non-interactive (after the fact) debugging.

     --ll        asks for a detailed list, with fields PPID, CP, PRI, NI, ADDR,
	       SIZE, RSS and WCHAN as described below.
     --nn        Asks for numerical output.  In a long listing, the WCHAN field
	       is printed numerically rather than symbolically, or, in a user
	       listing, the USER field is replaced by a UID field.

     --ss        Adds the size SSIZ of the kernel stack of each process (for use
	       by system maintainers) to the basic output format.  _x Only
	       output information on processes whose controlling tty is _x
	       (which should be specified as printed by ppss, e.g.  _t_3 for tty3,
	       _t_c_o for console, _t_d_0 for ttyd0, _t ?  for processes with no tty,
	       _t for processes at the current tty, etc).  This option must be
	       the last one given.

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

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

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

     --xx        asks even about processes with no terminal.

     --UU        causes ps to update a private database where it keeps system
	       information.  Thus ``ps U'' should be included in the /_e_t_c/_r_c
	       file.

     --##        A process number may be given, (indicated here by #), in which
	       case the output is restricted to that process.  This option
	       must also be last.

     A second argument is taken to be the file containing the system's namel-
     ist.  Otherwise, /vmunix is used.	A third argument tells ppss where to
     look for _c_o_r_e if the --kk option is given, instead of /_v_m_c_o_r_e.  If a fourth
     argument is given, it is taken to be the name of a swap file to use in-
     stead of the default /_d_e_v/_d_r_u_m.

     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%.
	   NICE     (or NI) process scheduling increment (see setpriority(2))
	   SIZE     virtual size of the process (in 1024 byte units)
	   RSS	    real memory (resident set) size of the process (in 1024
		    byte units)
	   LIM	    soft limit on memory used, specified via a call to
		    setrlimit(2); if no limit has been specified then shown as
		    _x_x
	   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 pro-
		    cess to pages not loaded in core.
	   UID	    process owner's user-id (numerical)
	   PPID     parent process id (numerical)
	   CP	    short-term cpu utilization factor (used in scheduling)
	   PRI	    process priority (non-positive when in non-interruptible
		    wait)
	   ADDR     swap address of the process
	   WCHAN    address of event on which a process is waiting (an address
		    in the system).  A symbol is chosen that classifies the
		    address, unless numerical output is requested (see the --nn
		    flag).  In this case, the initial part of the address is
		    trimmed off and is printed hexadecimally, e.g., 0x80004000
		    prints as 4000.

	   F	    flags associated with process as in <_s_y_s/_p_r_o_c._h>:

		    SLOAD      000001	 in core
		    SSYS       000002	 swapper or pager process
		    SLOCK      000004	 swapping out process
		    SSWAP      000008	 save area flag
		    STRC       000010	 tracing the process
		    SWTED      000020	 trace 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)
		    SVFORK     001000	 process resulted from vfork()
		    SVFDONE    002000	 another vfork flag
		    SNOVM      004000	 no vm, parent in a vfork()
		    SPAGI      008000	 init data space on demand from inode
		    SANOM      010000	 system detected anomalous vm behavior
		    SUANOM     020000	 user warned of anomalous vm behavior
		    STIMO      040000	 timing out during sleep
		    SDETACH    080000	 detached inherited by init
		    SOUSIG     100000	 using old signal mechanism


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

     <exiting>	 A process which is blocked trying to exit is marked <exiting>

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

FFIILLEESS
     /_v_m_u_n_i_x		system namelist
     /_d_e_v/_k_m_e_m		kernel memory
     /_d_e_v/_d_r_u_m		swap device
     /_v_m_c_o_r_e		core file
     /_d_e_v		searched to find swap device and tty names


SSEEEE AALLSSOO
     kill(1), w(1)

HHIISSTTOORRYY
     A PPss command appeared in VERSION 6 AT&T UNIX.