2 .\" (The preceding line is a note to broken versions of man to tell
4 .\" Quick hack conversion by Albert Cahalan, 1998.
5 .\" Licensed under version 2 of the Gnu General Public License.
7 .TH PS 1 "July 28, 2004" "Linux" "Linux User's Manual"
9 .\" To render this page:
10 .\" groff -t -b -man -X -P-resolution -P100 -Tps ps.1 &
11 .\" groff -t -b -man -X -TX100 ps.1 &
12 .\" tbl ps.1 | troff -Ww -man -z
13 .\" groff -t -man -Tps ps.1 | ps2pdf - - > ps.pdf
15 .\" The '70s called. They want their perfect justification,
16 .\" hyphenation, and double-spaced sentences back.
21 .\" See /usr/share/groff/current/tmac/an-old.tmac for what these do.
22 .\" Setting them to zero provides extra space, but only do that for
23 .\" plain text output. PostScript and such will remain indented.
25 .if n .nr an-prevailing-indent 0n
28 .\" ColSize is used for the format spec table.
29 .\" It's the left margin, minus the right, minus
30 .\" the space needed for the 1st two columns.
31 .\" Making it messy: inches, ens, points, scaled points...
33 .nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-20u)n)
35 .\" This is for command options
43 .\" ColSize=\n[ColSize]
45 .\" Macro for easy option formatting: .opt \-x
52 ps \- report a snapshot of the current processes.
54 \fBps\fR [\fIoptions\fR]
59 displays information about a selection of the active processes.
60 If you want a repetitive update of the selection and the
61 displayed information, use\ \fItop\fR(1) instead.
63 This version of \fBps\fR accepts several kinds of options:
66 UNIX options, which may be grouped and must be preceded by a dash.
68 BSD options, which may be grouped and must not be used with a dash.
70 GNU long options, which are preceded by two dashes.
73 Options of different types may be freely mixed, but conflicts can appear.
74 There are some synonymous options, which are functionally identical, due
75 to the many standards and \fBps\fR implementations that this \fBps\fR is
78 Note that "\fBps\ \-aux\fR" is distinct from "\fBps\ aux\fR".
79 The POSIX and UNIX standards require that "\fBps\ \-aux\fR" print all
80 processes owned by a user named "x", as well as printing all processes
81 that would be selected by the \fB\-a\fR option. If the user named "x" does
82 not exist, this \fBps\fR may interpret the command as "\fBps\ aux\fR"
83 instead and print a warning. This behavior is intended to aid in
84 transitioning old scripts and habits. It is fragile, subject to change,
85 and thus should not be relied upon.
87 By default, \fBps\fR selects all processes
88 with the same effective user ID (euid=EUID) as the current user
90 associated with the same terminal as the invoker.
91 It displays the process ID (pid=PID),
92 the terminal associated with the process (tname=TTY),
93 the cumulated CPU time in [dd\-]hh:mm:ss format (time=TIME),
94 and the executable name (ucmd=CMD).
95 Output is unsorted by default.
97 The use of BSD\-style options will add process state (stat=STAT) to the
98 default display and show the command args (args=COMMAND) instead of the
99 executable name. You can override this with the \fBPS_FORMAT\fR
100 environment variable. The use of BSD\-style options will also change the
101 process selection to include processes on other terminals (TTYs) that
102 are owned by you; alternately, this may be described as setting the
103 selection to be the set of all processes filtered to exclude
104 processes owned by other users or not on a terminal. These effects
105 are not considered when options are described as being "identical" below,
106 so \fB\-M\fR will be considered identical to \fBZ\fR and so on.
108 Except as described below, process selection options are additive.
109 The default selection is discarded, and then the selected processes
110 are added to the set of processes to be displayed.
111 A\ process will thus be shown if it meets any of the given
114 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
117 To see every process on the system using standard syntax:
126 To see every process on the system using BSD syntax:
131 To print a process tree:
136 To get info about threads:
141 To get security info:
142 .B ps\ -eo euser,ruser,suser,fuser,f,comm,label
148 To see every process running as root (real\ &\ effective\ ID) in user format:
149 .B ps\ \-U\ root\ \-u\ root\ u
151 To see every process with a user\-defined format:
152 .B ps\ \-eo\ pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
154 .B ps\ axo\ stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
156 .B ps\ \-eopid,tt,user,fname,tmout,f,wchan
158 Print only the process IDs of syslogd:
159 .B ps\ \-C\ syslogd\ \-o\ pid=
161 Print only the name of PID 42:
162 .B ps\ \-p\ 42\ \-o\ comm=
165 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
166 .SH "SIMPLE PROCESS SELECTION"
168 Select all processes. Identical to \fB\-e\fR.
171 Select all processes except those that fulfill the specified conditions.
172 (negates the selection) Identical to \fB\-\-deselect\fR.
175 Select all processes associated with this terminal. Identical to the
176 \fBt\fR option without any argument.
179 Select all processes except both session leaders (see \fIgetsid\fR(2)) and
180 processes not associated with a terminal.
183 Lift the BSD\-style "only yourself" restriction, which is imposed upon
184 the set of all processes when some BSD\-style (without\ "\-") options
185 are used or when the \fBps\fR personality setting is BSD\-like.
186 The set of processes selected in this manner is
187 in addition to the set of processes selected by other means.
188 An alternate description is that this option causes \fBps\fR to
189 list all processes with a terminal (tty),
190 or to list all processes when used together with the \fBx\fR option.
193 Select all processes except session leaders.
196 Select all processes. Identical to \fB\-A\fR.
198 .\" Current "g" behavior: add in the session leaders, which would
199 .\" be excluded in the sunos4 personality. Supposed "g" behavior:
200 .\" add in the group leaders -- at least according to the SunOS 4
201 .\" man page on the FreeBSD site. Uh oh. I think I had tested SunOS
202 .\" though, so maybe the code is correct.
204 Really all, even session leaders. This flag is obsolete and may be
205 discontinued in a future release. It is normally implied by the \fBa\fR flag,
206 and is only useful when operating in the sunos4 personality.
209 Restrict the selection to only running processes.
212 Lift the BSD\-style "must have a tty" restriction, which is imposed upon
213 the set of all processes when some BSD\-style (without\ "\-") options
214 are used or when the \fBps\fR personality setting is BSD\-like.
215 The set of processes selected in this manner is
216 in addition to the set of processes selected by other means.
217 An alternate description is that this option causes \fBps\fR to
218 list all processes owned by you (same EUID as \fBps\fR),
219 or to list all processes when used together with the \fBa\fR option.
222 Select all processes except those that fulfill the specified conditions.
223 (negates the selection) Identical to \fB\-N\fR.
225 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
228 .SH "PROCESS SELECTION BY LIST"
229 These options accept a single argument in the form of a blank\-separated
230 or comma\-separated list. They can be used multiple times.
231 For\ example:\ \fBps\ \-p\ "1\ 2"\ \-p\ 3,4\fR
234 Select by command name.
236 This selects the processes whose executable name is given in
240 Select by real group ID (RGID) or name.
242 This selects the processes whose real group name or ID is in the
243 \fIgrplist\fR list. The real group ID identifies the group of the user
244 who created the process, see \fIgetgid\fR(2).
247 Select by effective user ID (EUID) or name.
249 This selects the processes whose effective user name
250 or ID is in \fIuserlist\fR.
251 The effective user\ ID describes the user whose file
252 access permissions are used by the process
253 (see\ \fIgeteuid\fR(2)).
254 Identical to \fB\-u\fR and\ \fB\-\-user\fR.
257 select by real user ID (RUID) or name.
259 It selects the processes whose real user name or ID is in the
261 The real user ID identifies the user who created the process,
262 see\ \fIgetuid\fR(2).
265 Select by session OR by effective group name.
267 Selection by session is specified by many standards,
268 but selection by effective group is the logical behavior that
269 several other operating systems use.
270 This \fBps\fR will select by session when the list
271 is completely numeric (as\ sessions\ are).
272 Group ID numbers will work only when some group names are also specified.
273 See the \fB\-s\fR and \fB\-\-group\fR options.
276 Select by process ID. Identical to \fB\-p\fR and\ \fB\-\-pid\fR.
281 This selects the processes whose process ID numbers appear in
282 \fIpidlist\fR. Identical to \fBp\fR and\ \fB\-\-pid\fR.
285 Select by session ID.
287 This selects the processes
288 with a session ID specified in\ \fIsesslist\fR.
291 Select by tty. Nearly identical to \fB\-t\fR and \fB\-\-tty\fR,
292 but can also be used with an empty \fIttylist\fR to indicate
293 the terminal associated with \fBps\fR.
294 Using the \fBT\fR option is considered cleaner than using \fBT\fR with
295 an\ empty\ \fIttylist\fR.
300 This selects the processes associated with the terminals
301 given in \fIttylist\fR.
302 Terminals (ttys, or screens for text output) can be specified in several
303 forms: /dev/ttyS1, ttyS1, S1.
304 A\ plain "\-" may be used to select processes not attached to any terminal.
307 Select by effective user ID (EUID) or name.
309 This selects the processes whose effective user name or ID is in
310 \fIuserlist\fR. The effective user ID describes the user whose file
311 access permissions are used by the process (see\ \fIgeteuid\fR(2)).
312 Identical to \fBU\fR and \fB\-\-user\fR.
314 .opt \-\-Group \ grplist
315 Select by real group ID (RGID) or name. Identical to \fB\-G\fR.
317 .opt \-\-User \ userlist
318 Select by real user ID (RUID) or name. Identical to \fB\-U\fR.
320 .opt \-\-group \ grplist
321 Select by effective group ID (EGID) or name.
323 This selects the processes whose effective group name or ID is in
324 \fIgrouplist\fR. The effective group ID describes the group whose file
325 access permissions are used by the process (see\ \fIgeteuid\fR(2)).
326 The \fB\-g\fR option is often an alternative to\ \fB\-\-group\fR.
328 .opt \-\-pid \ pidlist
329 Select by process\ ID. Identical to \fB\-p\fR\ and\ \fBp\fR.
331 .opt \-\-ppid \ pidlist
332 Select by parent process\ ID.
333 This selects the processes
334 with a parent\ process\ ID in \fRpidlist\fR.
335 That\ is, it selects processes that are children
336 of those listed in \fRpidlist\fR.
338 .opt \-\-sid \ sesslist
339 Select by session\ ID. Identical to\ \fB\-s\fR.
341 .opt \-\-tty \ ttylist
342 Select by terminal. Identical to \fB\-t\fR and\ \fBt\fR.
344 .opt \-\-user \ userlist
345 Select by effective user ID (EUID) or name.
346 Identical to \fB\-u\fR and\ \fBU\fR.
349 Identical to \fB\-\-sid\ \fI123\fR.
352 Identical to \fB\-\-pid\ \fI123\fR.
354 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
357 .SH "OUTPUT FORMAT CONTROL"
358 These options are used to choose the information displayed by \fBps\fR.
359 The output may differ by personality.
363 extra full format. See the \fB\-f\fR option, which \fB\-F\fR implies.
366 is like \fB\-o\fR, but preloaded with some default columns.
367 Identical to \fB\-o\ pid,\fIformat\fB,state,tname,time,command\fR
368 or \fB\-o\ pid,\fIformat\fB,tname,time,cmd\fR, see\ \fB\-o\fR\ below.
371 is preloaded \fBo\fR (overloaded).
373 The BSD \fBO\fR option can act like \fB\-O\fR (user\-defined output
374 format with some common fields predefined) or can be used to specify
375 sort order. Heuristics are used to determine the behavior of this
376 option. To ensure that the desired behavior is obtained (sorting or
377 formatting), specify the option in some other way
378 (e.g. with \fB\-O\fR or \fB\-\-sort\fR).
379 When used as a formatting option, it is identical to \fB\-O\fR, with the
383 Add a column of security data. Identical to \fBZ\fR. (for\ SE\ Linux)
389 Add a column of security data. Identical to \fB\-M\fR. (for\ SE\ Linux)
392 Show different scheduler information for the \fB\-l\fR option.
395 does full\-format listing. This option can be combined with many
396 other UNIX\-style options to add additional columns. It also causes
397 the command arguments to be printed. When used with \fB\-L\fR, the
398 NLWP (number of threads) and LWP (thread ID) columns will be added.
399 See the \fBc\fR option, the format keyword \fBargs\fR, and the
400 format keyword \fBcomm\fR.
403 BSD job control format.
409 display BSD long format.
412 long format. The \fB\-y\fR option is often useful with this.
415 specify user\-defined format. Identical to \fB\-o\fR and
419 user\-defined format.
421 \fIformat\fR is a single argument in the form of a
422 blank\-separated or comma\-separated list, which offers
423 a way to specify individual output columns.
424 The recognized keywords are described in the \fBSTANDARD FORMAT
425 SPECIFIERS\fR section below.
427 renamed (\fBps\ \-o\ pid,ruser=RealUser\ \-o\ comm=Command\fR) as desired.
428 If all column headers are empty (\fBps\ \-o\ pid=\ \-o\ comm=\fR) then the
429 header line will not be output. Column width will increase as
430 needed for wide headers; this may be used to widen up columns
431 such as WCHAN (\fBps\ \-o\ pid,wchan=WIDE\-WCHAN\-COLUMN\ \-o\ comm\fR).
432 Explicit width control (\fBps\ opid,wchan:42,cmd\fR) is offered too.
433 The behavior of \fBps\ \-o\ pid=X,comm=Y\fR varies with personality;
434 output may be one column named "X,comm=Y" or two columns
435 named "X" and "Y". Use multiple \fB\-o\fR options when in doubt.
436 Use the \fBPS_FORMAT\fR environment variable to specify a default
437 as desired; DefSysV and DefBSD are macros that may be used to
438 choose the default UNIX or BSD columns.
441 display signal format
444 display user\-oriented format
447 display virtual memory format
450 Do not show flags; show rss in place of addr.
451 This option can only be used with \fB\-l\fR.
453 .opt \-\-format \ format
454 user\-defined format. Identical to \fB\-o\fR and \fBo\fR.
457 Display security context format. (for\ SE\ Linux)
459 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
462 .SH "OUTPUT MODIFIERS"
466 .\" use raw CPU time for %CPU instead of decaying average
469 show process hierarchy (forest)
472 Specify namelist file. Identical to \fB\-n\fR, see \fB\-n\fR above.
475 Sorting order. (overloaded)
477 The BSD \fBO\fR option can act like \fB\-O\fR (user\-defined output
478 format with some common fields predefined) or can be used to specify
479 sort order. Heuristics are used to determine the behavior of this
480 option. To ensure that the desired behavior is obtained (sorting or
481 formatting), specify the option in some other way (e.g. with \fB\-O\fR
484 For sorting, obsolete BSD \fBO\fR option syntax is
485 \fBO\fR[\fB+\fR|\fB\-\fR]\fIk1\fR[,[\fB+\fR|\fB\-\fR]\fIk2\fR[,...]].
486 It orders the processes listing according to the multilevel sort specified by
487 the sequence of one\-letter short keys \fIk1\fR, \fIk2\fR, ... described
488 in the \fBOBSOLETE SORT KEYS\fR section below.
489 The\ "+" is currently optional,
490 merely re\-iterating the default direction on a key,
491 but may help to distinguish an \fBO\fR sort from an \fBO\fR format.
492 The\ "\-" reverses direction only on the key it precedes.
495 Sum up some information, such as CPU usage, from dead child processes
496 into their parent. This is useful for examining a system where a
497 parent process repeatedly forks off short\-lived children to do work.
500 Show the true command name. This is derived from the name of the
501 executable file, rather than from the argv value. Command arguments
502 and any modifications to them (see\ \fIsetproctitle\fR(3)) are
503 thus not shown. This option
504 effectively turns the \fBargs\fR format keyword into the \fBcomm\fR
505 format keyword; it is useful with the \fB\-f\fR format option and with
506 the various BSD\-style format options, which all normally
507 display the command arguments.
508 See the \fB\-f\fR option, the format keyword \fBargs\fR, and the
509 format keyword \fBcomm\fR.
512 Show the environment after the command.
515 ASCII\-art process hierarchy (forest)
518 No header. (or, one header per screen in the BSD personality)
520 The \fBh\fR option is problematic. Standard BSD \fBps\fR uses
521 this option to print a header on each page of output, but older
522 Linux \fBps\fR uses this option to totally disable the header.
523 This version of \fBps\fR follows the Linux usage of not printing
524 the header unless the BSD personality has been selected, in which
525 case it prints a header on each page of output. Regardless of the
526 current personality, you can use the long options \fB\-\-headers\fR
527 and \fB\-\-no\-headers\fR to enable printing headers each page or
528 disable headers entirely, respectively.
531 specify sorting order. Sorting syntax is
532 [\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]]
533 Choose a multi\-letter key from the \fBSTANDARD FORMAT SPECIFIERS\fR section.
534 The\ "+" is optional since default direction is increasing numerical or
535 lexicographic order. Identical to \fB\-\-sort\fR. Examples:
537 \fBps\ jaxkuid,\-ppid,+pid\fR
539 \fBps\ axk\ comm\ o\ comm,args\fR
541 \fBps\ kstart_time\ \-ef\fR
544 set namelist file. Identical to \fBN\fR.
546 The namelist file is needed for a proper WCHAN display, and must match
547 the current Linux kernel exactly for correct output.
548 Without this option, the default search path for the namelist is:
556 /boot/System.map\-\`uname\ \-r\`
560 /lib/modules/\`uname\ \-r\`/System.map
562 /usr/src/linux/System.map
567 Numeric output for WCHAN and USER. (including all types of UID and GID)
570 Wide output. Use this option twice for unlimited width.
573 Wide output. Use this option twice for unlimited width.
582 include some dead child process data (as a sum with the parent)
585 ASCII art process tree
588 repeat header lines, one per page of output
591 print no header line at all
600 specify sorting order. Sorting syntax is
601 [\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]]
602 Choose a multi\-letter key from the \fBSTANDARD FORMAT SPECIFIERS\fR section.
603 The\ "+" is optional since default direction is increasing numerical or
604 lexicographic order. Identical to\ \fBk\fR.
605 For example: \fBps\ jax\ \-\-sort=uid,\-ppid,+pid\fR
610 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
617 Show threads as if they were processes
620 Show threads, possibly with LWP and NLWP columns
623 Show threads, possibly with SPID column
626 Show threads after processes
629 Show threads after processes
631 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
634 .SH "OTHER INFORMATION"
638 List all format specifiers.
641 Print the procps version.
644 Print the procps version.
647 Print a help message.
650 Print debugging info.
653 Print the procps version.
655 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
659 This \fBps\fR works by reading the virtual files in\ /proc.
660 This \fBps\fR does not need to be setuid kmem or have any privileges to run.
661 Do not give this \fBps\fR any special permissions.
663 This \fBps\fR needs access to namelist data for proper WCHAN display.
664 For kernels prior to 2.6, the System.map file must be installed.
666 CPU usage is currently expressed as the percentage of time spent
667 running during the entire lifetime of a process.
668 This is not ideal, and\ it does not conform to the
669 standards that \fBps\fR otherwise conforms\ to.
670 CPU\ usage is unlikely to add up to exactly\ 100%.
672 The SIZE and RSS fields don't count some parts of a process including the
673 page tables, kernel stack, struct thread_info, and struct task_struct.
674 This is usually at least 20\ KiB of memory that is always resident.
675 SIZE is the virtual size of the process (code+data+stack).
677 Processes marked <defunct> are dead processes (so\-called\ "zombies") that
678 remain because their parent has not destroyed them properly. These processes
679 will be destroyed by \fIinit\fR(8) if the parent process exits.
683 The sum of these values is displayed in the "F" column,
684 which is provided by the \fBflags\fR output specifier.
688 forked but didn't exec
691 used super\-user privileges
694 .SH "PROCESS STATE CODES"
695 Here are the different values that the \fBs\fR, \fBstat\fR and
696 \fBstate\fR output specifiers (header\ "STAT"\ or\ "S") will display to
697 describe the state of a process.
701 Uninterruptible sleep (usually\ IO)
704 Running or runnable (on\ run\ queue)
707 Interruptible sleep (waiting for an event to complete)
710 Stopped, either by a job control signal or because it is being traced.
713 paging (not valid since the 2.6.xx kernel)
716 dead (should never be seen)
719 Defunct ("zombie") process, terminated but not reaped by its parent.
722 For BSD formats and when the \fBstat\fR keyword is used, additional
723 characters may be displayed:
727 high\-priority (not nice to other users)
730 low\-priority (nice to other users)
733 has pages locked into memory (for real\-time and custom\ IO)
739 is multi-threaded (using CLONE_THREAD, like NPTL pthreads\ do)
742 is in the foreground process group
746 .SH "OBSOLETE SORT KEYS"
747 These keys are used by the BSD \fBO\fR option (when it is used for
748 sorting). The GNU \fB\-\-sort\fR option doesn't use these keys, but the
749 specifiers described below in the \fBSTANDARD FORMAT SPECIFIERS\fR
750 section. Note that the values used in sorting are the internal
751 values \fBps\fR uses and not the "cooked" values used in some of
752 the output format fields (e.g. sorting on tty will sort into
753 device number, not according to the terminal name displayed).
754 Pipe \fBps\fR output into the \fIsort\fR(1) command if you want
755 to sort the cooked values.
759 \fBKEY LONG DESCRIPTION\fR
760 c cmd simple name of executable
761 C pcpu cpu utilization
762 f flags flags as in long format F field
763 g pgrp process group ID
764 G tpgid controlling tty process group ID
765 j cutime cumulative user time
766 J cstime cumulative system time
768 m min_flt number of minor page faults
769 M maj_flt number of major page faults
770 n cmin_flt cumulative minor page faults
771 N cmaj_flt cumulative major page faults
774 P ppid parent process ID
775 r rss resident set size
776 R resident resident pages
777 s size memory size in kilobytes
778 S share amount of shared pages
779 t tty the device number of the controlling tty
780 T start_time time process was started
783 v vsize total VM size in kB
784 y priority kernel scheduling priority
785 .\"K stime system time (conflict, system vs. start time)
789 .SH "AIX FORMAT DESCRIPTORS"
790 This \fBps\fR supports AIX format descriptors, which work somewhat like the
791 formatting codes of \fIprintf\fR(1) and \fIprintf\fR(3). For example, the normal
792 default output can be produced with this: \fBps\ \-eo\ "%p\ %y\ %x\ %c"\fR.
793 The\ \fBNORMAL\fR codes are described in the next section.
796 \fBCODE NORMAL HEADER\fR
814 .SH "STANDARD FORMAT SPECIFIERS"
815 Here are the different keywords that may be used to control the output
816 format (e.g. with option \fB\-o\fR) or to sort the selected processes
817 with the GNU\-style \fB\-\-sort\fR option.
819 For example: \fBps\ \-eo\ pid,user,args\ \-\-sort\ user\fR
821 This version of \fBps\fR tries to recognize most of the keywords used in
822 other implementations of \fBps\fR.
824 The following user\-defined format specifiers may contain
825 spaces: \fBargs\fR, \fBcmd\fR, \fBcomm\fR, \fBcommand\fR, \fBfname\fR,
826 \fBucmd\fR, \fBucomm\fR,
827 \fBlstart\fR, \fBbsdstart\fR, \fBstart\fR.
829 Some keywords may not be available for sorting.
831 .\" #######################################################################
832 .\" lB1 lB1 lB1 lB1 s s s
833 .\" lB1 l1 l1 l1 s s s.
835 .\" lB1 lB1 lBw(5.5i)
840 lB1 lB1 lBw(\n[ColSize]n)
842 CODE HEADER DESCRIPTION
845 cpu utilization of the process in "##.#" format. Currently, it is the CPU time
846 used divided by the time the process has been running (cputime/realtime
847 ratio), expressed as a percentage. It will not add up to 100% unless you
848 are lucky. (alias\ \fBpcpu\fR).
852 ratio of the process's resident set size to the physical memory on
853 the machine, expressed as a percentage. (alias\ \fBpmem\fR).
857 command with all its arguments as a string. Modifications to the arguments
858 may be shown. The output in this column may contain spaces.
859 A\ process marked <defunct> is partly dead, waiting
860 to be fully destroyed by its parent. Sometimes the process args
861 will be unavailable; when this happens, \fBps\fR will instead
862 print the executable name in brackets.
863 (alias\ \fBcmd\fR,\ \fBcommand\fR). See also the \fBcomm\fR format
864 keyword, the \fB\-f\fR option, and the \fBc\fR option.
866 When specified last, this column will extend to the edge of the display.
867 If \fBps\fR can not determine display width, as when output is redirected
868 (piped) into a file or another command, the output width is undefined.
869 (it may be 80, unlimited, determined by the \fBTERM\fR variable, and so on)
870 The \fBCOLUMNS\fR environment variable or \fB\-\-cols\fR option may
871 be used to exactly determine the width in this case.
872 The \fBw\fR or \fB\-w\fR option may be also be used to adjust width.
876 mask of the blocked signals, see \fIsignal\fR(7).
877 According to the width of the field,
878 a\ 32\-bit or 64\-bit mask in hexadecimal format is displayed.
879 (alias\ \fBsig_block\fR,\ \fBsigmask\fR).
883 time the command started. If the process was started less
884 than 24 hours ago, the output format is "\ HH:MM",
886 (where mmm is the three letters of the month).
887 See also \fBlstart\fR, \fBstart\fR, \fBstart_time\fR, and \fBstime\fR.
891 accumulated cpu time, user\ +\ system. The display format is usually
892 "MMM:SS", but can be shifted to the right if the process used more than 999
897 processor utilization. Currently, this is the integer value of
898 the percent usage over the lifetime of the process. (see\ \fB%cpu\fR).
902 mask of the caught signals, see \fIsignal\fR(7). According to the
903 width of the field, a 32 or 64 bits mask in hexadecimal format is
904 displayed. (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR).
908 scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBcls\fR).
909 Field's possible values are:
929 scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBclass\fR).
930 Field's possible values are:
950 see \fBargs\fR. (alias\ \fBargs\fR,\ \fBcommand\fR).
954 command name (only\ the executable\ name). Modifications to the command
955 name will not be shown. A\ process marked <defunct> is partly dead, waiting
956 to be fully destroyed by its parent. The output in this
957 column may contain spaces. (alias\ \fBucmd\fR,\ \fBucomm\fR).
958 See also the \fBargs\fR format
959 keyword, the \fB\-f\fR option, and the \fBc\fR option.
961 When specified last, this column will extend to the edge of the display.
962 If \fBps\fR can not determine display width, as when output is redirected
963 (piped) into a file or another command, the output width is undefined.
964 (it may be 80, unlimited, determined by the \fBTERM\fR variable, and so on)
965 The \fBCOLUMNS\fR environment variable or \fB\-\-cols\fR option may
966 be used to exactly determine the width in this case.
967 The \fBw\fR or \fB\-w\fR option may be also be used to adjust width.
971 see \fBargs\fR. (alias\ \fBargs\fR,\ \fBcmd\fR).
975 per\-mill (tenths of a percent) CPU usage. (see\ \fB%cpu\fR).
979 cumulative CPU time, "[dd\-]hh:mm:ss" format. (alias\ \fBtime\fR).
983 effective group ID number of the process as a decimal integer.
988 effective group ID of the process. This will be the textual group ID,
989 if it can be obtained and the field width permits, or a decimal
990 representation otherwise. (alias\ \fBgroup\fR).
1002 elapsed time since the process was started,
1003 in\ the form\ [[dd\-]hh:]mm:ss.
1007 effective user\ ID. (alias\ \fBuid\fR).
1011 effective user\ name. This will be the textual
1012 user\ ID, if\ it can be obtained and the field width permits,
1013 or\ a\ decimal representation otherwise.
1014 The\ \fBn\fR\ option can be used
1015 to force the decimal representation.
1016 (alias\ \fBuname\fR,\ \fBuser\fR).
1020 flags associated with the process, see the \fBPROCESS FLAGS\fR section.
1021 (alias\ \fBflag\fR,\ \fBflags\fR).
1025 filesystem access group\ ID. (alias\ \fBfsgid\fR).
1029 filesystem access group\ ID.
1030 This will be the textual user\ ID, if\ it can be obtained
1031 and the field width permits,
1032 or\ a\ decimal representation otherwise.
1033 (alias\ \fBfsgroup\fR).
1037 see\ \fBf\fR. (alias\ \fBf\fR,\ \fBflags\fR).
1041 see\ \fBf\fR. (alias\ \fBf\fR,\ \fBflag\fR).
1045 first 8 bytes of the base name of the process's executable file.
1046 The output in this column may contain spaces.
1050 filesystem access user\ ID. (alias\ \fBfsuid\fR).
1054 filesystem access user\ ID. This will be the textual user\ ID,
1055 if\ it can be obtained and the field width permits,
1056 or\ a\ decimal representation otherwise.
1060 see\ \fBegid\fR. (alias\ \fBegid\fR).
1064 see\ \fBegroup\fR. (alias\ \fBegroup\fR).
1068 mask of the ignored signals, see \fIsignal\fR(7). According to the
1069 width of the field, a\ 32\-bit or 64\-bit mask in hexadecimal format
1070 is displayed. (alias \fBsig_ignore\fR, \fBsigignore\fR).
1074 security label, most commonly used for SE\ Linux context data.
1075 This is for the \fIMandatory Access Control\fR ("MAC") found on
1076 high\-security systems.
1080 time the command started.
1081 See also \fBbsdstart\fR, \fBstart\fR, \fBstart_time\fR, and \fBstime\fR.
1085 lwp (light weight process, or thread) ID of the lwp being reported.
1086 (alias\ \fBspid\fR,\ \fBtid\fR).
1090 nice value. This ranges from 19 (nicest) to \-20 (not\ nice to\ others),
1091 see\ \fInice\fR(1). (alias\ \fBnice\fR).
1095 see\ \fBni\fR. (alias\ \fBni\fR).
1099 number of lwps (threads) in the process. (alias\ \fBthcount\fR).
1103 address of the kernel function where the process is sleeping
1104 (use \fBwchan\fR if you want the kernel function name).
1105 Running tasks will display a dash ('\-') in this column.
1109 see\ \fB%cpu\fR. (alias\ \fB%cpu\fR).
1113 mask of the pending signals. See\ \fIsignal\fR(7). Signals pending on
1114 the process are distinct from signals pending on individual threads.
1115 Use the \fBm\fR option or the \fB\-m\fR option to see both.
1116 According to the width of the field, a\ 32\-bit or 64\-bit mask in
1117 hexadecimal format is displayed. (alias\ \fBsig\fR).
1121 process group\ ID or, equivalently, the process\ ID of the
1122 process group leader. (alias\ \fBpgrp\fR).
1126 see\ \fBpgid\fR. (alias\ \fBpgid\fR).
1130 process\ ID number of the process.
1134 see\ \fB%mem\fR. (alias\ \fB%mem\fR).
1138 scheduling class of the process. (alias\ \fBclass\fR,\ \fBcls\fR).
1139 Possible values are:
1163 processor that process is currently assigned to.
1171 real group name. This will be the textual group\ ID, if\ it can be
1172 obtained and the field width permits,
1173 or\ a\ decimal representation otherwise.
1177 resident set size, the non\-swapped physical memory that
1178 a task has used (in\ kiloBytes).
1179 (alias\ \fBrssize\fR,\ \fBrsz\fR).
1183 see\ \fBrss\fR. (alias\ \fBrss\fR,\ \fBrsz\fR).
1187 see\ \fBrss\fR. (alias\ \fBrss\fR,\ \fBrssize\fR).
1199 real user\ ID. This will be the textual user\ ID,
1200 if\ it can be obtained and the field width permits,
1201 or\ a\ decimal representation otherwise.
1205 minimal state display (one\ character).
1206 See\ section \fBPROCESS STATE CODES\fR for the different values.
1207 See\ also \fBstat\fR if you want additional
1208 information displayed. (alias\ \fBstate\fR).
1212 scheduling policy of the process. The policies SCHED_OTHER (SCHED_NORMAL),
1213 SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, and SCHED_IDLE are respectively
1214 displayed as 0,\ 1,\ 2,\ 3,\ 4,\ and\ 5.
1218 session\ ID or, equivalently, the process\ ID of the session\ leader.
1219 (alias\ \fBsession\fR,\ \fBsid\fR).
1223 processor that the process is currently executing on.
1224 Displays "*" if the process is not currently running or runnable.
1229 (alias\ \fBsvgid\fR).
1233 saved group\ name. This will be the textual group\ ID,
1234 if\ it can be obtained and the field width permits,
1235 or\ a\ decimal representation otherwise.
1239 see\ \fBsess\fR. (alias\ \fBsess\fR,\ \fBsession\fR).
1243 see\ \fBpending\fR. (alias\ \fBpending\fR,\ \fBsig_pend\fR).
1247 see\ \fBcaught\fR. (alias\ \fBcaught\fR,\ \fBsig_catch\fR).
1250 sigignore IGNORED T{
1251 see\ \fBignored\fR. (alias\ \fBignored\fR,\ \fBsig_ignore\fR).
1255 see\ \fBblocked\fR. (alias\ \fBblocked\fR,\ \fBsig_block\fR).
1259 approximate amount of swap space that would be required
1260 if the process were to dirty all writable pages and then
1262 This number is very\ rough!
1266 see \fBlwp\fR. (alias\ \fBlwp\fR,\ \fBtid\fR).
1270 address of the bottom (start) of stack for the process.
1274 time the command started.
1275 If the process was started less than 24 hours ago,
1276 the output format is "HH:MM:SS",
1277 else it is "\ \ mmm\ dd"
1278 (where mmm is a three\-letter month\ name).
1279 See also \fBlstart\fR, \fBbsdstart\fR, \fBstart_time\fR, and \fBstime\fR.
1283 starting time or date of the process.
1284 Only the year will be displayed if the process was not
1285 started the same year \fBps\fR was invoked,
1286 or\ "mmmdd" if\ it was not started the same day,
1287 or\ "HH:MM" otherwise.
1288 See also \fBbsdstart\fR, \fBstart\fR, \fBlstart\fR, and \fBstime\fR.
1292 multi\-character process state.
1293 See\ section \fBPROCESS STATE CODES\fR
1294 for the different values meaning.
1295 See also \fBs\fR and \fBstate\fR if you just want
1296 the first character displayed.
1300 see\ \fBs\fR. (alias\ \fBs\fR).
1304 saved user\ ID. (alias\ \fBsvuid\fR).
1308 saved user name. This will be the textual user\ ID,
1309 if\ it can be obtained and the field width permits,
1310 or\ a\ decimal representation otherwise.
1311 (alias\ \fBsvuser\fR).
1315 see\ \fBsgid\fR. (alias\ \fBsgid\fR).
1319 see\ \fBsuid\fR. (alias\ \fBsuid\fR).
1323 size in physical pages of the core image of the process.
1324 This includes text, data, and stack space.
1325 Device mappings are currently excluded; this is subject to change.
1326 See \fBvsz\fR and \fBrss\fR.
1330 see \fBnlwp\fR. (alias\ \fBnlwp\fR).
1331 number of kernel threads owned by the process.
1335 see\ \fBlwp\fR. (alias\ \fBlwp\fR).
1339 cumulative CPU\ time, "[dd\-]hh:mm:ss" format. (alias\ \fBcputime\fR).
1343 controlling tty (terminal).
1344 (alias\ \fBtt\fR,\ \fBtty\fR).
1348 ID of the foreground process group on the tty (terminal) that
1349 the process is connected to, or \-1 if the process is not connected
1354 controlling tty (terminal). (alias\ \fBtname\fR,\ \fBtty\fR).
1358 controlling tty (terminal). (alias\ \fBtname\fR,\ \fBtt\fR).
1362 see \fBcomm\fR. (alias\ \fBcomm\fR,\ \fBucomm\fR).
1366 see \fBcomm\fR. (alias\ \fBcomm\fR,\ \fBucmd\fR).
1370 see \fBeuid\fR. (alias\ \fBeuid\fR).
1374 see \fBeuser\fR. (alias\ \fBeuser\fR,\ \fBuser\fR).
1378 see \fBeuser\fR. (alias\ \fBeuser\fR,\ \fBuname\fR).
1382 see \fBvsz\fR. (alias\ \fBvsz\fR).
1386 virtual memory size of the process in KiB (1024\-byte\ units).
1387 Device mappings are currently excluded; this is subject to change.
1388 (alias\ \fBvsize\fR).
1392 name of the kernel function in which the process is sleeping,
1393 a\ "\-"\ if the process is running,
1394 or a "*"\ if the process is multi\-threaded and
1395 \fBps\fR is not displaying threads.
1398 .\" #######################################################################
1401 .SH "ENVIRONMENT VARIABLES"
1402 The following environment variables could affect \fBps\fR:
1405 Override default display width.
1408 Override default display height.
1411 Set to one of posix, old, linux, bsd, sun, digital...
1412 (see\ section\ \fBPERSONALITY\fR\ below).
1415 Set to one of posix, old, linux, bsd, sun, digital...
1416 (see\ section\ \fBPERSONALITY\fR\ below).
1418 .B I_WANT_A_BROKEN_PS
1419 Force obsolete command line interpretation.
1425 Not currently supported.
1428 Default output format override. You may set this to a format
1429 string of the type used for the \fB\-o\fR option.
1430 The \fBDefSysV\fR and \fBDefBSD\fR values are particularly useful.
1433 Default namelist (System.map) location.
1436 Default namelist (System.map) location.
1439 Don't find excuses to ignore bad "features".
1442 When set to "on", acts as \fBPOSIXLY_CORRECT\fR.
1445 Don't find excuses to ignore bad "features".
1448 Cancel \fBCMD_ENV\fI=irix\fR non\-standard behavior.
1450 In general, it\ is a bad idea to set these variables.
1451 The one exception is \fBCMD_ENV\fR or \fBPS_PERSONALITY\fR,
1452 which could be set to Linux for normal systems.
1453 Without that setting,
1454 \fBps\fR follows the useless and bad parts of the Unix98 standard.
1460 390 like the S/390 OpenEdition \fBps\fR
1461 aix like AIX \fBps\fR
1462 bsd like FreeBSD \fBps\fR (totally\ non\-standard)
1463 compaq like Digital Unix \fBps\fR
1464 debian like the old Debian \fBps\fR
1465 digital like Tru64 (was Digital\ Unix, was OSF/1) \fBps\fR
1466 gnu like the old Debian \fBps\fR
1467 hp like HP\-UX \fBps\fR
1468 hpux like HP\-UX \fBps\fR
1469 irix like Irix \fBps\fR
1470 linux ***** RECOMMENDED *****
1471 old like the original Linux \fBps\fR (totally\ non\-standard)
1472 os390 like OS/390 Open Edition \fBps\fR
1474 s390 like OS/390 Open Edition \fBps\fR
1475 sco like SCO \fBps\fR
1476 sgi like Irix \fBps\fR
1477 solaris2 like Solaris 2+ (SunOS 5) \fBps\fR
1478 sunos4 like SunOS 4 (Solaris 1) \fBps\fR (totally\ non\-standard)
1481 tru64 like Tru64 (was Digital\ Unix, was OSF/1) \fBps\fR
1489 \fItop\fR(1), \fIpgrep\fR(1), \fIpstree\fR(1), \fIproc\fR(5).
1493 This \fBps\fR conforms to:
1497 Version 2 of the Single Unix Specification
1499 The Open Group Technical Standard Base Specifications, Issue\ 6
1501 IEEE Std 1003.1, 2004\ Edition
1503 X/Open System Interfaces Extension [UP\ XSI]
1509 \fBps\fR was originally written by Branko Lankester <lankeste@fwi.uva.nl>. Michael
1510 K. Johnson <johnsonm@redhat.com> re\-wrote it significantly to use the proc
1511 filesystem, changing a few things in the process. Michael Shields
1512 <mjshield@nyx.cs.du.edu> added the pid\-list feature. Charles Blake
1513 <cblake@bbn.com> added multi\-level sorting, the dirent\-style library, the
1514 device name\-to\-number mmaped database, the approximate binary search
1515 directly on System.map, and many code and documentation cleanups. David
1516 Mossberger\-Tang wrote the generic BFD support for psupdate. Albert Cahalan
1517 <albert@users.sf.net> rewrote ps for full Unix98 and BSD support, along with
1518 some ugly hacks for obsolete and foreign syntax.
1520 Please send bug reports to <procps\-feedback@lists.sf.net>.
1521 No\ subscription is required or suggested.