1PS(1)                            User Commands                           PS(1)
2
3
4

NAME

6       ps - report a snapshot of the current processes.
7

SYNOPSIS

9       ps [options]
10

DESCRIPTION

12       ps displays information about a selection of the active processes.  If
13       you want a repetitive update of the selection and the displayed
14       information, use top instead.
15
16       This version of ps accepts several kinds of options:
17
18       1   UNIX options, which may be grouped and must be preceded by a dash.
19       2   BSD options, which may be grouped and must not be used with a dash.
20       3   GNU long options, which are preceded by two dashes.
21
22       Options of different types may be freely mixed, but conflicts can
23       appear.  There are some synonymous options, which are functionally
24       identical, due to the many standards and ps implementations that this
25       ps is compatible with.
26
27       Note that ps -aux is distinct from ps aux.  The POSIX and UNIX
28       standards require that ps -aux print all processes owned by a user
29       named x, as well as printing all processes that would be selected by
30       the -a option.  If the user named x does not exist, this ps may
31       interpret the command as ps aux instead and print a warning.  This
32       behavior is intended to aid in transitioning old scripts and habits.
33       It is fragile, subject to change, and thus should not be relied upon.
34
35       By default, ps selects all processes with the same effective user ID
36       (euid=EUID) as the current user and associated with the same terminal
37       as the invoker.  It displays the process ID (pid=PID), the terminal
38       associated with the process (tname=TTY), the cumulated CPU time in
39       [DD-]hh:mm:ss format (time=TIME), and the executable name (ucmd=CMD).
40       Output is unsorted by default.
41
42       The use of BSD-style options will add process state (stat=STAT) to the
43       default display and show the command args (args=COMMAND) instead of the
44       executable name.  You can override this with the PS_FORMAT environment
45       variable. The use of BSD-style options will also change the process
46       selection to include processes on other terminals (TTYs) that are owned
47       by you; alternately, this may be described as setting the selection to
48       be the set of all processes filtered to exclude processes owned by
49       other users or not on a terminal.  These effects are not considered
50       when options are described as being "identical" below, so -M will be
51       considered identical to Z and so on.
52
53       Except as described below, process selection options are additive.  The
54       default selection is discarded, and then the selected processes are
55       added to the set of processes to be displayed.  A process will thus be
56       shown if it meets any of the given selection criteria.
57

EXAMPLES

59       To see every process on the system using standard syntax:
60          ps -e
61          ps -ef
62          ps -eF
63          ps -ely
64
65       To see every process on the system using BSD syntax:
66          ps ax
67          ps axu
68
69       To print a process tree:
70          ps -ejH
71          ps axjf
72
73       To get info about threads:
74          ps -eLf
75          ps axms
76
77       To get security info:
78          ps -eo euser,ruser,suser,fuser,f,comm,label
79          ps axZ
80          ps -eM
81
82       To see every process running as root (real & effective ID) in user
83       format:
84          ps -U root -u root u
85
86       To see every process with a user-defined format:
87          ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
88          ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
89          ps -Ao pid,tt,user,fname,tmout,f,wchan
90
91       Print only the process IDs of syslogd:
92          ps -C syslogd -o pid=
93
94       Print only the name of PID 42:
95          ps -q 42 -o comm=
96

SIMPLE PROCESS SELECTION

98       a      Lift the BSD-style "only yourself" restriction, which is imposed
99              upon the set of all processes when some BSD-style (without "-")
100              options are used or when the ps personality setting is BSD-like.
101              The set of processes selected in this manner is in addition to
102              the set of processes selected by other means.  An alternate
103              description is that this option causes ps to list all processes
104              with a terminal (tty), or to list all processes when used
105              together with the x option.
106
107       -A     Select all processes.  Identical to -e.
108
109       -a     Select all processes except both session leaders (see getsid(2))
110              and processes not associated with a terminal.
111
112       -d     Select all processes except session leaders.
113
114       --deselect
115              Select all processes except those that fulfill the specified
116              conditions (negates the selection).  Identical to -N.
117
118       -e     Select all processes.  Identical to -A.
119
120       g      Really all, even session leaders.  This flag is obsolete and may
121              be discontinued in a future release.  It is normally implied by
122              the a flag, and is only useful when operating in the sunos4
123              personality.
124
125       -N     Select all processes except those that fulfill the specified
126              conditions (negates the selection).  Identical to --deselect.
127
128       T      Select all processes associated with this terminal.  Identical
129              to the t option without any argument.
130
131       r      Restrict the selection to only running processes.
132
133       x      Lift the BSD-style "must have a tty" restriction, which is
134              imposed upon the set of all processes when some BSD-style
135              (without "-") options are used or when the ps personality
136              setting is BSD-like.  The set of processes selected in this
137              manner is in addition to the set of processes selected by other
138              means.  An alternate description is that this option causes ps
139              to list all processes owned by you (same EUID as ps), or to list
140              all processes when used together with the a option.
141

PROCESS SELECTION BY LIST

143       These options accept a single argument in the form of a blank-separated
144       or comma-separated list.  They can be used multiple times.  For
145       example: ps -p "1 2" -p 3,4
146
147       -123   Identical to --pid 123.
148
149       123    Identical to --pid 123.
150
151       -C cmdlist
152              Select by command name.  This selects the processes whose
153              executable name is given in cmdlist.  NOTE: The command name is
154              not the same as the command line. Previous versions of procps
155              and the kernel truncated this command name to 15 characters.
156              This limitation is no longer present in both. If you depended on
157              matching only 15 characters, you may no longer get a match.
158
159       -G grplist
160              Select by real group ID (RGID) or name.  This selects the
161              processes whose real group name or ID is in the grplist list.
162              The real group ID identifies the group of the user who created
163              the process, see getgid(2).
164
165       -g grplist
166              Select by session OR by effective group name.  Selection by
167              session is specified by many standards, but selection by
168              effective group is the logical behavior that several other
169              operating systems use.  This ps will select by session when the
170              list is completely numeric (as sessions are).  Group ID numbers
171              will work only when some group names are also specified.  See
172              the -s and --group options.
173
174       --Group grplist
175              Select by real group ID (RGID) or name.  Identical to -G.
176
177       --group grplist
178              Select by effective group ID (EGID) or name.  This selects the
179              processes whose effective group name or ID is in grplist.  The
180              effective group ID describes the group whose file access
181              permissions are used by the process (see getegid(2)).  The -g
182              option is often an alternative to --group.
183
184       p pidlist
185              Select by process ID.  Identical to -p and --pid.
186
187       -p pidlist
188              Select by PID.  This selects the processes whose process ID
189              numbers appear in pidlist.  Identical to p and --pid.
190
191       --pid pidlist
192              Select by process ID.  Identical to -p and p.
193
194       --ppid pidlist
195              Select by parent process ID.  This selects the processes with a
196              parent process ID in pidlist.  That is, it selects processes
197              that are children of those listed in pidlist.
198
199       q pidlist
200              Select by process ID (quick mode).  Identical to -q and
201              --quick-pid.
202
203       -q pidlist
204              Select by PID (quick mode).  This selects the processes whose
205              process ID numbers appear in pidlist.  With this option ps reads
206              the necessary info only for the pids listed in the pidlist and
207              doesn't apply additional filtering rules. The order of pids is
208              unsorted and preserved. No additional selection options, sorting
209              and forest type listings are allowed in this mode.  Identical to
210              q and --quick-pid.
211
212       --quick-pid pidlist
213              Select by process ID (quick mode).  Identical to -q and q.
214
215       -s sesslist
216              Select by session ID.  This selects the processes with a session
217              ID specified in sesslist.
218
219       --sid sesslist
220              Select by session ID.  Identical to -s.
221
222       t ttylist
223              Select by tty.  Nearly identical to -t and --tty, but can also
224              be used with an empty ttylist to indicate the terminal
225              associated with ps.  Using the T option is considered cleaner
226              than using t with an empty ttylist.
227
228       -t ttylist
229              Select by tty.  This selects the processes associated with the
230              terminals given in ttylist.  Terminals (ttys, or screens for
231              text output) can be specified in several forms: /dev/ttyS1,
232              ttyS1, S1.  A plain "-" may be used to select processes not
233              attached to any terminal.
234
235       --tty ttylist
236              Select by terminal.  Identical to -t and t.
237
238       U userlist
239              Select by effective user ID (EUID) or name.  This selects the
240              processes whose effective user name or ID is in userlist.  The
241              effective user ID describes the user whose file access
242              permissions are used by the process (see geteuid(2)).  Identical
243              to -u and --user.
244
245       -U userlist
246              Select by real user ID (RUID) or name.  It selects the processes
247              whose real user name or ID is in the userlist list.  The real
248              user ID identifies the user who created the process, see
249              getuid(2).
250
251       -u userlist
252              Select by effective user ID (EUID) or name.  This selects the
253              processes whose effective user name or ID is in userlist.
254
255              The effective user ID describes the user whose file access
256              permissions are used by the process (see geteuid(2)).  Identical
257              to U and --user.
258
259       --User userlist
260              Select by real user ID (RUID) or name.  Identical to -U.
261
262       --user userlist
263              Select by effective user ID (EUID) or name.  Identical to -u and
264              U.
265

OUTPUT FORMAT CONTROL

267       These options are used to choose the information displayed by ps.  The
268       output may differ by personality.
269
270       -c     Show different scheduler information for the -l option.
271
272       --context
273              Display security context format (for SELinux).
274
275       -f     Do full-format listing. This option can be combined with many
276              other UNIX-style options to add additional columns.  It also
277              causes the command arguments to be printed.  When used with -L,
278              the NLWP (number of threads) and LWP (thread ID) columns will be
279              added.  See the c option, the format keyword args, and the
280              format keyword comm.
281
282       -F     Extra full format.  See the -f option, which -F implies.
283
284       --format format
285              user-defined format.  Identical to -o and o.
286
287       j      BSD job control format.
288
289       -j     Jobs format.
290
291       l      Display BSD long format.
292
293       -l     Long format.  The -y option is often useful with this.
294
295       -M     Add a column of security data.  Identical to Z (for SELinux).
296
297       O format
298              is preloaded o (overloaded).  The BSD O option can act like -O
299              (user-defined output format with some common fields predefined)
300              or can be used to specify sort order.  Heuristics are used to
301              determine the behavior of this option.  To ensure that the
302              desired behavior is obtained (sorting or formatting), specify
303              the option in some other way (e.g.  with -O or --sort).  When
304              used as a formatting option, it is identical to -O, with the BSD
305              personality.
306
307       -O format
308              Like -o, but preloaded with some default columns.  Identical to
309              -o pid,format,state,tname,time,command or -o pid,format,tname,
310              time,cmd, see -o below.
311
312       o format
313              Specify user-defined format.  Identical to -o and --format.
314
315       -o format
316              User-defined format.  format is a single argument in the form of
317              a blank-separated or comma-separated list, which offers a way to
318              specify individual output columns.  The recognized keywords are
319              described in the STANDARD FORMAT SPECIFIERS section below.
320              Headers may be renamed (ps -o pid,ruser=RealUser -o
321              comm=Command) as desired.  If all column headers are empty (ps
322              -o pid= -o comm=) then the header line will not be output.
323              Column width will increase as needed for wide headers; this may
324              be used to widen up columns such as WCHAN (ps -o pid,wchan=WIDE-
325              WCHAN-COLUMN -o comm).  Explicit width control (ps opid,
326              wchan:42,cmd) is offered too.  The behavior of ps -o pid=X,
327              comm=Y varies with personality; output may be one column named
328              "X,comm=Y" or two columns named "X" and "Y".  Use multiple -o
329              options when in doubt.  Use the PS_FORMAT environment variable
330              to specify a default as desired; DefSysV and DefBSD are macros
331              that may be used to choose the default UNIX or BSD columns.
332
333       -P     Add a column showing psr.
334
335       s      Display signal format.
336
337       u      Display user-oriented format.
338
339       v      Display virtual memory format.
340
341       X      Register format.
342
343       -y     Do not show flags; show rss in place of addr.  This option can
344              only be used with -l.
345
346       Z      Add a column of security data.  Identical to -M (for SELinux).
347

OUTPUT MODIFIERS

349       c      Show the true command name.  This is derived from the name of
350              the executable file, rather than from the argv value.  Command
351              arguments and any modifications to them are thus not shown.
352              This option effectively turns the args format keyword into the
353              comm format keyword; it is useful with the -f format option and
354              with the various BSD-style format options, which all normally
355              display the command arguments.  See the -f option, the format
356              keyword args, and the format keyword comm.
357
358       --cols n
359              Set screen width.
360
361       --columns n
362              Set screen width.
363
364       --cumulative
365              Include some dead child process data (as a sum with the parent).
366
367
368       -D format
369              Set the date format of the lstart field to format. This format
370              is parsed by strftime(3) and should be a maximum of 24
371              characters to not mis-align columns.
372
373       --date-format format
374              Identical to -D.
375
376       e      Show the environment after the command.
377
378       f      ASCII art process hierarchy (forest).
379
380       --forest
381              ASCII art process tree.
382
383       h      No header.  (or, one header per screen in the BSD personality).
384              The h option is problematic.  Standard BSD ps uses this option
385              to print a header on each page of output, but older Linux ps
386              uses this option to totally disable the header.  This version of
387              ps follows the Linux usage of not printing the header unless the
388              BSD personality has been selected, in which case it prints a
389              header on each page of output.  Regardless of the current
390              personality, you can use the long options --headers and
391              --no-headers to enable printing headers each page or disable
392              headers entirely, respectively.
393
394       -H     Show process hierarchy (forest).
395
396       --headers
397              Repeat header lines, one per page of output.
398
399       k spec Specify sorting order.  Sorting syntax is
400              [+|-]key[,[+|-]key[,...]].  Choose a multi-letter key from the
401              STANDARD FORMAT SPECIFIERS section.  The "+" is optional since
402              default direction is increasing numerical or lexicographic
403              order.  Identical to --sort.
404
405                      Examples:
406                      ps jaxkuid,-ppid,+pid
407                      ps axk comm o comm,args
408                      ps kstart_time -ef
409
410       --lines n
411              Set screen height.
412
413       n      Numeric output for WCHAN and USER (including all types of UID
414              and GID).
415
416       --no-headers
417              Print no header line at all.  --no-heading is an alias for this
418              option.
419
420       O order
421              Sorting order (overloaded).  The BSD O option can act like -O
422              (user-defined output format with some common fields predefined)
423              or can be used to specify sort order.  Heuristics are used to
424              determine the behavior of this option.  To ensure that the
425              desired behavior is obtained (sorting or formatting), specify
426              the option in some other way (e.g.  with -O or --sort).
427
428              For sorting, obsolete BSD O option syntax is
429              O[+|-]k1[,[+|-]k2[,...]].  It orders the processes listing
430              according to the multilevel sort specified by the sequence of
431              one-letter short keys k1,k2, ...  described in the OBSOLETE SORT
432              KEYS section below.  The "+" is currently optional, merely
433              re-iterating the default direction on a key, but may help to
434              distinguish an O sort from an O format.  The "-" reverses
435              direction only on the key it precedes.
436
437       --rows n
438              Set screen height.
439
440       S      Sum up some information, such as CPU usage, from dead child
441              processes into their parent.  This is useful for examining a
442              system where a parent process repeatedly forks off short-lived
443              children to do work.
444
445       --sort spec
446              Specify sorting order.  Sorting syntax is
447              [+|-]key[,[+|-]key[,...]].  Choose a multi-letter key from the
448              STANDARD FORMAT SPECIFIERS section.  The "+" is optional since
449              default direction is increasing numerical or lexicographic
450              order.  Identical to k.  For example: ps jax --sort=uid,-ppid,
451              +pid
452
453       w      Wide output.  Use this option twice for unlimited width.
454
455       -w     Wide output.  Use this option twice for unlimited width.
456
457       --width n
458              Set screen width.
459

THREAD DISPLAY

461       H      Show threads as if they were processes.
462
463       -L     Show threads, possibly with LWP and NLWP columns.
464
465       m      Show threads after processes.
466
467       -m     Show threads after processes.
468
469       -T     Show threads, possibly with SPID column.
470

OTHER INFORMATION

472       --help section
473              Print a help message.  The section argument can be one of
474              simple, list, output, threads, misc, or all.  The argument can
475              be shortened to one of the underlined letters as in:
476              s|l|o|t|m|a.
477
478       --info Print debugging info.
479
480       L      List all format specifiers.
481
482       V      Print the procps-ng version.
483
484       -V     Print the procps-ng version.
485
486       --version
487              Print the procps-ng version.
488

NOTES

490       This ps works by reading the virtual files in /proc.  This ps does not
491       need to be setuid kmem or have any privileges to run.  Do not give this
492       ps any special permissions.
493
494       CPU usage is currently expressed as the percentage of time spent
495       running during the entire lifetime of a process.  This is not ideal,
496       and it does not conform to the standards that ps otherwise conforms to.
497       CPU usage is unlikely to add up to exactly 100%.
498
499       The SIZE and RSS fields don't count some parts of a process including
500       the page tables, kernel stack, struct thread_info, and struct
501       task_struct.  This is usually at least 20 KiB of memory that is always
502       resident.  SIZE is the virtual size of the process (code+data+stack).
503
504       Processes marked <defunct> are dead processes (so-called "zombies")
505       that remain because their parent has not destroyed them properly.
506       These processes will be destroyed by init(8) if the parent process
507       exits.
508
509       If the length of the username is greater than the width of the display
510       column, the username will be truncated.  See the -o and -O formatting
511       options to customize length.
512
513       Commands options such as ps -aux are not recommended as it is a
514       confusion of two different standards.  According to the POSIX and UNIX
515       standards, the above command asks to display all processes with a TTY
516       (generally the commands users are running) plus all processes owned by
517       a user named x.  If that user doesn't exist, then ps will assume you
518       really meant ps aux.
519

PROCESS FLAGS

521       The sum of these values is displayed in the "F" column, which is
522       provided by the flags output specifier:
523
524               1    forked but didn't exec
525               4    used super-user privileges
526

PROCESS STATE CODES

528       Here are the different values that the s, stat and state output
529       specifiers (header "STAT" or "S") will display to describe the state of
530       a process:
531
532               D    uninterruptible sleep (usually IO)
533               I    Idle kernel thread
534               R    running or runnable (on run queue)
535               S    interruptible sleep (waiting for an event to complete)
536               T    stopped by job control signal
537               t    stopped by debugger during the tracing
538               W    paging (not valid since the 2.6.xx kernel)
539               X    dead (should never be seen)
540               Z    defunct ("zombie") process, terminated but not reaped by
541                    its parent
542
543       For BSD formats and when the stat keyword is used, additional
544       characters may be displayed:
545
546               <    high-priority (not nice to other users)
547               N    low-priority (nice to other users)
548               L    has pages locked into memory (for real-time and custom IO)
549               s    is a session leader
550               l    is multi-threaded (using CLONE_THREAD, like NPTL pthreads
551                    do)
552               +    is in the foreground process group
553

OBSOLETE SORT KEYS

555       These keys are used by the BSD O option (when it is used for sorting).
556       The GNU --sort option doesn't use these keys, but the specifiers
557       described below in the STANDARD FORMAT SPECIFIERS section.  Note that
558       the values used in sorting are the internal values ps uses and not the
559       "cooked" values used in some of the output format fields (e.g.  sorting
560       on tty will sort into device number, not according to the terminal name
561       displayed).  Pipe ps output into the sort(1) command if you want to
562       sort the cooked values.
563
564       KEY   LONG         DESCRIPTION
565       c     cmd          simple name of executable
566       C     pcpu         cpu utilization
567       f     flags        flags as in long format F field
568       g     pgrp         process group ID
569       G     tpgid        controlling tty process group ID
570       j     cutime       cumulative user time
571       J     cstime       cumulative system time
572       k     utime        user time
573       m     min_flt      number of minor page faults
574       M     maj_flt      number of major page faults
575       n     cmin_flt     cumulative minor page faults
576       N     cmaj_flt     cumulative major page faults
577       o     session      session ID
578       p     pid          process ID
579       P     ppid         parent process ID
580       r     rss          resident set size
581       R     resident     resident pages
582       s     size         memory size in kilobytes
583       S     share        amount of shared pages
584       t     tty          the device number of the controlling tty
585       T     start_time   time process was started
586       U     uid          user ID number
587       u     user         user name
588       v     vsize        total VM size in KiB
589       y     priority     kernel scheduling priority
590

AIX FORMAT DESCRIPTORS

592       This ps supports AIX format descriptors, which work somewhat like the
593       formatting codes of printf(1) and printf(3).  For example, the normal
594       default output can be produced with this: ps -eo "%p %y %x %c".  The
595       NORMAL codes are described in the next section.
596
597       CODE   NORMAL   HEADER
598       %C     pcpu     %CPU
599       %G     group    GROUP
600       %P     ppid     PPID
601       %U     user     USER
602       %a     args     COMMAND
603       %c     comm     COMMAND
604       %g     rgroup   RGROUP
605       %n     nice     NI
606       %p     pid      PID
607       %r     pgid     PGID
608       %t     etime    ELAPSED
609       %u     ruser    RUSER
610       %x     time     TIME
611       %y     tty      TTY
612       %z     vsz      VSZ
613

STANDARD FORMAT SPECIFIERS

615       Here are the different keywords that may be used to control the output
616       format (e.g. with option -o) or to sort the selected processes with the
617       GNU-style --sort option.
618
619       For example: ps -eo pid,user,args --sort user
620
621       This version of ps tries to recognize most of the keywords used in
622       other implementations of ps.
623
624       The following user-defined format specifiers may contain spaces:
625       args, cmd, comm, command, fname, ucmd, ucomm, lstart, bsdstart, start.
626
627       Some keywords may not be available for sorting.
628
629
630       CODE        HEADER    DESCRIPTION
631
632       %cpu        %CPU      cpu utilization of the process in "##.#" format.
633                             Currently, it is the CPU time used divided by the
634                             time the process has been running
635                             (cputime/realtime ratio), expressed as a
636                             percentage.  It will not add up to 100% unless
637                             you are lucky.  (alias pcpu).
638
639       %mem        %MEM      ratio of the process's resident set size  to the
640                             physical memory on the machine, expressed as a
641                             percentage.  (alias pmem).
642
643       ag_id       AGID      The autogroup identifier associated with a
644                             process which operates in conjunction with the
645                             CFS scheduler to improve interactive desktop
646                             performance.
647
648       ag_nice     AGNI      The autogroup nice value which affects scheduling
649                             of all processes in that group.
650
651       args        COMMAND   command with all its arguments as a string.
652                             Modifications to the arguments may be shown.  The
653                             output in this column may contain spaces.  A
654                             process marked <defunct> is partly dead, waiting
655                             to be fully destroyed by its parent.  Sometimes
656                             the process args will be unavailable; when this
657                             happens, ps will instead print the executable
658                             name in brackets.  (alias cmd, command).  See
659                             also the comm format keyword, the -f option, and
660                             the c option.
661                             When specified last, this column will extend to
662                             the edge of the display.  If ps can not determine
663                             display width, as when output is redirected
664                             (piped) into a file or another command, the
665                             output width is undefined (it may be 80,
666                             unlimited, determined by the TERM variable, and
667                             so on).  The COLUMNS environment variable or
668                             --cols option may be used to exactly determine
669                             the width in this case.  The w or -w option may
670                             be also be used to adjust width.
671
672       blocked     BLOCKED   mask of the blocked signals, see signal(7).
673                             According to the width of the field, a 32 or
674                             64-bit mask in hexadecimal format is displayed.
675                             (alias sig_block, sigmask).
676
677       bsdstart    START     time the command started.  If the process was
678                             started less than 24 hours ago, the output format
679                             is " HH:MM", else it is " Mmm:SS" (where Mmm is
680                             the three letters of the month).  See also
681                             lstart, start, start_time, and stime.
682
683       bsdtime     TIME      accumulated cpu time, user + system.  The display
684                             format is usually "MMM:SS", but can be shifted to
685                             the right if the process used more than 999
686                             minutes of cpu time.
687
688
689       c           C         processor utilization. Currently, this is the
690                             integer value of the percent usage over the
691                             lifetime of the process.  (see %cpu).
692
693       caught      CAUGHT    mask of the caught signals, see signal(7).
694                             According to the width of the field, a 32 or 64
695                             bits mask in hexadecimal format is displayed.
696                             (alias sig_catch, sigcatch).
697
698       cgname      CGNAME    display name of control groups to which the
699                             process belongs.
700
701       cgroup      CGROUP    display control groups to which the process
702                             belongs.
703
704       cgroupns    CGROUPNS  Unique inode number describing the namespace the
705                             process belongs to.  See namespaces(7).
706
707       class       CLS       scheduling class of the process.  (alias
708                             policy, cls).  Field's possible values are:
709
710                                      -   not reported
711                                      TS  SCHED_OTHER
712                                      FF  SCHED_FIFO
713                                      RR  SCHED_RR
714                                      B   SCHED_BATCH
715                                      ISO SCHED_ISO
716                                      IDL SCHED_IDLE
717                                      DLN SCHED_DEADLINE
718                                      ?   unknown value
719
720       cls         CLS       scheduling class of the process.  (alias
721                             policy, cls).  Field's possible values are:
722
723                                      -   not reported
724                                      TS  SCHED_OTHER
725                                      FF  SCHED_FIFO
726                                      RR  SCHED_RR
727                                      B   SCHED_BATCH
728                                      ISO SCHED_ISO
729                                      IDL SCHED_IDLE
730                                      DLN SCHED_DEADLINE
731                                      ?   unknown value
732
733       cmd         CMD       see args.  (alias args, command).
734
735       comm        COMMAND   command name (only the executable name).  The
736                             output in this column may contain spaces.  (alias
737                             ucmd, ucomm).  See also the args format keyword,
738                             the -f option, and the c option.
739                             When specified last, this column will extend to
740                             the edge of the display.  If ps can not determine
741                             display width, as when output is redirected
742                             (piped) into a file or another command, the
743                             output width is undefined (it may be 80,
744                             unlimited, determined by the TERM variable, and
745                             so on).  The COLUMNS environment variable or
746                             --cols option may be used to exactly determine
747                             the width in this case.  The w or -w option may
748                             be also be used to adjust width.
749
750       command     COMMAND   See args.  (alias args, command).
751
752       cp          CP        per-mill (tenths of a percent) CPU usage.  (see
753                             %cpu).
754
755       cputime     TIME      cumulative CPU time, "[DD-]hh:mm:ss" format.
756                             (alias time).
757
758       cputimes    TIME      cumulative CPU time in seconds (alias times).
759
760
761       cuc         %CUC      The CPU utilization of a process, including dead
762                             children, in an extended "##.###" format.  (see
763                             also %cpu, c, cp, cuu, pcpu).
764
765       cuu         %CUU      The CPU utilization of a process in an extended
766                             "##.###" format.  (see also %cpu, c, cp, cuc,
767                             pcpu).
768
769       drs         DRS       data resident set size, the amount of private
770                             memory reserved by a process.  It is also known
771                             as DATA. Such memory may not yet be mapped to rss
772                             but will always be included included in the vsz
773                             amount.
774
775
776       egid        EGID      effective group ID number of the process as a
777                             decimal integer.  (alias gid).
778
779       egroup      EGROUP    effective group ID of the process.  This will be
780                             the textual group ID, if it can be obtained and
781                             the field width permits, or a decimal
782                             representation otherwise.  (alias group).
783
784       eip         EIP       instruction pointer. As of kernel 4.9.xx will be
785                             zeroed out unless task is exiting or being core
786                             dumped.
787
788       esp         ESP       stack pointer. As of kernel 4.9.xx will be zeroed
789                             out unless task is exiting or being core dumped.
790
791       etime       ELAPSED   elapsed time since the process was started, in
792                             the form [[DD-]hh:]mm:ss.
793
794       etimes      ELAPSED   elapsed time since the process was started, in
795                             seconds.
796
797       euid        EUID      effective user ID (alias uid).
798
799       euser       EUSER     effective user name.  This will be the textual
800                             user ID, if it can be obtained and the field
801                             width permits, or a decimal representation
802                             otherwise.  The n option can be used to force the
803                             decimal representation.  (alias uname, user).
804
805       exe         EXE       path to the executable. Useful if path cannot be
806                             printed via cmd, comm or args format options.
807
808       f           F         flags associated with the process, see the
809                             PROCESS FLAGS section.  (alias flag, flags).
810
811       fgid        FGID      filesystem access group ID.  (alias fsgid).
812
813       fgroup      FGROUP    filesystem access group ID.  This will be the
814                             textual group ID, if it can be obtained and the
815                             field width permits, or a decimal representation
816                             otherwise.  (alias fsgroup).
817
818       flag        F         see f.  (alias f, flags).
819
820       flags       F         see f.  (alias f, flag).
821
822       fname       COMMAND   first 8 bytes of the base name of the process's
823                             executable file.  The output in this column may
824                             contain spaces.
825
826       fuid        FUID      filesystem access user ID.  (alias fsuid).
827
828       fuser       FUSER     filesystem access user ID.  This will be the
829                             textual user ID, if it can be obtained and the
830                             field width permits, or a decimal representation
831                             otherwise.
832
833
834       gid         GID       see egid.  (alias egid).
835
836       group       GROUP     see egroup.  (alias egroup).
837
838       ignored     IGNORED   mask of the ignored signals, see signal(7).
839                             According to the width of the field, a 32 or 64
840                             bits mask in hexadecimal format is displayed.
841                             (alias sig_ignore, sigignore).
842
843       ipcns       IPCNS     Unique inode number describing the namespace the
844                             process belongs to.  See namespaces(7).
845
846       label       LABEL     security label, most commonly used for SELinux
847                             context data.  This is for the Mandatory Access
848                             Control ("MAC") found on high-security systems.
849
850       lstart      STARTED   time the command started. This will be in the
851                             form "DDD mmm HH:MM:SS YYY" unless changed by the
852                             -D option.
853
854       lsession    SESSION   displays the login session identifier of a
855                             process, if systemd support has been included.
856
857       luid        LUID      displays Login ID associated with a process.
858
859       lwp         LWP       light weight process (thread) ID of the
860                             dispatchable entity (alias spid, tid).  See tid
861                             for additional information.
862
863       lxc         LXC       The name of the lxc container within which a task
864                             is running.  If a process is not running inside a
865                             container, a dash ('-') will be shown.
866
867       machine     MACHINE   displays the machine name for processes assigned
868                             to VM or container, if systemd support has been
869                             included.
870
871       maj_flt     MAJFLT    The number of major page faults that have
872                             occurred with this process.
873
874       min_flt     MINFLT    The number of minor page faults that have
875                             occurred with this process.
876
877       mntns       MNTNS     Unique inode number describing the namespace the
878                             process belongs to.  See namespaces(7).
879
880       netns       NETNS     Unique inode number describing the namespace the
881                             process belongs to.  See namespaces(7).
882
883       ni          NI        nice value. This ranges from 19 (nicest) to -20
884                             (not nice to others), see nice(1).  (alias nice).
885
886       nice        NI        see ni.(alias ni).
887
888       nlwp        NLWP      number of lwps (threads) in the process.  (alias
889                             thcount).
890
891       numa        NUMA      The node associated with the most recently used
892                             processor.  A -1 means that NUMA information is
893                             unavailable.
894
895       nwchan      WCHAN     address of the kernel function where the process
896                             is sleeping (use wchan if you want the kernel
897                             function name).
898
899       oom         OOM       Out of Memory Score. The value, ranging from 0 to
900                             +1000, used to select task(s) to kill when memory
901                             is exhausted.
902
903
904
905       oomadj      OOMADJ    Out of Memory Adjustment Factor. The value is
906                             added to the current out of memory score which is
907                             then used to determine which task to kill when
908                             memory is exhausted.
909
910       ouid        OWNER     displays the Unix user identifier of the owner of
911                             the session of a process, if systemd support has
912                             been included.
913
914       pcpu        %CPU      see %cpu.  (alias %cpu).
915
916       pending     PENDING   mask of the pending signals. See signal(7).
917                             Signals pending on the process are distinct from
918                             signals pending on individual threads.  Use the m
919                             option or the -m option to see both.  According
920                             to the width of the field, a 32 or 64 bits mask
921                             in hexadecimal format is displayed.  (alias sig).
922
923       pgid        PGID      process group ID or, equivalently, the process ID
924                             of the process group leader.  (alias pgrp).
925
926       pgrp        PGRP      see pgid.  (alias pgid).
927
928       pid         PID       a number representing the process ID (alias
929                             tgid).
930
931       pidns       PIDNS     Unique inode number describing the namespace the
932                             process belongs to.  See namespaces(7).
933
934       pmem        %MEM      see %mem.  (alias %mem).
935
936       policy      POL       scheduling class of the process.  (alias
937                             class, cls).  Possible values are:
938
939                                      -   not reported
940                                      TS  SCHED_OTHER
941                                      FF  SCHED_FIFO
942                                      RR  SCHED_RR
943                                      B   SCHED_BATCH
944                                      ISO SCHED_ISO
945                                      IDL SCHED_IDLE
946                                      DLN SCHED_DEADLINE
947                                      ?   unknown value
948
949       ppid        PPID      parent process ID.
950
951       pri         PRI       priority of the process.  Higher number means
952                             higher priority.
953
954       psr         PSR       processor that process last executed on.
955
956       pss         PSS       Proportional share size, the non-swapped physical
957                             memory, with shared memory proportionally
958                             accounted to all tasks mapping it.
959
960       rbytes      RBYTES    Number of bytes which this process really did
961                             cause to be fetched from the storage layer.
962
963       rchars      RCHARS    Number of bytes which this task has caused to be
964                             read from storage.
965
966       rgid        RGID      real group ID.
967
968       rgroup      RGROUP    real group name.  This will be the textual group
969                             ID, if it can be obtained and the field width
970                             permits, or a decimal representation otherwise.
971
972       rops        ROPS      Number of read I/O operations—that is, system
973                             calls such as read(2) and pread(2).
974
975
976
977       rss         RSS       resident set size, the non-swapped physical
978                             memory that a task has used (in kiloBytes).
979                             (alias rssize, rsz).
980
981       rssize      RSS       see rss.  (alias rss, rsz).
982
983       rsz         RSZ       see rss.  (alias rss, rssize).
984
985       rtprio      RTPRIO    realtime priority.
986
987       ruid        RUID      real user ID.
988
989       ruser       RUSER     real user ID.  This will be the textual user ID,
990                             if it can be obtained and the field width
991                             permits, or a decimal representation otherwise.
992
993       s           S         minimal state display (one character).  See
994                             section PROCESS STATE CODES for the different
995                             values.  See also stat if you want additional
996                             information displayed.  (alias state).
997
998       sched       SCH       scheduling policy of the process.  The policies
999                             SCHED_OTHER (SCHED_NORMAL), SCHED_FIFO, SCHED_RR,
1000                             SCHED_BATCH, SCHED_ISO, SCHED_IDLE and
1001                             SCHED_DEADLINE are respectively displayed as 0,
1002                             1, 2, 3, 4, 5 and 6.
1003
1004       seat        SEAT      displays the identifier associated with all
1005                             hardware devices assigned to a specific
1006                             workplace, if systemd support has been included.
1007
1008       sess        SESS      session ID or, equivalently, the process ID of
1009                             the session leader.  (alias session, sid).
1010
1011       sgi_p       P         processor that the process is currently executing
1012                             on.  Displays "*" if the process is not currently
1013                             running or runnable.
1014
1015       sgid        SGID      saved group ID.  (alias svgid).
1016
1017       sgroup      SGROUP    saved group name.  This will be the textual group
1018                             ID, if it can be obtained and the field width
1019                             permits, or a decimal representation otherwise.
1020
1021       sid         SID       see sess.  (alias sess, session).
1022
1023       sig         PENDING   see pending.  (alias pending, sig_pend).
1024
1025       sigcatch    CAUGHT    see caught.  (alias caught, sig_catch).
1026
1027       sigignore   IGNORED   see ignored.  (alias ignored, sig_ignore).
1028
1029       sigmask     BLOCKED   see blocked.  (alias blocked, sig_block).
1030
1031       size        SIZE      approximate amount of swap space that would be
1032                             required if the process were to dirty all
1033                             writable pages and then be swapped out.  This
1034                             number is very rough!
1035
1036       slice       SLICE     displays the slice unit which a process belongs
1037                             to, if systemd support has been included.
1038
1039       spid        SPID      see lwp.  (alias lwp, tid).
1040
1041       stackp      STACKP    address of the bottom (start) of stack for the
1042                             process.
1043
1044
1045
1046
1047
1048
1049       start       STARTED   time the command started.  If the process was
1050                             started less than 24 hours ago, the output format
1051                             is "HH:MM:SS", else it is "  Mmm dd" (where Mmm
1052                             is a three-letter month name).  See also
1053                             lstart, bsdstart, start_time, and stime.
1054
1055       start_time  START     starting time or date of the process.  Only the
1056                             year will be displayed if the process was not
1057                             started the same year ps was invoked, or "MmmDD"
1058                             if it was not started the same day, or "HH:MM"
1059                             otherwise.  See also bsdstart, start, lstart,
1060                             and stime.
1061
1062       stat        STAT      multi-character process state.  See section
1063                             PROCESS STATE CODES for the different values
1064                             meaning.  See also s and state if you just want
1065                             the first character displayed.
1066
1067       state       S         see s. (alias s).
1068
1069       stime       STIME     see start_time. (alias start_time).
1070
1071       suid        SUID      saved user ID.  (alias svuid).
1072
1073       supgid      SUPGID    group ids of supplementary groups, if any.  See
1074                             getgroups(2).
1075
1076       supgrp      SUPGRP    group names of supplementary groups, if any.  See
1077                             getgroups(2).
1078
1079       suser       SUSER     saved user name.  This will be the textual user
1080                             ID, if it can be obtained and the field width
1081                             permits, or a decimal representation otherwise.
1082                             (alias svuser).
1083
1084       svgid       SVGID     see sgid.  (alias sgid).
1085
1086       svuid       SVUID     see suid.  (alias suid).
1087
1088       sz          SZ        size in physical pages of the core image of the
1089                             process.  This includes text, data, and stack
1090                             space.  Device mappings are currently excluded;
1091                             this is subject to change.  See vsz and rss.
1092
1093       tgid        TGID      a number representing the thread group to which a
1094                             task belongs (alias pid).  It is the process ID
1095                             of the thread group leader.
1096
1097       thcount     THCNT     see nlwp.  (alias nlwp).  number of kernel
1098                             threads owned by the process.
1099
1100       tid         TID       the unique number representing a dispatchable
1101                             entity (alias lwp, spid).  This value may also
1102                             appear as: a process ID (pid); a process group ID
1103                             (pgrp); a session ID for the session leader
1104                             (sid); a thread group ID for the thread group
1105                             leader (tgid); and a tty process group ID for the
1106                             process group leader (tpgid).
1107
1108       time        TIME      cumulative CPU time, "[DD-]HH:MM:SS" format.
1109                             (alias cputime).
1110
1111       timens      TIMENS    Unique inode number describing the namespace the
1112                             process belongs to.  See namespaces(7).
1113
1114       times       TIME      cumulative CPU time in seconds (alias cputimes).
1115
1116       tname       TTY       controlling tty (terminal).  (alias tt, tty).
1117
1118
1119
1120
1121       tpgid       TPGID     ID of the foreground process group on the tty
1122                             (terminal) that the process is connected to, or
1123                             -1 if the process is not connected to a tty.
1124
1125       trs         TRS       text resident set size, the amount of physical
1126                             memory devoted to executable code.
1127
1128       tt          TT        controlling tty (terminal).  (alias tname, tty).
1129
1130       tty         TT        controlling tty (terminal).  (alias tname, tt).
1131
1132       ucmd        CMD       see comm.  (alias comm, ucomm).
1133
1134       ucomm       COMMAND   see comm.  (alias comm, ucmd).
1135
1136       uid         UID       see euid.  (alias euid).
1137
1138       uname       USER      see euser.  (alias euser, user).
1139
1140       unit        UNIT      displays unit which a process belongs to, if
1141                             systemd support has been included.
1142
1143       user        USER      see euser.  (alias euser, uname).
1144
1145       userns      USERNS    Unique inode number describing the namespace the
1146                             process belongs to.  See namespaces(7).
1147
1148       uss         USS       Unique set size, the non-swapped physical memory,
1149                             which is not shared with an another task.
1150
1151       utsns       UTSNS     Unique inode number describing the namespace the
1152                             process belongs to.  See namespaces(7).
1153
1154       uunit       UUNIT     displays user unit which a process belongs to, if
1155                             systemd support has been included.
1156
1157       vsize       VSZ       see vsz.  (alias vsz).
1158
1159       vsz         VSZ       virtual memory size of the process in KiB
1160                             (1024-byte units).  Device mappings are currently
1161                             excluded; this is subject to change.  (alias
1162                             vsize).
1163
1164       wbytes      WBYTES    Number of bytes which this process caused to be
1165                             sent to the storage layer.
1166
1167       wcbytes     WCBYTES   Number of cancelled write bytes.
1168
1169       wchan       WCHAN     name of the kernel function in which the process
1170                             is sleeping.
1171
1172       wchars      WCHARS    Number of bytes which this task has caused, or
1173                             shall cause to be written to disk.
1174
1175       wops        WOPS      Number of write I/O operations—that is, system
1176                             calls such as write(2) and pwrite(2).
1177
1178

ENVIRONMENT VARIABLES

1180       The following environment variables could affect ps:
1181
1182       COLUMNS
1183          Override default display width.
1184
1185       LINES
1186          Override default display height.
1187
1188       PS_PERSONALITY
1189          Set to one of posix, old, linux, bsd, sun, digital...  (see section
1190          PERSONALITY below).
1191
1192       CMD_ENV
1193          Set to one of posix, old, linux, bsd, sun, digital...  (see section
1194          PERSONALITY below).
1195
1196       I_WANT_A_BROKEN_PS
1197          Force obsolete command line interpretation.
1198
1199       LC_TIME
1200          Date format.
1201
1202       LIBPROC_HIDE_KERNEL
1203          Set this to any value to hide kernel threads normally displayed with
1204          the -e option. This is equivalent to selecting --ppid 2 -p 2
1205          --deselect instead. Also works in BSD mode.
1206
1207       PS_COLORS
1208          Not currently supported.
1209
1210       PS_FORMAT
1211          Default output format override. You may set this to a format string
1212          of the type used for the -o option.  The DefSysV and DefBSD values
1213          are particularly useful.
1214
1215       POSIXLY_CORRECT
1216          Don't find excuses to ignore bad "features".
1217
1218       POSIX2
1219          When set to "on", acts as POSIXLY_CORRECT.
1220
1221       UNIX95
1222          Don't find excuses to ignore bad "features".
1223
1224       _XPG
1225          Cancel CMD_ENV=irix non-standard behavior.
1226
1227       In general, it is a bad idea to set these variables.  The one exception
1228       is CMD_ENV or PS_PERSONALITY, which could be set to Linux for normal
1229       systems.  Without that setting, ps follows the useless and bad parts of
1230       the Unix98 standard.
1231

PERSONALITY

1233       390        like the OS/390 OpenEdition ps
1234       aix        like AIX ps
1235       bsd        like FreeBSD ps (totally non-standard)
1236       compaq     like Digital Unix ps
1237       debian     like the old Debian ps
1238       digital    like Tru64 (was Digital Unix, was OSF/1) ps
1239       gnu        like the old Debian ps
1240       hp         like HP-UX ps
1241       hpux       like HP-UX ps
1242       irix       like Irix ps
1243       linux      ***** recommended *****
1244       old        like the original Linux ps (totally non-standard)
1245       os390      like OS/390 Open Edition ps
1246       posix      standard
1247       s390       like OS/390 Open Edition ps
1248       sco        like SCO ps
1249       sgi        like Irix ps
1250       solaris2   like Solaris 2+ (SunOS 5) ps
1251       sunos4     like SunOS 4 (Solaris 1) ps (totally non-standard)
1252       svr4       standard
1253       sysv       standard
1254       tru64      like Tru64 (was Digital Unix, was OSF/1) ps
1255       unix       standard
1256       unix95     standard
1257       unix98     standard
1258

BUGS

1260       The fields bsdstart and start will only show the abbreviated month name
1261       in English. The fields lstart and stime will show the abbreviated month
1262       name in the configured locale but may exceed the column width due to
1263       the different lengths for abbreviated month and day names across
1264       languages.
1265

SEE ALSO

1267       pgrep(1), pstree(1), top(1), strftime(3), proc(5).
1268

STANDARDS

1270       This ps conforms to:
1271
1272       1   Version 2 of the Single Unix Specification
1273       2   The Open Group Technical Standard Base Specifications, Issue 6
1274       3   IEEE Std 1003.1, 2004 Edition
1275       4   X/Open System Interfaces Extension [UP XSI]
1276       5   ISO/IEC 9945:2003
1277

AUTHOR

1279       ps was originally written by Branko Lankester ⟨lankeste@fwi.uva.nl⟩.
1280       Michael K. Johnson ⟨johnsonm@redhat.com⟩ re-wrote it significantly to
1281       use the proc filesystem, changing a few things in the process.  Michael
1282       Shields ⟨mjshield@nyx.cs.du.edu⟩ added the pid-list feature.  Charles
1283       Blake ⟨cblake@bbn.com⟩ added multi-level sorting, the dirent-style li‐
1284       brary, the device name-to-number mmaped database, the approximate bi‐
1285       nary search directly on System.map, and many code and documentation
1286       cleanups.  David Mossberger-Tang wrote the generic BFD support for
1287       psupdate.  Albert Cahalan ⟨albert@users.sf.net⟩ rewrote ps for full
1288       Unix98 and BSD support, along with some ugly hacks for obsolete and
1289       foreign syntax.
1290
1291       Please send bug reports to ⟨procps@freelists.org⟩.  No subscription is
1292       required or suggested.
1293
1294
1295
1296procps-ng                         2023-01-18                             PS(1)
Impressum