Debian Codegraph @

man/ps.1

raw
1 .\"
2 .\" Copyright (c) 2004-2025 Craig Small <[email protected]>
3 .\" Copyright (c) 2011-2023 Jim Warner <[email protected]>
4 .\" Copyright (c) 2011-2012 Sami Kerola <[email protected]>
5 .\" Copyright (c) 1998-2003 Albert Cahalan
6 .\"
7 .\" This program is free software; you can redistribute it and/or modify
8 .\" it under the terms of the GNU General Public License as published by
9 .\" the Free Software Foundation; either version 2 of the License, or
10 .\" (at your option) any later version.
11 .\"
12 .\"
13 .TH PS 1 2025-04-23 procps-ng
14 .\"
15 .\" Ragged-right text.
16 .na
17 .\" Disable hyphenation.
18 .nh
19 .SH NAME
20 ps \- report a snapshot of the current processes.
21 .SH SYNOPSIS
22 .B ps
23 .RI [ option " .\|.\|.]"
24 .SH DESCRIPTION
25 .B ps
26 displays information about a selection of the active processes. If you want
27 a repetitive update of the selection and the displayed information, use
28 .B top
29 instead.
30 .P
31 This version of
32 .B ps
33 accepts several kinds of options.
34 .TP 4n
35 \[bu]
36 Unix options, which may be grouped and must be preceded by a dash.
37 .TP
38 \[bu]
39 BSD options, which may be grouped and must not be used with a dash.
40 .TP
41 \[bu]
42 GNU long options, which are preceded by two dashes.
43 .PP
44 Options of different types may be freely mixed, but conflicts can appear.
45 There are some synonymous options, which are functionally identical, due to
46 the many standards and
47 .B ps
48 implementations that this
49 .B ps
50 is compatible with.
51 .P
52 By default,
53 .B ps
54 selects all processes with the same effective user ID (euid=EUID) as the
55 current user and associated with the same terminal as the invoker. It
56 displays the process ID (pid=PID), the terminal associated with the process
57 (tname=TTY), the cumulated CPU time in [DD\-]hh:mm:ss format (time=TIME), and
58 the executable name (ucmd=CMD). Output is unsorted by default.
59 .P
60 The use of BSD\-style options will add process state (stat=STAT) to the
61 default display and show the command args (args=COMMAND) instead of the
62 executable name. You can override this with the
63 .B PS_FORMAT
64 environment variable. The use of BSD\-style options will also change the
65 process selection to include processes on other terminals (TTYs) that are
66 owned by you; alternately, this may be described as setting the selection to
67 be the set of all processes filtered to exclude processes owned by other
68 users or not on a terminal. These effects are not considered when options
69 are described as being "identical" below, so
70 .B \-M
71 will be considered identical to \fBZ\fR and so on.
72 .P
73 Except as described below, process selection options are additive. The
74 default selection is discarded, and then the selected processes are added to
75 the set of processes to be displayed. A process will thus be shown if it
76 meets any of the given selection criteria.
77 .SH "EXAMPLES"
78 .TP 3
79 To see every process on the system using standard syntax:
80 .B ps\ \-e
81 .br
82 .B ps\ \-ef
83 .br
84 .B ps\ \-eF
85 .br
86 .B ps\ \-ely
87 .TP
88 To see every process on the system using BSD syntax:
89 .B ps\ ax
90 .br
91 .B ps\ axu
92 .TP
93 To print a process tree:
94 .B ps\ \-ejH
95 .br
96 .B ps\ axjf
97 .TP
98 To get info about threads:
99 .B ps\ \-eLf
100 .br
101 .B ps\ axms
102 .TP
103 To get security info:
104 .B ps\ \-eo euser,ruser,suser,fuser,f,comm,label
105 .br
106 .B ps\ axZ
107 .br
108 .B ps\ \-eM
109 .TP
110 To see every process running as root (real\ &\ effective\ ID) in user format:
111 .B ps\ \-U\ root\ \-u\ root\ u
112 .TP
113 To see every process with a user\-defined format:
114 .B ps\ \-eo\ pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
115 .br
116 .B ps\ axo\ stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
117 .br
118 .B ps\ \-Ao\ pid,tt,user,fname,tmout,f,wchan
119 .TP
120 Print only the process IDs of syslogd:
121 .B ps\ \-C\ syslogd\ \-o\ pid=
122 .TP
123 Print only the name of PID 42:
124 .B ps\ \-q\ 42\ \-o\ comm=
125 .SH "SIMPLE PROCESS SELECTION"
126 .TP
127 .B a
128 Lift the BSD\-style "only yourself" restriction, which is imposed upon the
129 set of all processes when some BSD\-style (without "\-") options are used or
130 when the
131 .B ps
132 personality setting is BSD\-like. The set of processes selected in this
133 manner is in addition to the set of processes selected by other means. An
134 alternate description is that this option causes
135 .B ps
136 to list all processes with a terminal (tty), or to list all processes when
137 used together with the
138 .B x
139 option.
140 .TP
141 .B \-A
142 Select all processes. Identical to
143 .BR \-e .
144 .TP
145 .B \-a
146 Select all processes except both session leaders (see
147 .IR getsid (2))
148 and processes not associated with a terminal.
149 .TP
150 .B \-d
151 Select all processes except session leaders.
152 .TP
153 .B \-\-deselect
154 Select all processes except those that fulfill the specified conditions
155 (negates the selection). Identical to
156 .BR \-N .
157 .TP
158 .B \-e
159 Select all processes. Identical to
160 .BR \-A .
161 .\" Current "g" behavior: add in the session leaders, which would
162 .\" be excluded in the sunos4 personality. Supposed "g" behavior:
163 .\" add in the group leaders -- at least according to the SunOS 4
164 .\" man page on the FreeBSD site. Uh oh. I think I had tested SunOS
165 .\" though, so maybe the code is correct.
166 .TP
167 .B g
168 Really all, even session leaders. This flag is obsolete and may be
169 discontinued in a future release. It is normally implied by the
170 .B a
171 flag, and is only useful when operating in the sunos4 personality.
172 .TP
173 .B \-N
174 Select all processes except those that fulfill the specified conditions
175 (negates the selection). Identical to
176 .BR \-\-deselect .
177 .TP
178 .B T
179 Select all processes associated with this terminal. Identical to the
180 .B t
181 option without any argument.
182 .TP
183 .B r
184 Restrict the selection to only running processes.
185 .TP
186 .B x
187 Lift the BSD\-style "must have a tty" restriction, which is imposed upon the
188 set of all processes when some BSD\-style (without "\-") options are used or
189 when the
190 .B ps
191 personality setting is BSD\-like. The set of processes selected in this
192 manner is in addition to the set of processes selected by other means. An
193 alternate description is that this option causes
194 .B ps
195 to list all processes owned by you (same EUID as
196 .BR ps ),
197 or to list all processes when used together with the
198 .B a
199 option.
200 .SH "PROCESS SELECTION BY LIST"
201 These options accept a single argument in the form of a blank\-separated or
202 comma\-separated list. They can be used multiple times. For example:
203 .B ps\ \-p\ "1\ 2"\ \-p\ 3,4
204 .TP
205 .I 123
206 Identical to
207 .B \-\-pid\ \fI123\fR.
208 .TP
209 .RI + 123
210 Identical to
211 .B \-\-sid\ \fI123\fR.
212 .TP
213 .RI \- 123
214 Select by process group ID (PGID).
215 .TP
216 .BI \-C \ cmdlist
217 Select by command name. This selects the processes whose executable name is
218 given in
219 .IR cmdlist .
220 NOTE: The command name is not the same as the command line. Previous versions
221 of procps and the kernel truncated this command name to 15 characters. This
222 limitation is no longer present in both. If you depended on matching only
223 15 characters, you may no longer get a match.
224 .TP
225 .BI \-G \ grplist
226 Select by real group ID (RGID) or name. This selects the processes whose
227 real group name or ID is in the
228 .I grplist
229 list. The real group ID identifies the group of the user who created the
230 process, see
231 .IR getgid (2).
232 .TP
233 .BI \-g \ grplist
234 Select by session OR by effective group name. Selection by session is
235 specified by many standards, but selection by effective group is the logical
236 behavior that several other operating systems use. This
237 .B ps
238 will select by session when the list is completely numeric (as sessions
239 are). Group ID numbers will work only when some group names are also
240 specified. See the
241 .B \-s
242 and
243 .B \-\-group
244 options.
245 .TP
246 .BI \-\-Group \ grplist
247 Select by real group ID (RGID) or name. Identical to
248 .BR \-G .
249 .TP
250 .BI \-\-group \ grplist
251 Select by effective group ID (EGID) or name. This selects the processes
252 whose effective group name or ID is in
253 .IR grplist .
254 The effective group ID describes the group whose file access permissions are
255 used by the process (see
256 .IR getegid (2)).
257 The
258 .B \-g
259 option is often an alternative to
260 .BR \-\-group .
261 .TP
262 .BI p \ pidlist
263 Select by process ID. Identical to
264 .B \-p
265 and
266 .BR \-\-pid .
267 .TP
268 .BI \-p \ pidlist
269 Select by PID. This selects the processes whose process ID numbers appear in
270 .IR pidlist .
271 Identical to
272 .B p
273 and
274 .BR \-\-pid .
275 .TP
276 .BI \-\-pid \ pidlist
277 Select by process\ ID. Identical to
278 .B \-p
279 and
280 .BR p .
281 .TP
282 .BI \-\-ppid \ pidlist
283 Select by parent process ID. This selects the processes with a parent
284 process\ ID in
285 .IR pidlist .
286 That is, it selects processes that are children of those listed in
287 .IR pidlist .
288 .TP
289 .BI q \ pidlist
290 Select by process ID (quick mode). Identical to
291 .B \-q
292 and
293 .BR \-\-quick\-pid .
294 .TP
295 .BI \-q \ pidlist
296 Select by PID (quick mode).
297 This selects the processes whose process ID numbers appear in
298 .IR pidlist .
299 With this option \fBps\fR reads the necessary info only
300 for the pids listed in the \fIpidlist\fR and doesn't apply
301 additional filtering rules. The order of pids is unsorted
302 and preserved. No additional selection options, sorting
303 and forest type listings are allowed in this mode.
304 Identical to
305 .B q
306 and
307 .BR \-\-quick\-pid .
308 .TP
309 .BI \-\-quick\-pid \ pidlist
310 Select by process\ ID (quick mode). Identical to
311 .B \-q
312 and
313 .BR q .
314 .TP
315 .BI \-s \ sesslist
316 Select by session ID. This selects the processes with a session ID specified
317 in
318 .IR sesslist .
319 .TP
320 .BI \-\-sid \ sesslist
321 Select by session\ ID. Identical to
322 .BR \-s .
323 .TP
324 .BI t \ ttylist
325 Select by tty. Nearly identical to
326 .B \-t
327 and
328 .BR \-\-tty ,
329 but can also
330 be used with an empty
331 .I ttylist
332 to indicate the terminal associated with
333 .BR ps .
334 Using the
335 .B T
336 option is considered cleaner than using
337 .B t
338 with an empty
339 .IR ttylist .
340 .TP
341 .BI \-t \ ttylist
342 Select by tty. This selects the processes associated with the terminals
343 given in
344 .IR ttylist .
345 Terminals (ttys, or screens for text output) can be specified in several
346 forms: /dev/ttyS1, ttyS1, S1. A plain "\-" may be used to select processes
347 not attached to any terminal.
348 .TP
349 .BI \-\-tty \ ttylist
350 Select by terminal. Identical to
351 .B \-t
352 and
353 .BR t .
354 .TP
355 .BI U \ userlist
356 Select by effective user ID (EUID) or name. This selects the processes whose
357 effective user name or ID is in
358 .IR userlist .
359 The effective user ID describes the user whose file access permissions are
360 used by the process (see
361 .IR geteuid (2)).
362 Identical to
363 .B \-u
364 and
365 .BR \-\-user .
366 .TP
367 .BI \-U \ userlist
368 Select by real user ID (RUID) or name. It selects the processes whose real
369 user name or ID is in the
370 .I userlist
371 list. The real user ID identifies the user who created the process, see
372 .IR getuid (2).
373 .TP
374 .BI \-u \ userlist
375 Select by effective user ID (EUID) or name. This selects the processes whose
376 effective user name or ID is in
377 .IR userlist .
378 .P
379 The effective user ID describes the user whose file
380 access permissions are used by the process (see
381 .IR geteuid (2)).
382 Identical to
383 .B U
384 and
385 .BR \-\-user .
386 .TP
387 .BI \-\-User \ userlist
388 Select by real user ID (RUID) or name. Identical to
389 .BR \-U .
390 .TP
391 .BI \-\-user \ userlist
392 Select by effective user ID (EUID) or name. Identical to
393 .B \-u
394 and
395 .BR U .
396 .SH "OUTPUT FORMAT CONTROL"
397 These options are used to choose the information displayed by
398 .BR ps .
399 The output may differ by personality. The options in brackets at the end
400 of the description are the format equivalents.
401 .TP
402 .B \-c
403 Show different scheduler information for the
404 .B \-l
405 option. (\fB\-O cls,pri\fR).
406 .TP
407 .B \-\-context
408 Display security context format (for SELinux). (\fB\-o pid,context,cmd\fR).
409 .TP
410 .B \-f
411 Do full\-format listing. This option can be combined with many other
412 Unix\-style options to add additional columns. It also causes the command
413 arguments to be printed. When used with
414 .BR \-L ,
415 the NLWP (number of threads) and LWP (thread ID) columns will be added. See
416 the
417 .B c
418 option, the format keyword
419 .BR args ,
420 and the format keyword
421 .BR comm .
422 (\fB\-o uid,pid,ppid,c,stime,tty,time,cmd\fR).
423 .TP
424 .B \-F
425 Extra full format. See the
426 .B \-f
427 option, which
428 .B \-F
429 implies. (\fB\-o uid,pid,ppid,c,sz,rss,psr,stime,tty,time,cmd\fR).
430 .TP
431 .BI \-\-format \ format
432 user\-defined format. Identical to
433 .B \-o
434 and
435 .BR o .
436 .TP
437 .B j
438 BSD job control format. (\fB\-o ppid,pid,pgid,sid,tty,tpgid,stat,uid,time,cmd a\fR)
439 .TP
440 .B \-j
441 Jobs format. (\fB\-o pid,pgid,sid,tty,time,ucmd\fR)
442 .TP
443 .B l
444 Display BSD long format. (\fB\-o f,uid,pid,ppid,pri,ni,vsz,rss,wchan,stat,tty,time,cmd a\fR)
445 .TP
446 .B \-l
447 Long format. The
448 .B \-y
449 option is often useful with this. (\fB\-o f,uid,pid,ppid,c,pri,ni,addr,sz,wchan,tty,time,ucmd\fR)
450 .TP
451 .B \-M
452 Add a column of security data. Identical to
453 .B Z
454 (for SELinux). (\fB\-o context,pid,tty,time,ucmd\fR)
455 .TP
456 .BI O \ format
457 is preloaded
458 .B o
459 (overloaded). The BSD
460 .B O
461 option can act like
462 .B \-O
463 (user\-defined output format with some common fields predefined) or can be
464 used to specify sort order. Heuristics are used to determine the behavior of
465 this option. To ensure that the desired behavior is obtained (sorting or
466 formatting), specify the option in some other way (e.g., with
467 .B \-O
468 or
469 .BR \-\-sort ).
470 When used as a formatting option, it is identical to
471 .BR \-O ,
472 with the BSD personality.
473 .TP
474 .BI \-O \ format
475 Like
476 .BR \-o ,
477 but preloaded with some default columns. Identical to
478 .BI \-o\ pid,\: format ,\:state,\:tname,\:time,\:command
479 or
480 .BI \-o\ pid,\: format ,\:tname,\:time,\:cmd \fR,
481 see
482 .B \-o
483 below.
484 .TP
485 .BI o \ format
486 Specify user\-defined format. Identical to
487 .B \-o
488 and
489 .BR \-\-format .
490 .TP
491 .BI \-o \ format
492 User\-defined format.
493 .I format
494 is a single argument in the form of a blank\-separated or comma\-separated
495 list, which offers a way to specify individual output columns. The
496 recognized keywords are described in the
497 .B STANDARD FORMAT SPECIFIERS
498 section below. Headers may be renamed
499 .RB ( "ps \-o pid,\:ruser=RealUser \-o comm=Command" )
500 as desired.
501 If all column headers are empty
502 .RB ( "ps \-o pid= \-o comm=" )
503 then the header line will not be output. Column width will increase as
504 needed for wide headers; this may be used to widen up columns such as WCHAN
505 .RB ( "ps \-o pid,\:wchan=\:WIDE\-\:WCHAN\-\:COLUMN \-o comm" ).
506 Explicit width
507 control
508 .RB ( "ps opid,\:wchan:42,\:cmd" )
509 is offered too. The behavior of
510 .B ps \-o pid=X,\:comm=Y
511 varies with personality; output may be one column named "X,\:comm=Y" or two
512 columns named "X" and "Y". Use multiple
513 .B \-o
514 options when in doubt. Use the
515 .B PS_FORMAT
516 environment variable to specify a default as desired; DefSysV and DefBSD are
517 macros that may be used to choose the default Unix or BSD columns.
518 .TP
519 .B \-P
520 Add a column showing \fBpsr\fR. (\fB\-o pid,psr,s,tty,time,ucmd\fR)
521 .TP
522 .B s
523 Display signal format. (\fB\-o uid,pid,pending,blocked,ignored,caught,stat,tty,bsdtime,cmd a\fR)
524 .TP
525 .B u
526 Display user\-oriented format. (\fB\-o user,pid,pcpu,pmem,vsz,rss,tty,stat,start_time,bsdtime,args a\fR)
527 .TP
528 .B v
529 Display virtual memory format. (\fB\-o pid,tty,stat,bsdtime,majflt,trs,drs,rss,pmem,args a\fR)
530 .TP
531 .B X
532 Register format. (\fB \-o pid,stackp,esp,eip,tmout,alarm,stat,tty,bsdtime,args a\fR)
533 .TP
534 .B \-y
535 Do not show flags; show rss in place of addr. This option can only be used
536 with
537 .BR \-l .
538 .TP
539 .B Z
540 Add a column of security data. Identical to
541 .B \-M
542 (for SELinux).
543 .SH "OUTPUT MODIFIERS"
544 .TP
545 .B c
546 Show the true command name. This is derived from the name of the executable
547 file, rather than from the argv value. Command arguments and any
548 modifications to them are thus not shown. This option effectively turns the
549 .B args
550 format keyword into the
551 .B comm
552 format keyword; it is useful with the
553 .B \-f
554 format option and with the various BSD\-style format options, which all
555 normally display the command arguments. See the
556 .B \-f
557 option, the format
558 keyword
559 .BR args ,
560 and the format keyword
561 .BR comm .
562 .TP
563 .BI \-\-cols \ n
564 Set screen width.
565 .TP
566 .BI \-\-columns \ n
567 Set screen width.
568 .TP
569 .B \-\-cumulative
570 Include some dead child process data (as a sum with the parent).
571 .TP
572 .BI \-D \ format
573 Set the date format of the \fBlstart\fR field to \fIformat\fR.
574 This format is parsed by
575 .BR strftime (3)
576 and should be a maximum of 24 characters to not mis-align columns.
577 .TP
578 .BI \-\-date-format \ format
579 Identical to \fB\-D\fR.
580 .TP
581 .BI \-\-delimiter \ delim
582 Set the delimiter between each column to \fIdelim\fR instead of variable space. Must be a single character.
583 .TP
584 .B e
585 Show the environment after the command.
586 .TP
587 .B f
588 ASCII art process hierarchy (forest).
589 .TP
590 .B \-\-forest
591 ASCII art process tree.
592 .TP
593 .B h
594 No header. (or, one header per screen in the BSD personality). The
595 .B h
596 option is problematic. Standard BSD
597 .B ps
598 uses this option to print a header on each page of output, but older Linux
599 .B ps
600 uses this option to totally disable the header. This version of
601 .B ps
602 follows the Linux usage of not printing the header unless the BSD personality
603 has been selected, in which case it prints a header on each page of output.
604 Regardless of the current personality, you can use the long options
605 .B \-\-headers
606 and
607 .B \-\-no\-headers
608 to enable printing headers each page or disable headers entirely,
609 respectively.
610 .TP
611 .B \-H
612 Show process hierarchy (forest).
613 .TP
614 .B \-\-headers
615 Repeat header lines, one per page of output.
616 .TP
617 .BI k \ spec
618 Specify sorting order. Sorting syntax is
619 .RB [ + | \- ]\c
620 .I key\/\c
621 .RB [,[ + | \- ]\c
622 .IR key [,.\|.\|.]].
623 Choose a multi\-letter key from the
624 .B STANDARD FORMAT SPECIFIERS
625 section. The "+" is optional since default direction is increasing
626 numerical or lexicographic order. Identical to
627 .BR \-\-sort .
628 .RS 8
629 .IP
630 Examples:
631 .br
632 .B ps jaxkuid,\-ppid,+pid
633 .br
634 .B ps axk comm o comm,args
635 .br
636 .B ps kstart_time \-ef
637 .RE
638 .TP
639 .BI \-\-lines \ n
640 Set screen height.
641 .TP
642 .B n
643 Numeric output for WCHAN and USER (including all types of UID and GID).
644 .TP
645 .B \-\-no\-headers
646 Print no header line at all.
647 .B \-\-no\-heading
648 is an alias for this option.
649 .TP
650 .BI O \ order
651 Sorting order (overloaded).
652 The BSD
653 .B O
654 option can act like
655 .B \-O
656 (user\-defined output format with some common fields predefined) or can be
657 used to specify sort order. Heuristics are used to determine the behavior of
658 this option. To ensure that the desired behavior is obtained (sorting or
659 formatting), specify the option in some other way (e.g., with
660 .B \-O
661 or
662 .BR \-\-sort ).
663 .IP
664 For sorting, obsolete BSD
665 .B O
666 option syntax is
667 .BR O [ + | \- ]\c
668 .IR k1 [,[\c
669 .BR + | \- ]\c
670 .IR k2 [,.\|.\|.]].
671 It orders the processes listing according to the multilevel sort specified by
672 the sequence of one\-letter short keys
673 .IR k1 , k2 ", .\|.\|.\&"
674 described in the
675 .B OBSOLETE SORT KEYS
676 section below. The\ "+" is currently optional, merely re\-iterating the
677 default direction on a key, but may help to distinguish an
678 .B O
679 sort from an
680 .B O
681 format. The "\-" reverses direction only on the key it precedes.
682 .TP
683 .BI \-\-rows \ n
684 Set screen height.
685 .TP
686 .B S
687 Sum up some information, such as CPU usage, from dead child processes into
688 their parent. This is useful for examining a system where a parent process
689 repeatedly forks off short\-lived children to do work.
690 .TP
691 .BI \-\-sort \ spec
692 Specify sorting order. Sorting syntax is
693 .RI [ + | \- ]\c
694 .IR key [,[\c
695 .BR + | \- ]\c
696 .IR key [,.\|.\|.]].
697 Choose a multi\-letter key from the
698 .B STANDARD FORMAT SPECIFIERS
699 section. The "+" is optional since default direction is increasing numerical
700 or lexicographic order. Identical to
701 .BR k .
702 For example:
703 .B ps jax \-\-sort=\:uid,\:\-ppid,\:+pid
704 .TP
705 .B \-\-signames
706 Show signal masks using abbreviated signal names and expands the column.
707 If the column width cannot show all signals,
708 the column will end with a plus "\fI+\fR".
709 Columns with only a hyphen have no signals.
710 .TP
711 .B w
712 Wide output. Use this option twice for unlimited width.
713 .TP
714 .B \-w
715 Wide output. Use this option twice for unlimited width.
716 .TP
717 .BI \-\-width \ n
718 Set screen width.
719 .SH "THREAD DISPLAY"
720 .TP
721 .B H
722 Show threads as if they were processes.
723 .TP
724 .B \-L
725 Show threads, possibly with LWP and NLWP columns.
726 .TP
727 .B m
728 Show threads after processes.
729 .TP
730 .B \-m
731 Show threads after processes.
732 .TP
733 .B \-T
734 Show threads, possibly with SPID column.
735 .SH "OTHER INFORMATION"
736 .TP
737 .BI \-\-help \ section
738 Print a help message. The \fIsection\fR argument can be one of
739 .IR s imple,
740 .IR l ist,
741 .IR o utput,
742 .IR t hreads,
743 .IR m "isc, or"
744 .IR a ll.
745 The argument can be shortened to one of the underlined letters as in:
746 s\^|\^l\^|\^o\^|\^t\^|\^m\^|\^a.
747 .TP
748 .B \-\-info
749 Print debugging info.
750 .TP
751 .B L
752 List all format specifiers.
753 .TP
754 .B V
755 Print the procps-ng version.
756 .TP
757 .B \-V
758 Print the procps-ng version.
759 .TP
760 .B \-\-version
761 Print the procps-ng version.
762 .SH NOTES
763 This
764 .B ps
765 works by reading the virtual files in /proc. This
766 .B ps
767 does not need to be setuid kmem or have any privileges to run. Do not give
768 this
769 .B ps
770 any special permissions.
771 .PP
772 CPU usage is currently expressed as the percentage of time spent running
773 during the entire lifetime of a process. This is not ideal, and\ it does not
774 conform to the standards that
775 .B ps
776 otherwise conforms to. CPU usage is unlikely to add up to exactly 100%.
777 .PP
778 The SIZE and RSS fields don't count some parts of a process including the
779 page tables, kernel stack, struct thread_info, and struct task_struct. This
780 is usually at least 20\ KiB of memory that is always resident. SIZE is the
781 virtual size of the process (code+\:data+\:stack).
782 .PP
783 Processes marked <defunct> are dead processes (so\-called "zombies") that
784 remain because their parent has not destroyed them properly. These processes
785 will be destroyed by
786 .IR init (8)
787 if the parent process exits.
788 .PP
789 If the length of the username is greater than the width of the display
790 column, the username will be truncated. See the \fB\-o\fR and \fB\-O\fR
791 formatting options to customize length.
792 .PP
793 Commands options such as
794 .B ps \-aux
795 are not recommended as it is a confusion of two different standards.
796 According to the POSIX and Unix standards, the above command asks to
797 display all processes with a TTY (generally the commands users are
798 running) plus all processes owned by a user named \fIx\fR. If that user
799 doesn't exist, then
800 .B ps
801 will assume you really meant
802 .RB """" ps
803 .IR aux """."
804 .SH "PROCESS FLAGS"
805 The sum of these values is displayed in the "F" column,
806 which is provided by the
807 .B flags
808 output specifier:
809 .PP
810 .RS 8
811 .TS
812 R4 L.
813 1 forked but didn't exec
814 4 used super-user privileges
815 .TE
816 .RE
817 .SH "PROCESS STATE CODES"
818 Here are the different values that the
819 .BR s ", " stat " and " state
820 output specifiers (header "STAT" or "S") will display to describe the state
821 of a process:
822 .PP
823 .RS 8
824 .TS
825 R4 L.
826 D uninterruptible sleep (usually I/O)
827 I idle kernel thread
828 R running or runnable (on run queue)
829 S T{
830 interruptible sleep
831 (waiting for an event to complete)
832 T}
833 T stopped by job control signal
834 t stopped by debugger during the tracing
835 W paging (not valid since Linux 2.6)
836 X dead (should never be seen)
837 Z T{
838 defunct (\[lq]zombie\[rq]) process,
839 terminated but not reaped by its parent
840 T}
841 .TE
842 .RE
843 .PP
844 For BSD formats and when the
845 .B stat
846 keyword is used, additional characters may be displayed:
847 .PP
848 .RS 8
849 .TS
850 R4 L.
851 < high-priority (not nice to other users)
852 N low-priority (nice to other users)
853 L T{
854 has pages locked into memory
855 (for real-time and custom I/O)
856 T}
857 s is a session leader
858 l T{
859 is multi-threaded
860 (using CLONE_THREAD,
861 like NPTL pthreads do)
862 T}
863 + is in the foreground process group
864 .TE
865 .RE
866 .SH "OBSOLETE SORT KEYS"
867 These keys are used by the BSD
868 .B O
869 option (when it is used for sorting). The GNU
870 .B \-\-sort
871 option doesn't use these keys, but the specifiers described below in the
872 .B STANDARD FORMAT SPECIFIERS
873 section. Note that the values used in sorting are the internal values
874 .B ps
875 uses and not the "cooked" values used in some of the output format fields
876 (e.g., sorting on tty will sort into device number, not according to the
877 terminal name displayed). Pipe
878 .B ps
879 output into the
880 .BR sort (1)
881 command if you want to sort the cooked values.
882 .TS
883 Lb Lb Lb
884 L L Lx.
885 Key Long Description
886 _
887 c cmd simple name of executable
888 C pcpu cpu utilization
889 f flags flags as in long format F field
890 g pgrp process group ID
891 G tpgid controlling tty process group ID
892 j cutime cumulative user time
893 J cstime cumulative system time
894 k utime user time
895 m min_flt number of minor page faults
896 M maj_flt number of major page faults
897 n cmin_flt cumulative minor page faults
898 N cmaj_flt cumulative major page faults
899 o session session ID
900 p pid process ID
901 P ppid parent process ID
902 r rss resident set size
903 R resident resident pages
904 s size memory size in kibibytes
905 S share amount of shared pages
906 t tty the device number of the controlling tty
907 T start_time time process was started
908 U uid user ID number
909 u user user name
910 v vsize total VM size in KiB
911 y priority kernel scheduling priority
912 .\"K stime system time (conflict, system vs. start time)
913 .TE
914 .SH "AIX FORMAT DESCRIPTORS"
915 This
916 .B ps
917 supports AIX format descriptors, which work somewhat like the
918 formatting codes of
919 .IR printf (1)
920 and
921 .IR printf (3).
922 The
923 .B NORMAL
924 codes are described in the next section.
925 .TS
926 Lb Lb Lb
927 L L L .
928 Code Normal Header
929 _
930 %C pcpu %CPU
931 %G group GROUP
932 %P ppid PPID
933 %U user USER
934 %a args COMMAND
935 %c comm COMMAND
936 %g rgroup RGROUP
937 %n nice NI
938 %p pid PID
939 %r pgid PGID
940 %t etime ELAPSED
941 %u ruser RUSER
942 %x time TIME
943 %y tty TTY
944 %z vsz VSZ
945 .TE
946 .SH "STANDARD FORMAT SPECIFIERS"
947 Here are the different keywords that may be used to control the output
948 format (e.g., with option
949 .BR \-o )
950 or to sort the selected processes with the GNU\-style
951 .B \-\-sort
952 option.
953 .PP
954 For example:
955 .B ps \-eo pid,\:user,\:args \-\-sort user
956 .PP
957 This version of
958 .B ps
959 tries to recognize most of the keywords used in other implementations of
960 .BR ps .
961 .PP
962 The following user\-defined format specifiers may contain
963 spaces:
964 .BR args ", " cmd ", " comm ", " command ", " fname ", " ucmd ", " ucomm ,
965 .BR lstart ", " bsdstart ", " start .
966 .PP
967 Some keywords may not be available for sorting.
968 .PP
969 .TS
970 Lb Lb Lbx
971 Lb Lb L .
972 Code Header Description
973 _
974 %cpu %CPU T{
975 cpu utilization of the process in "##.#" format. Currently, it is the CPU
976 time used divided by the time the process has been running (cputime/realtime
977 ratio), expressed as a percentage. It will not add up to 100% unless you are
978 lucky. (alias
979 .BR pcpu ).
980 T}
981
982 %mem %MEM T{
983 ratio of the process's resident set size to the physical memory on the
984 machine, expressed as a percentage. (alias
985 .BR pmem ).
986 T}
987
988 ag_id AGID T{
989 The autogroup identifier associated with a process which operates in conjunction
990 with the CFS scheduler to improve interactive desktop performance.
991 T}
992
993 ag_nice AGNI T{
994 The autogroup nice value which affects scheduling of all processes in that group.
995 T}
996
997 args COMMAND T{
998 A command with all its arguments as a string.
999 Modifications to the arguments may be shown.
1000 The column contents may include spaces.
1001 A process marked \[lq]<defunct>\[rq] is partly dead,
1002 waiting to be fully destroyed by its parent.
1003 Sometimes the process arguments will be unavailable;
1004 when this happens,
1005 .B ps
1006 instead reports the executable name in brackets.
1007 (alias
1008 .BR cmd ", " command ).
1009 See also the
1010 .B comm
1011 format keyword, the
1012 .B \-f
1013 option, and the
1014 .B c
1015 option.
1016 .sp \n[PD]u
1017 When specified last,
1018 this column will extend to the edge of the display.
1019 If
1020 .B ps
1021 can not determine the display width,
1022 as when output is redirected (piped) into a file or another command,
1023 the output width is undefined
1024 (it may be 80,
1025 unlimited,
1026 determined by the
1027 .B TERM
1028 variable,
1029 and so on).
1030 The
1031 .B COLUMNS
1032 environment variable, which can be overridden with the
1033 .BR \-\-cols ", " \-\-columns " or " \-\-width
1034 option may be used to exactly determine the width in this case.
1035 The
1036 .B w
1037 or
1038 .B \-w
1039 option may be also be used to adjust width.
1040 T}
1041
1042 blocked BLOCKED T{
1043 mask of the blocked signals, see
1044 .IR signal (7).
1045 According to the width of the field, a 32 or 64\-bit mask in hexadecimal
1046 format is displayed, unless the \fB\-\-signames\fR option is used. (alias
1047 .BR sig_block ", " sigmask ).
1048 T}
1049
1050 bsdstart START T{
1051 time the command started. If the process was started less than 24 hours ago,
1052 the output format is "\ HH:MM", else it is " Mmm:SS" (where Mmm is the three
1053 letters of the month). See also
1054 .BR lstart , \ start , \ start_time ", and" \ stime .
1055 T}
1056
1057 bsdtime TIME T{
1058 accumulated cpu time, user + system. The display format is usually
1059 "MMM:SS", but can be shifted to the right if the process used more than 999
1060 minutes of cpu time.
1061 T}
1062
1063 c C T{
1064 processor utilization.
1065 Currently, this is the integer value of the percent
1066 usage over the lifetime of the process.
1067 (see
1068 .BR %cpu ).
1069 T}
1070
1071 caught CAUGHT T{
1072 mask of the caught signals, see
1073 .IR signal (7).
1074 According to the width of the field, a 32 or 64 bits mask in hexadecimal
1075 format is displayed, unless the \fB\-\-signames\fR option is used. (alias
1076 .BR sig_catch ", " sigcatch ).
1077 T}
1078
1079 cgname CGNAME T{
1080 display name of control groups to which the process belongs.
1081 T}
1082
1083 cgroup CGROUP T{
1084 display control groups to which the process belongs.
1085 T}
1086
1087 cgroupns CGROUPNS T{
1088 Unique inode number describing the namespace the process belongs to.
1089 See
1090 .IR namespaces (7).
1091 T}
1092
1093 class CLS T{
1094 scheduling class of the process. (alias
1095 .BR policy ", " cls ).
1096 Field's possible values are:
1097 .sp \n[PD]u
1098 .in +9n
1099 \- not reported
1100 .br
1101 TS SCHED_OTHER
1102 .br
1103 FF SCHED_FIFO
1104 .br
1105 RR SCHED_RR
1106 .br
1107 B SCHED_BATCH
1108 .br
1109 ISO SCHED_ISO
1110 .br
1111 IDL SCHED_IDLE
1112 .br
1113 DLN SCHED_DEADLINE
1114 .br
1115 ? unknown value
1116 .in
1117 T}
1118
1119 cls CLS T{
1120 scheduling class of the process. (alias
1121 .BR policy ", " cls ).
1122 Field's possible values are:
1123 .sp \n[PD]u
1124 .in +9n
1125 \- not reported
1126 .br
1127 TS SCHED_OTHER
1128 .br
1129 FF SCHED_FIFO
1130 .br
1131 RR SCHED_RR
1132 .br
1133 B SCHED_BATCH
1134 .br
1135 ISO SCHED_ISO
1136 .br
1137 IDL SCHED_IDLE
1138 .br
1139 DLN SCHED_DEADLINE
1140 .br
1141 ? unknown value
1142 .in
1143 T}
1144
1145 cmd CMD T{
1146 see
1147 .BR args .
1148 (alias
1149 .BR args ", " command ).
1150 T}
1151
1152 comm COMMAND T{
1153 command name (only the executable name). The output in this column may
1154 contain spaces.
1155 (alias
1156 .BR ucmd ", " ucomm ).
1157 See also the
1158 .B args
1159 format keyword, the
1160 .B \-f
1161 option, and the
1162 .B c
1163 option.
1164 .sp \n[PD]u
1165 When specified last, this column will extend to the edge of the display. If
1166 .B ps
1167 can not determine display width, as when output is redirected (piped) into a
1168 file or another command, the output width is undefined (it may be 80,
1169 unlimited, determined by the
1170 .B TERM
1171 variable, and so on). The
1172 .B COLUMNS
1173 environment variable or
1174 .B \-\-cols
1175 option may be used to exactly determine the width in this case. The
1176 .BR w \ or \ \-w
1177 option may be also be used to adjust width.
1178 T}
1179
1180 command COMMAND T{
1181 See
1182 .BR args .
1183 (alias
1184 .BR args ", " command ).
1185 T}
1186
1187 cp CP T{
1188 per\-mill (tenths of a percent) CPU usage. (see
1189 .BR %cpu ).
1190 T}
1191
1192 cpu CPU T{
1193 See
1194 .BR psr .
1195 (alias
1196 .BR cpuid ", " lastcpu ", " psr ).
1197 T}
1198
1199 cpuid CPUID T{
1200 See
1201 .BR psr .
1202 (alias
1203 .BR cpu ", " lastcpu ", " psr ).
1204 T}
1205
1206 cputime TIME T{
1207 cumulative CPU time, "[DD\-]hh:mm:ss" format. (alias
1208 .BR time ).
1209 T}
1210
1211 cputimes TIME T{
1212 cumulative CPU time in seconds (alias
1213 .BR times ).
1214 T}
1215
1216 cuc %CUC T{
1217 The CPU utilization of a process, including dead children,
1218 in an extended "##.###" format.
1219 (see also
1220 .BR %cpu ,
1221 .BR c ,
1222 .BR cp ,
1223 .BR cuu ,
1224 .BR pcpu ).
1225 T}
1226
1227 cuu %CUU T{
1228 The CPU utilization of a process in an extended "##.###" format.
1229 (see also
1230 .BR %cpu ,
1231 .BR c ,
1232 .BR cp ,
1233 .BR cuc ,
1234 .BR pcpu ).
1235 T}
1236
1237 docker DOCKER T{
1238 The abbreviated id of the docker container within which a task is running.
1239 If a process is not running inside a container, a dash ('\-') will be shown.
1240 T}
1241
1242 drs DRS T{
1243 data resident set size,
1244 the amount of private memory \fIreserved\fR by a process.
1245 It is also known as DATA.
1246 Such memory may not yet be mapped to
1247 .B rss
1248 but will always be included in the
1249 .B vsz
1250 amount.
1251 T}
1252
1253 egid EGID T{
1254 effective group ID number of the process as a decimal integer. (alias
1255 .BR gid ).
1256 T}
1257
1258 egroup EGROUP T{
1259 effective group ID of the process. This will be the textual group ID, if it
1260 can be obtained and the field width permits, or a decimal representation
1261 otherwise. (alias
1262 .BR group ).
1263 T}
1264
1265 eip EIP T{
1266 instruction pointer.
1267 As of kernel 4.9.xx will be zeroed out unless task is
1268 exiting or being core dumped.
1269 T}
1270
1271 esp ESP T{
1272 stack pointer.
1273 As of kernel 4.9.xx will be zeroed out unless task is
1274 exiting or being core dumped.
1275 T}
1276
1277 etime ELAPSED T{
1278 elapsed time since the process was started, in the form [[DD\-]hh:]mm:ss.
1279 T}
1280
1281 etimes ELAPSED T{
1282 elapsed time since the process was started, in seconds.
1283 T}
1284
1285 environ ENVIRON T{
1286 environment variables for the process.
1287 T}
1288 euid EUID T{
1289 effective user ID (alias
1290 .BR uid ).
1291 T}
1292
1293 euser EUSER T{
1294 effective user name. This will be the textual user ID, if it can be obtained
1295 and the field width permits, or a decimal representation otherwise. The
1296 .B n
1297 option can be used to force the decimal representation. (alias
1298 .BR uname ", " user ).
1299 T}
1300
1301 exe EXE T{
1302 path to the executable.
1303 Useful if path cannot be printed via
1304 .BR cmd ", " comm
1305 or
1306 .B args
1307 format options.
1308 T}
1309
1310 f F T{
1311 flags associated with the process, see the
1312 .B PROCESS FLAGS
1313 section. (alias
1314 .BR flag ", " flags ).
1315 T}
1316
1317 fds FDS T{
1318 total open file descriptors.
1319 T}
1320
1321 fgid FGID T{
1322 filesystem access group\ ID. (alias
1323 .BR fsgid ).
1324 T}
1325
1326 fgroup FGROUP T{
1327 filesystem access group ID. This will be the textual group ID, if it can
1328 be obtained and the field width permits, or a decimal representation
1329 otherwise. (alias
1330 .BR fsgroup ).
1331 T}
1332
1333 flag F T{
1334 see
1335 .BR f .
1336 (alias
1337 .BR f ", " flags ).
1338 T}
1339
1340 flags F T{
1341 see
1342 .BR f .
1343 (alias
1344 .BR f ", " flag ).
1345 T}
1346
1347 fname COMMAND T{
1348 first 8 bytes of the base name of the process's executable file. The output
1349 in this column may contain spaces.
1350 T}
1351
1352 fuid FUID T{
1353 filesystem access user ID. (alias
1354 .BR fsuid ).
1355 T}
1356
1357 fuser FUSER T{
1358 filesystem access user ID. This will be the textual user ID, if it can be
1359 obtained and the field width permits, or a decimal representation otherwise.
1360 T}
1361
1362 gid GID T{
1363 see
1364 .BR egid .
1365 (alias
1366 .BR egid ).
1367 T}
1368
1369 group GROUP T{
1370 see
1371 .BR egroup .
1372 (alias
1373 .BR egroup ).
1374 T}
1375
1376 htprv HTPRV T{
1377 The amount of private memory backed by hugetlbfs page which is not counted in the \fBrss\fR
1378 or \fBpss\fR format options.
1379 T}
1380
1381 htshr HTSHR T{
1382 The amount of shared memory backed by hugetlbfs page which is not counted in the \fBrss\fR
1383 or \fBpss\fR format options.
1384 T}
1385
1386 ignored IGNORED T{
1387 mask of the ignored signals, see
1388 .IR signal (7).
1389 According to the width of the field, a 32 or 64 bits mask in hexadecimal
1390 format is displayed, unless the \fB\-\-signames\fR option is used. (alias
1391 .BR sig_ignore ", " sigignore ).
1392 T}
1393
1394 ipcns IPCNS T{
1395 Unique inode number describing the namespace the process belongs to.
1396 See
1397 .IR namespaces (7).
1398 T}
1399
1400 label LABEL T{
1401 security label, most commonly used for SELinux context data. This is for
1402 the
1403 .I Mandatory Access Control
1404 ("MAC") found on high\-security systems.
1405 T}
1406
1407 lastcpu C T{
1408 See
1409 .BR psr .
1410 (alias
1411 .BR cpu ", " cpuid ", " psr ).
1412 T}
1413
1414 lstart STARTED T{
1415 time the command started.
1416 This will be in the form "DDD mmm HH:MM:SS YYY"
1417 unless changed by the \fB\-D\fR option.
1418 T}
1419
1420 lsession SESSION T{
1421 displays the login session identifier of a process,
1422 if systemd support has been included.
1423 T}
1424
1425 luid LUID T{
1426 displays Login ID associated with a process.
1427 T}
1428
1429 lwp LWP T{
1430 light weight process (thread) ID of the dispatchable entity (alias
1431 .BR spid , \ tid ).
1432 See
1433 .B tid
1434 for additional information.
1435 T}
1436
1437 lxc LXC T{
1438 The name of the lxc container within which a task is running.
1439 If a process is not running inside a container, a dash ('\-') will be shown.
1440 T}
1441
1442 machine MACHINE T{
1443 displays the machine name for processes assigned to VM or container,
1444 if systemd support has been included.
1445 T}
1446
1447 maj_flt MAJFLT T{
1448 The number of major page faults that have occurred with this process.
1449 T}
1450
1451 min_flt MINFLT T{
1452 The number of minor page faults that have occurred with this process.
1453 T}
1454
1455 mntns MNTNS T{
1456 Unique inode number describing the namespace the process belongs to.
1457 See
1458 .IR namespaces (7).
1459 T}
1460
1461 netns NETNS T{
1462 Unique inode number describing the namespace the process belongs to.
1463 See
1464 .IR namespaces (7).
1465 T}
1466
1467 ni NI T{
1468 nice value.
1469 This ranges from 19 (nicest) to \-20 (not nice to others),
1470 see
1471 .IR nice (1).
1472 (alias
1473 .BR nice ).
1474 T}
1475
1476 nice NI T{
1477 see
1478 .BR ni . (alias
1479 .BR ni ).
1480 T}
1481
1482 nlwp NLWP T{
1483 number of lwps (threads) in the process. (alias
1484 .BR thcount ).
1485 T}
1486
1487 numa NUMA T{
1488 The node associated with the most recently used processor.
1489 A \fI\-1\fR means that NUMA information is unavailable.
1490 T}
1491
1492 nwchan WCHAN T{
1493 address of the kernel function where the process is sleeping (use
1494 .B wchan
1495 if you want the kernel function name).
1496 T}
1497
1498 oom OOM T{
1499 Out of Memory Score.
1500 The value, ranging from 0 to +1000, used to select
1501 task(s) to kill when memory is exhausted.
1502 T}
1503
1504 oomadj OOMADJ T{
1505 Out of Memory Adjustment Factor.
1506 The value is added to the current out of
1507 memory score which is then used to determine which task to kill when memory
1508 is exhausted.
1509 T}
1510
1511 ouid OWNER T{
1512 displays the Unix user identifier of the owner of the session of a process,
1513 if systemd support has been included.
1514 T}
1515
1516 pcap PCAP T{
1517 Permitted Capabilities of the process, displayed as a hexadecimal bitmask.
1518 See
1519 .IR capabilities (7).
1520 T}
1521
1522 pcaps PCAPS T{
1523 Permitted Capabilities of the process, displayed as a string of capability
1524 names. See
1525 .IR capabilities (7).
1526 T}
1527
1528 pcpu %CPU T{
1529 see
1530 .BR %cpu .
1531 (alias
1532 .BR %cpu ).
1533 T}
1534
1535 pending PENDING T{
1536 mask of the pending signals.
1537 See
1538 .IR signal (7).
1539 Signals pending on the process are distinct from signals pending on
1540 individual threads.
1541 Use the
1542 .B m
1543 option or the
1544 .B \-m
1545 option to see both.
1546 According to the width of the field, a 32 or 64 bits mask in hexadecimal
1547 format is displayed,
1548 unless the \fB\-\-signames\fR option is used.
1549 (alias
1550 .BR sig ).
1551 T}
1552
1553 pgid PGID T{
1554 process group ID or, equivalently, the process ID of the process group
1555 leader. (alias
1556 .BR pgrp ).
1557 T}
1558
1559 pgrp PGRP T{
1560 see
1561 .BR pgid .
1562 (alias
1563 .BR pgid ).
1564 T}
1565
1566 pid PID T{
1567 a number representing the process ID (alias
1568 .BR tgid ).
1569 T}
1570
1571 pidns PIDNS T{
1572 Unique inode number describing the namespace the process belongs to.
1573 See
1574 .IR namespaces (7).
1575 T}
1576
1577 pmem %MEM T{
1578 see
1579 .BR %mem .
1580 (alias
1581 .BR %mem ).
1582 T}
1583
1584 policy POL T{
1585 scheduling class of the process. (alias
1586 .BR class ", " cls ).
1587 Possible values are:
1588 .sp \n[PD]u
1589 .in +9n
1590 \- not reported
1591 .br
1592 TS SCHED_OTHER
1593 .br
1594 FF SCHED_FIFO
1595 .br
1596 RR SCHED_RR
1597 .br
1598 B SCHED_BATCH
1599 .br
1600 ISO SCHED_ISO
1601 .br
1602 IDL SCHED_IDLE
1603 .br
1604 DLN SCHED_DEADLINE
1605 .br
1606 ? unknown value
1607 .in
1608 T}
1609
1610 ppid PPID T{
1611 parent process ID.
1612 T}
1613
1614 pri PRI T{
1615 priority of the process. Higher number means higher priority.
1616 T}
1617
1618 psr PSR T{
1619 processor that process last executed on.
1620 (alias
1621 .BR cpu ", " cpuid ", " lastcpu ).
1622 T}
1623
1624 pss PSS T{
1625 Proportional share size,
1626 the non-swapped physical memory,
1627 with shared memory proportionally accounted to all tasks mapping it.
1628 T}
1629
1630 rbytes RBYTES T{
1631 Number of bytes which this process really did cause to be fetched from the
1632 storage layer.
1633 T}
1634
1635 rchars RCHARS T{
1636 Number of bytes which this task has caused to be read from storage.
1637 T}
1638
1639 rgid RGID T{
1640 real group ID.
1641 T}
1642
1643 rgroup RGROUP T{
1644 real group name. This will be the textual group ID, if it can be obtained
1645 and the field width permits, or a decimal representation otherwise.
1646 T}
1647
1648 rops ROPS T{
1649 Number of read I/O operations\[em]that is, system calls such as
1650 .BR read "(2) and " pread (2).
1651 T}
1652
1653 rss RSS T{
1654 resident set size, the non\-swapped physical memory that a task has used (in
1655 kibibytes). (alias
1656 .BR rssize ", " rsz ).
1657 T}
1658
1659 rssize RSS T{
1660 see
1661 .BR rss .
1662 (alias
1663 .BR rss ", " rsz ).
1664 T}
1665
1666 rsz RSZ T{
1667 see
1668 .BR rss .
1669 (alias
1670 .BR rss ", " rssize ).
1671 T}
1672
1673 rtprio RTPRIO T{
1674 realtime priority.
1675 T}
1676
1677 ruid RUID T{
1678 real user ID.
1679 T}
1680
1681 ruser RUSER T{
1682 real user ID. This will be the textual user ID, if it can be obtained and
1683 the field width permits, or a decimal representation otherwise.
1684 T}
1685
1686 s S T{
1687 minimal state display (one character). See section
1688 .B PROCESS STATE CODES
1689 for the different values. See also
1690 .B stat
1691 if you want additional information displayed. (alias
1692 .BR state ).
1693 T}
1694
1695 sched SCH T{
1696 scheduling policy of the process. The policies SCHED_OTHER (SCHED_NORMAL),
1697 SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, SCHED_IDLE and SCHED_DEADLINE are
1698 respectively displayed as 0, 1, 2, 3, 4, 5 and 6.
1699 T}
1700
1701 seat SEAT T{
1702 displays the identifier associated with all hardware devices assigned
1703 to a specific workplace,
1704 if systemd support has been included.
1705 T}
1706
1707 sess SESS T{
1708 session ID or, equivalently, the process ID of the session leader. (alias
1709 .BR session ", " sid ).
1710 T}
1711
1712 sgi_p P T{
1713 processor that the process is currently executing on. Displays "*" if the
1714 process is not currently running or runnable.
1715 T}
1716
1717 sgid SGID T{
1718 saved group ID. (alias
1719 .BR svgid ).
1720 T}
1721
1722 sgroup SGROUP T{
1723 saved group name. This will be the textual group ID, if it can be obtained
1724 and the field width permits, or a decimal representation otherwise.
1725 T}
1726
1727 sid SID T{
1728 see
1729 .BR sess .
1730 (alias
1731 .BR sess ", " session ).
1732 T}
1733
1734 sig PENDING T{
1735 see
1736 .BR pending .
1737 (alias
1738 .BR pending ", " sig_pend ).
1739 T}
1740
1741 sigcatch CAUGHT T{
1742 see
1743 .BR caught .
1744 (alias
1745 .BR caught ", " sig_catch ).
1746 T}
1747
1748 sigignore IGNORED T{
1749 see
1750 .BR ignored .
1751 (alias
1752 .BR ignored ", " sig_ignore ).
1753 T}
1754
1755 sigmask BLOCKED T{
1756 see
1757 .BR blocked .
1758 (alias
1759 .BR blocked ", " sig_block ).
1760 T}
1761
1762 size SIZE T{
1763 approximate amount of swap space that would be required if the process were
1764 to dirty all writable pages and then be swapped out. This number is very
1765 rough!
1766 T}
1767
1768 slice SLICE T{
1769 displays the slice unit which a process belongs to,
1770 if systemd support has been included.
1771 T}
1772
1773 spid SPID T{
1774 see
1775 .BR lwp .
1776 (alias
1777 .BR lwp ", " tid ).
1778 T}
1779
1780 stackp STACKP T{
1781 address of the bottom (start) of stack for the process.
1782 T}
1783
1784 start STARTED T{
1785 time the command started. If the process was started less than 24 hours ago,
1786 the output format is "HH:MM:SS", else it is "\ \ Mmm\ dd" (where Mmm is a
1787 three\-letter month name). See also
1788 .BR bsdstart ", " start ", " start_time ", and " stime .
1789 T}
1790
1791 start_time START T{
1792 starting time or date of the process. Only the year will be displayed if the
1793 process was not started the same year
1794 .B ps
1795 was invoked, or "MmmDD" if it was not started the same day, or "HH:MM"
1796 otherwise. See also
1797 .BR bsdstart ", " start ", " lstart ", and " stime .
1798 T}
1799
1800 stat STAT T{
1801 multi\-character process state. See section
1802 .B PROCESS STATE CODES
1803 for the different values meaning. See also
1804 .BR s \ and \ state
1805 if you just want the first character displayed.
1806 T}
1807
1808 state S T{
1809 see
1810 .BR s ".\& (alias" \ s ).
1811 T}
1812
1813 stime STIME T{
1814 see \fBstart_time\fR.
1815 (alias \fBstart_time\fR).
1816 T}
1817
1818 suid SUID T{
1819 saved user ID. (alias
1820 .BR svuid ).
1821 T}
1822
1823 supgid SUPGID T{
1824 group ids of supplementary groups, if any. See
1825 .BR getgroups (2).
1826 T}
1827
1828 supgrp SUPGRP T{
1829 group names of supplementary groups, if any. See
1830 .BR getgroups (2).
1831 T}
1832
1833 suser SUSER T{
1834 saved user name. This will be the textual user ID, if it can be obtained and
1835 the field width permits, or a decimal representation otherwise. (alias
1836 .BR svuser ).
1837 T}
1838
1839 svgid SVGID T{
1840 see
1841 .BR sgid .
1842 (alias
1843 .BR sgid ).
1844 T}
1845
1846 svuid SVUID T{
1847 see
1848 .BR suid .
1849 (alias
1850 .BR suid ).
1851 T}
1852
1853 sz SZ T{
1854 size in physical pages of the core image of the process. This includes text,
1855 data, and stack space. Device mappings are currently excluded; this is
1856 subject to change. See
1857 .BR vsz \ and \ rss .
1858 T}
1859
1860 tgid TGID T{
1861 a number representing the thread group to which a task belongs (alias
1862 .BR pid ).
1863 It is the process ID of the thread group leader.
1864 T}
1865
1866 thcount THCNT T{
1867 see
1868 .BR nlwp .
1869 (alias
1870 .BR nlwp ).
1871 number of kernel threads owned by the process.
1872 T}
1873
1874 tid TID T{
1875 the unique number representing a dispatchable entity (alias
1876 .BR spid ", " tid ).
1877 This value may also appear as: a process ID (pid); a process group ID (pgrp);
1878 a session ID for the session leader (sid); a thread group ID for the thread
1879 group leader (tgid); and a tty process group ID for the process group leader
1880 (tpgid).
1881 T}
1882
1883 time TIME T{
1884 cumulative CPU\ time, "[DD\-]HH:MM:SS" format. (alias
1885 .BR cputime ).
1886 T}
1887
1888 timens TIMENS T{
1889 Unique inode number describing the namespace the process belongs to.
1890 See
1891 .IR namespaces (7).
1892 T}
1893
1894 times TIME T{
1895 cumulative CPU\ time in seconds (alias
1896 .BR cputimes ).
1897 T}
1898
1899 tname TTY T{
1900 controlling tty (terminal). (alias
1901 .BR tt ", " tty ).
1902 T}
1903
1904 tpgid TPGID T{
1905 ID of the foreground process group on the tty (terminal) that the process is
1906 connected to, or \-1 if the process is not connected to a tty.
1907 T}
1908
1909 trs TRS T{
1910 text resident set size,
1911 the amount of physical memory devoted to executable code.
1912 T}
1913
1914 tt TT T{
1915 controlling tty (terminal). (alias
1916 .BR tname ", " tty ).
1917 T}
1918
1919 tty TT T{
1920 controlling tty (terminal). (alias
1921 .BR tname ", " tt ).
1922 T}
1923
1924 ucmd CMD T{
1925 see
1926 .BR comm .
1927 (alias
1928 .BR comm ", " ucomm ).
1929 T}
1930
1931 ucomm COMMAND T{
1932 see
1933 .BR comm .
1934 (alias
1935 .BR comm ", " ucmd ).
1936 T}
1937
1938 uid UID T{
1939 see
1940 .BR euid .
1941 (alias
1942 .BR euid ).
1943 T}
1944
1945 uname USER T{
1946 see
1947 .BR euser .
1948 (alias
1949 .BR euser ", " user ).
1950 T}
1951
1952 unit UNIT T{
1953 displays unit which a process belongs to,
1954 if systemd support has been included.
1955 T}
1956
1957 user USER T{
1958 see
1959 .BR euser .
1960 (alias
1961 .BR euser ", " uname ).
1962 T}
1963
1964 userns USERNS T{
1965 Unique inode number describing the namespace the process belongs to.
1966 See
1967 .IR namespaces (7).
1968 T}
1969
1970 uss USS T{
1971 Unique set size, the non-swapped physical memory, which
1972 is not shared with an another task.
1973 T}
1974
1975 utsns UTSNS T{
1976 Unique inode number describing the namespace the process belongs to.
1977 See
1978 .IR namespaces (7).
1979 T}
1980
1981 uunit UUNIT T{
1982 displays user unit which a process belongs to,
1983 if systemd support has been included.
1984 T}
1985
1986 vsize VSZ T{
1987 see
1988 .BR vsz .
1989 (alias
1990 .BR vsz ).
1991 T}
1992
1993 vsz VSZ T{
1994 virtual memory size of the process in KiB (1024\-byte units). Device
1995 mappings are currently excluded; this is subject to change. (alias
1996 .BR vsize ).
1997 T}
1998
1999 wbytes WBYTES T{
2000 Number of bytes which this process caused to be sent to the storage layer.
2001 T}
2002
2003 wcbytes WCBYTES T{
2004 Number of cancelled write bytes.
2005 T}
2006
2007 wchan WCHAN T{
2008 name of the kernel function in which the process is sleeping.
2009 T}
2010
2011 wchars WCHARS T{
2012 Number of bytes which this task has caused,
2013 or shall cause to be written to disk.
2014 T}
2015
2016 wops WOPS T{
2017 Number of write I/O operations\[em]that is, system calls such as
2018 .BR write "(2) and " pwrite (2).
2019 T}
2020
2021 .TE
2022 .SH "ENVIRONMENT VARIABLES"
2023 The following environment variables could affect
2024 .BR ps :
2025 .TP 3
2026 .B COLUMNS
2027 Override default display width.
2028 .TP
2029 .B LINES
2030 Override default display height.
2031 .TP
2032 .B PS_PERSONALITY
2033 Set to one of posix, old, linux, bsd, sun, digital.\|.\|.\& (see section
2034 .B PERSONALITY
2035 below).
2036 .TP
2037 .B CMD_ENV
2038 Set to one of posix, old, linux, bsd, sun, digital.\|.\|.\& (see section
2039 .B PERSONALITY
2040 below).
2041 .TP
2042 .B I_WANT_A_BROKEN_PS
2043 Force obsolete command line interpretation.
2044 .TP
2045 .B LC_TIME
2046 Date format.
2047 .TP
2048 .B LIBPROC_HIDE_KERNEL
2049 Set this to any value to hide kernel threads normally displayed with the
2050 .B \-e
2051 option. This is equivalent to selecting
2052 .B \-\-ppid 2 \-p 2 \-\-deselect
2053 instead. Also works in BSD mode.
2054 .TP
2055 .B PS_COLORS
2056 Not currently supported.
2057 .TP
2058 .B PS_FORMAT
2059 Default output format override. You may set this to a format
2060 string of the type used for the
2061 .B \-o
2062 option.
2063 The
2064 .B DefSysV
2065 and
2066 .B DefBSD
2067 values are particularly useful.
2068 .TP
2069 .B POSIXLY_CORRECT
2070 Don't find excuses to ignore bad "features".
2071 .TP
2072 .B POSIX2
2073 When set to "on", acts as
2074 .BR POSIXLY_CORRECT .
2075 .TP
2076 .B UNIX95
2077 Don't find excuses to ignore bad "features".
2078 .TP
2079 .B _XPG
2080 Cancel
2081 .BR CMD_ENV =\c
2082 .I irix
2083 non\-standard behavior.
2084 .PP
2085 In general, it is a bad idea to set these variables. The one exception is
2086 .B CMD_ENV
2087 or
2088 .BR PS_PERSONALITY ,
2089 which could be set to Linux for normal systems. Without that setting,
2090 .B ps
2091 follows the useless and bad parts of the Unix98 standard.
2092 .SH "PERSONALITY"
2093 .TS
2094 L Lx.
2095 390 like the OS/390 OpenEdition \fBps\fR
2096 aix like AIX \fBps\fR
2097 bsd like FreeBSD \fBps\fR (totally non\-standard)
2098 compaq like Digital Unix \fBps\fR
2099 debian like the old Debian \fBps\fR
2100 digital like Tru64 (was Digital\ Unix, was OSF/1) \fBps\fR
2101 gnu like the old Debian \fBps\fR
2102 hp like HP\-UX \fBps\fR
2103 hpux like HP\-UX \fBps\fR
2104 irix like Irix \fBps\fR
2105 linux ***** \fBrecommended\fR *****
2106 old like the original Linux \fBps\fR (totally non\-standard)
2107 os390 like OS/390 Open Edition \fBps\fR
2108 posix standard
2109 s390 like OS/390 Open Edition \fBps\fR
2110 sco like SCO \fBps\fR
2111 sgi like Irix \fBps\fR
2112 solaris2 like Solaris 2+ (SunOS 5) \fBps\fR
2113 sunos4 T{
2114 like SunOS 4 (Solaris 1) \fBps\fR (totally non\-standard)
2115 T}
2116 svr4 standard
2117 sysv standard
2118 tru64 like Tru64 (was Digital Unix, was OSF/1) \fBps\fR
2119 unix standard
2120 unix95 standard
2121 unix98 standard
2122 .TE
2123 .SH BUGS
2124 The fields \fBbsdstart\fR and \fBstart\fR will only show the abbreviated
2125 month name in English. The fields \fBlstart\fR and \fBstime\fR will show
2126 the abbreviated month name in the configured locale but may exceed the
2127 column width due to the different lengths for abbreviated month and day
2128 names across languages.
2129 .SH "SEE ALSO"
2130 .BR pgrep (1),
2131 .BR pstree (1),
2132 .BR top (1),
2133 .BR strftime (3),
2134 .BR proc (5),
2135 .BR capabilities (7).
2136
2137 .SH STANDARDS
2138 This
2139 .B ps
2140 conforms to the following standards.
2141 .TP 4n
2142 \[bu]
2143 Version 2 of the Single Unix Specification
2144 .TP 4n
2145 \[bu]
2146 The Open Group Technical Standard Base Specifications, Issue\~6
2147 .TP 4n
2148 \[bu]
2149 IEEE Std 1003.1, 2004\~Edition
2150 .TP 4n
2151 \[bu]
2152 X/Open System Interfaces Extension [UP\~XSI]
2153 .TP 4n
2154 \[bu]
2155 ISO/IEC 9945:2003
2156 .SH AUTHOR
2157 .B ps
2158 was originally written by
2159 .MT lankeste@\:fwi.\:uva.\:nl
2160 Branko Lankester
2161 .ME .
2162 .MT johnsonm@\:redhat.\:com
2163 Michael K.\& Johnson
2164 .ME
2165 re\-wrote it significantly to use the proc filesystem, changing a few things
2166 in the process.
2167 .MT mjshield@\:nyx.\:cs.\:du.\:edu
2168 Michael Shields
2169 .ME
2170 added the pid\-list feature.
2171 .MT cblake@\:bbn.\:com
2172 Charles Blake
2173 .ME
2174 added multi\-level sorting, the dirent\-style library, the device
2175 name\-to\-number mmaped database, the approximate binary search directly on
2176 System.map, and many code and documentation cleanups. David Mossberger\-Tang
2177 wrote the generic BFD support for psupdate.
2178 .MT albert@\:users.\:sf.\:net
2179 Albert Cahalan
2180 .ME
2181 rewrote ps for full Unix98 and BSD support, along with some ugly hacks for
2182 obsolete and foreign syntax.
2183 .PP
2184 Please send bug reports to
2185 .MT procps@\:freelists.\:org
2186 .ME .
2187 No subscription is required or suggested.