Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ps(1) [minix man page]

PS(1)							      General Commands Manual							     PS(1)

NAME
ps - process status SYNOPSIS
ps [-alxU] [kernel mm fs] OPTIONS
-a Print all processes with controlling terminals -l Give long listing -x Include processes without a terminal EXAMPLES
ps -axl # Print all processes and tasks in long format DESCRIPTION
Ps prints the status of active processes. Normally only the caller's own processes are listed in short format (the PID, TTY, TIME and CMD fields as explained below). The long listing contains: F Kernel flags: 001: free slot 002: no memory map 004: sending; 010: receiving 020: inform on pending signals 040: pending signals 100: being traced. S State: R: runnable W: waiting (on a message) S: sleeping (i.e.,suspended on MM or FS) Z: zombie T: stopped UID, PID, PPID, PGRP The user, process, parent process and process group ID's. SZ Size of the process in kilobytes. RECV Process/task on which a receiving process is waiting or sleeping. TTY Controlling tty for the process. TIME Process' cumulative (user + system) execution time. CMD Command line arguments of the process. The files /dev/{mem,kmem} are used to read the system tables and command line arguments from. Terminal names in /dev are used to generate the mnemonic names in the TTY column, so ps is independent of terminal naming conventions. PS(1)

Check Out this Related Man Page

PS(1)							      General Commands Manual							     PS(1)

NAME
ps - process status SYNOPSIS
ps [ acgklnrtuwxU# [ core [ swap [ system ] ] ] ] DESCRIPTION
Ps prints certain indicia about active processes. To get a complete printout on the console or lpr, use ``ps axlw'' For a quick snapshot of system activity, ``ps au'' is recommended. A hyphen may precede options with no effect. The following options may be specified. a asks for information about all processes with terminals (ordinarily only one's own processes are displayed). c causes only the comm field to be displayed instead of the arguments. (The comm field is the tail of the path name of the file the process last exec'ed.) This option speeds up ps somewhat and reduces the amount of output. It is also more reliable since the process can't scribble on top of it. 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, or if their arguments begin with a `-'. This normally eliminates shells and getty processes. k causes the file /usr/sys/core is used in place of /dev/kmem and /dev/mem. This is used for postmortem system debugging. l asks for a long listing. The short listing contains the user name, process ID, tty, the cumulative execution time of the process and an approximation to the command line. n asks for numeric rather than symbolic wchans. This flag implies the ``l'' flag. r asks for ``raw'' output. A non-human readable sequence of structures is output on the standard output. There is one structure for each process, the format is defined by <psout.h> tttyname restricts output to processes whose controlling tty is the specified ttyname (which should be specified as printed by ps, including t? for processes with no tty). This option must be the last one given. u A user oriented output is produced. This includes the name of the owner of the process, process id, nice value, size, tty, cpu time used, and the command. w tells ps you are on a wide terminal (132 columns). Ps normally assumes you are on an 80 column terminal. This information is used to decide how much of long commands to print. The w option may be repeated, e.g. ww, and the entire command, up to 128 characters, will be printed without regard to terminal width. x asks even about processes with no terminal. U causes ps to update a private database where is keeps system information. Thus ``ps -U'' should be included in the /etc/rc 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 tells ps where to look for core if the k option is given, instead of /usr/sys/core. A third argument is the name of a swap file to use instead of the default /dev/swap. If a fourth argument is given, it is taken to be the file containing the system's namelist. Otherwise, ``/unix'' is used. The output is sorted by tty, then by process ID. The long listing is columnar and contains F Flags associated with the process. These are defined by #define lines in /usr/include/sys/proc.h. S The state of the process. 0: nonexistent; S: sleeping; W: waiting; R: running; I: intermediate; Z: terminated; T: stopped. UID The user id of the process owner. PID The process ID of the process; as in certain cults it is possible to kill a process if you know its true name. PPID The process ID of the parent process. CPU Processor utilization for scheduling. PRI The priority of the process; high numbers mean low priority. NICE Used in priority computation. ADDR The memory address of the process if resident, otherwise the disk address. SZ The size in blocks (512 bytes) of the memory image of the process. WCHAN The event for which the process is waiting or sleeping; if blank, the process is running. TTY The controlling tty for the process. TIME The cumulative execution time for the process. COMMAND The command and its arguments. A process that has exited and has a parent, but has not yet been waited for by the parent is marked <defunct>. 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 some- what unreliable and in any event a process is entitled to destroy this information, so the names cannot be counted on too much. FILES
/unix system namelist /dev/kmem kernel memory /dev/swap swap device /usr/sys/core core file /dev searched to find swap device and tty names /var/run/psdatabase system namelist and device information SEE ALSO
kill(1), w(1), pstat(8) BUGS
Things can change while ps is running; the picture it gives is only a close approximation to reality. Some processes, typically those in the background, are printed with null or garbaged arguments, even though the process has not swapped. (Sometimes ps even loses on its own arguments!) In these cases, the name of the command is printed in parentheses. When automatic crash dumps are enabled, /usr/sys/core is not a sensible default core file name. 3rd Berkeley Distribution PS(1)
Man Page