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

EXAMPLES

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

SIMPLE PROCESS SELECTION

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

PROCESS SELECTION BY LIST

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

OUTPUT FORMAT CONTROL

289       These options are used to choose the information displayed by ps. The
290       output may differ by personality.
291
292       -F              extra full format. See the -f option, which -F implies.
293
294
295       -O format       is like -o, but preloaded with some default columns.
296                       Identical to -o pid,format,state,tname,time,command or
297                       -o pid,format,tname,time,cmd, see -o below.
298
299
300       O format        is preloaded o (overloaded).
301                       The BSD O option can act like -O (user-defined output
302                       format with some common fields predefined) or can be
303                       used to specify sort order. Heuristics are used to
304                       determine the behavior of this option. To ensure that
305                       the desired behavior is obtained (sorting or
306                       formatting), specify the option in some other way (e.g.
307                       with -O or --sort). When used as a formatting option,
308                       it is identical to -O, with the BSD personality.
309
310
311       -M              Add a column of security data. Identical to Z.
312                       (for SE Linux)
313
314
315       X               Register format.
316
317
318       Z               Add a column of security data. Identical to -M.
319                       (for SE Linux)
320
321
322       -c              Show different scheduler information for the -l option.
323
324
325       -f              does full-format listing. This option can be combined
326                       with many other UNIX-style options to add additional
327                       columns. It also causes the command arguments to be
328                       printed. When used with -L, the NLWP (number of
329                       threads) and LWP (thread ID) columns will be added. See
330                       the c option, the format keyword args, and the format
331                       keyword comm.
332
333
334       j               BSD job control format.
335
336
337       -j              jobs format
338
339
340       l               display BSD long format.
341
342
343       -l              long format. The -y option is often useful with this.
344
345
346       o format        specify user-defined format. Identical to -o and
347                       --format.
348
349
350       -o format       user-defined format.
351                       format is a single argument in the form of a
352                       blank-separated or comma-separated list, which offers a
353                       way to specify individual output columns. The
354                       recognized keywords are described in the STANDARD
355                       FORMAT SPECIFIERS section below. Headers may be renamed
356                       (ps -o pid,ruser=RealUser -o comm=Command) as desired.
357                       If all column headers are empty (ps -o pid= -o comm=)
358                       then the header line will not be output. Column width
359                       will increase as needed for wide headers; this may be
360                       used to widen up columns such as WCHAN
361                       (ps -o pid,wchan=WIDE-WCHAN-COLUMN -o comm). Explicit
362                       width control (ps opid,wchan:42,cmd) is offered too.
363                       The behavior of ps -o pid=X,comm=Y varies with
364                       personality; output may be one column named "X,comm=Y"
365                       or two columns named "X" and "Y". Use multiple -o
366                       options when in doubt. Use the PS_FORMAT environment
367                       variable to specify a default as desired; DefSysV and
368                       DefBSD are macros that may be used to choose the
369                       default UNIX or BSD columns.
370
371
372       s               display signal format
373
374
375       u               display user-oriented format
376
377
378       v               display virtual memory format
379
380
381       -y              Do not show flags; show rss in place of addr. This
382                       option can only be used with -l.
383
384
385       -Z              display security context format (SELinux, etc.)
386
387
388       --format format user-defined format. Identical to -o and o.
389
390
391       --context       Display security context format. (for SE Linux)
392
393

OUTPUT MODIFIERS

395       -H              show process hierarchy (forest)
396
397
398       N namelist      Specify namelist file. Identical to -n, see -n above.
399
400
401       O order         Sorting order. (overloaded)
402                       The BSD O option can act like -O (user-defined output
403                       format with some common fields predefined) or can be
404                       used to specify sort order. Heuristics are used to
405                       determine the behavior of this option. To ensure that
406                       the desired behavior is obtained (sorting or
407                       formatting), specify the option in some other way (e.g.
408                       with -O or --sort).
409
410                       For sorting, obsolete BSD O option syntax is
411                       O[+|-]k1[,[+|-]k2[,...]]. It orders the processes
412                       listing according to the multilevel sort specified by
413                       the sequence of one-letter short keys k1, k2, ...
414                       described in the OBSOLETE SORT KEYS section below.
415                       The "+" is currently optional, merely re-iterating the
416                       default direction on a key, but may help to distinguish
417                       an O sort from an O format. The "-" reverses direction
418                       only on the key it precedes.
419
420
421       S               Sum up some information, such as CPU usage, from dead
422                       child processes into their parent. This is useful for
423                       examining a system where a parent process repeatedly
424                       forks off short-lived children to do work.
425
426
427       c               Show the true command name. This is derived from the
428                       name of the executable file, rather than from the argv
429                       value. Command arguments and any modifications to them
430                       (see setproctitle(3)) are thus not shown. This option
431                       effectively turns the args format keyword into the comm
432                       format keyword; it is useful with the -f format option
433                       and with the various BSD-style format options, which
434                       all normally display the command arguments. See the -f
435                       option, the format keyword args, and the format keyword
436                       comm.
437
438
439       e               Show the environment after the command.
440
441
442       f               ASCII-art process hierarchy (forest)
443
444
445       h               No header. (or, one header per screen in the BSD
446                       personality)
447                       The h option is problematic. Standard BSD ps uses this
448                       option to print a header on each page of output, but
449                       older Linux ps uses this option to totally disable the
450                       header. This version of ps follows the Linux usage of
451                       not printing the header unless the BSD personality has
452                       been selected, in which case it prints a header on each
453                       page of output. Regardless of the current personality,
454                       you can use the long options --headers and --no-headers
455                       to enable printing headers each page or disable headers
456                       entirely, respectively.
457
458
459       k spec          specify sorting order. Sorting syntax is
460                       [+|-]key[,[+|-]key[,...]] Choose a multi-letter key
461                       from the STANDARD FORMAT SPECIFIERS section. The "+" is
462                       optional since default direction is increasing
463                       numerical or lexicographic order. Identical to --sort.
464                       Examples:
465                       ps jaxkuid,-ppid,+pid
466                       ps axk comm o comm,args
467                       ps kstart_time -ef
468
469
470       -n namelist     set namelist file. Identical to N.
471                       The namelist file is needed for a proper WCHAN display,
472                       and must match the current Linux kernel exactly for
473                       correct output. Without this option, the default search
474                       path for the namelist is:
475
476                            $PS_SYSMAP
477                            $PS_SYSTEM_MAP
478                            /proc/*/wchan
479                            /boot/System.map-`uname -r`
480                            /boot/System.map
481                            /lib/modules/`uname -r`/System.map
482                            /usr/src/linux/System.map
483                            /System.map
484
485
486       n               Numeric output for WCHAN and USER. (including all types
487                       of UID and GID)
488
489
490       -w              Wide output. Use this option twice for unlimited width.
491
492
493       w               Wide output. Use this option twice for unlimited width.
494
495
496       --cols n        set screen width
497
498
499       --columns n     set screen width
500
501
502       --cumulative    include some dead child process data (as a sum with the
503                       parent)
504
505
506       --forest        ASCII art process tree
507
508
509       --headers       repeat header lines, one per page of output
510
511
512       --no-headers    print no header line at all
513
514
515       --lines n       set screen height
516
517
518       --rows n        set screen height
519
520
521       --sort spec     specify sorting order. Sorting syntax is
522                       [+|-]key[,[+|-]key[,...]] Choose a multi-letter key
523                       from the STANDARD FORMAT SPECIFIERS section. The "+" is
524                       optional since default direction is increasing
525                       numerical or lexicographic order. Identical to k. For
526                       example: ps jax --sort=uid,-ppid,+pid
527
528
529       --width n       set screen width
530
531

THREAD DISPLAY

533       H               Show threads as if they were processes
534
535       -L              Show threads, possibly with LWP and NLWP columns
536
537       -T              Show threads, possibly with SPID column
538
539       m               Show threads after processes
540
541       -m              Show threads after processes
542
543

OTHER INFORMATION

545       L               List all format specifiers.
546
547       -V              Print the procps version.
548
549       V               Print the procps version.
550
551       --help          Print a help message.
552
553       --info          Print debugging info.
554
555       --version       Print the procps version.
556
557

NOTES

559       This ps works by reading the virtual files in /proc. This ps does not
560       need to be setuid kmem or have any privileges to run. Do not give this
561       ps any special permissions.
562
563       This ps needs access to namelist data for proper WCHAN display. For
564       kernels prior to 2.6, the System.map file must be installed.
565
566       CPU usage is currently expressed as the percentage of time spent
567       running during the entire lifetime of a process. This is not ideal,
568       and it does not conform to the standards that ps otherwise conforms to.
569       CPU usage is unlikely to add up to exactly 100%.
570
571       The SIZE and RSS fields don't count some parts of a process including
572       the page tables, kernel stack, struct thread_info, and struct
573       task_struct. This is usually at least 20 KiB of memory that is always
574       resident. SIZE is the virtual size of the process (code+data+stack).
575
576       Processes marked <defunct> are dead processes (so-called "zombies")
577       that remain because their parent has not destroyed them properly. These
578       processes will be destroyed by init(8) if the parent process exits.
579
580       If the length of the username is greater than the length of the display
581       column, the numeric user ID is displayed instead.
582
583

PROCESS FLAGS

585       The sum of these values is displayed in the "F" column, which is
586       provided by the flags output specifier.
587       1    forked but didn't exec
588       4    used super-user privileges
589

PROCESS STATE CODES

591       Here are the different values that the s, stat and state output
592       specifiers (header "STAT" or "S") will display to describe the state of
593       a process.
594       D    Uninterruptible sleep (usually IO)
595       R    Running or runnable (on run queue)
596       S    Interruptible sleep (waiting for an event to complete)
597       T    Stopped, either by a job control signal or because it is being
598            traced.
599       W    paging (not valid since the 2.6.xx kernel)
600       X    dead (should never be seen)
601       Z    Defunct ("zombie") process, terminated but not reaped by its
602            parent.
603
604       For BSD formats and when the stat keyword is used, additional
605       characters may be displayed:
606       <    high-priority (not nice to other users)
607       N    low-priority (nice to other users)
608       L    has pages locked into memory (for real-time and custom IO)
609       s    is a session leader
610       l    is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
611       +    is in the foreground process group
612

OBSOLETE SORT KEYS

614       These keys are used by the BSD O option (when it is used for sorting).
615       The GNU --sort option doesn't use these keys, but the specifiers
616       described below in the STANDARD FORMAT SPECIFIERS section. Note that
617       the values used in sorting are the internal values ps uses and not the
618       "cooked" values used in some of the output format fields (e.g. sorting
619       on tty will sort into device number, not according to the terminal name
620       displayed). Pipe ps output into the sort(1) command if you want to sort
621       the cooked values.
622
623
624       KEY   LONG         DESCRIPTION
625       c     cmd          simple name of executable
626       C     pcpu         cpu utilization
627       f     flags        flags as in long format F field
628       g     pgrp         process group ID
629       G     tpgid        controlling tty process group ID
630       j     cutime       cumulative user time
631       J     cstime       cumulative system time
632       k     utime        user time
633       m     min_flt      number of minor page faults
634       M     maj_flt      number of major page faults
635       n     cmin_flt     cumulative minor page faults
636       N     cmaj_flt     cumulative major page faults
637       o     session      session ID
638       p     pid          process ID
639       P     ppid         parent process ID
640       r     rss          resident set size
641       R     resident     resident pages
642       s     size         memory size in kilobytes
643       S     share        amount of shared pages
644       t     tty          the device number of the controlling tty
645       T     start_time   time process was started
646       U     uid          user ID number
647       u     user         user name
648       v     vsize        total VM size in kB
649       y     priority     kernel scheduling priority
650

AIX FORMAT DESCRIPTORS

652       This ps supports AIX format descriptors, which work somewhat like the
653       formatting codes of printf(1) and printf(3). For example, the normal
654       default output can be produced with this:  ps -eo "%p %y %x %c".
655       The NORMAL codes are described in the next section.
656
657       CODE   NORMAL   HEADER
658       %C     pcpu     %CPU
659       %G     group    GROUP
660       %P     ppid     PPID
661       %U     user     USER
662       %a     args     COMMAND
663       %c     comm     COMMAND
664       %g     rgroup   RGROUP
665       %n     nice     NI
666       %p     pid      PID
667       %r     pgid     PGID
668
669       %t     etime    ELAPSED
670       %u     ruser    RUSER
671       %x     time     TIME
672       %y     tty      TTY
673       %z     vsz      VSZ
674
675

STANDARD FORMAT SPECIFIERS

677       Here are the different keywords that may be used to control the output
678       format (e.g. with option -o) or to sort the selected processes with the
679       GNU-style --sort option.
680
681       For example:  ps -eo pid,user,args --sort user
682
683       This version of ps tries to recognize most of the keywords used in
684       other implementations of ps.
685
686       The following user-defined format specifiers may contain spaces: args,
687       cmd, comm, command, fname, ucmd, ucomm, lstart, bsdstart, start.
688
689       Some keywords may not be available for sorting.
690
691
692

CODE HEADER DESCRIPTION

694

%cpu %CPU cpu utilization of the process in "##.#" format.

696                    Currently, it is the CPU time used divided by the time the
697                    process has been running (cputime/realtime ratio),
698                    expressed as a percentage. It will not add up to 100%
699                    unless you are lucky. (alias pcpu).
700

%mem %MEM ratio of the process's resident set size to the physical

702                    memory on the machine, expressed as a percentage.
703                    (alias pmem).
704

args COMMAND command with all its arguments as a string. Modifications

706                    to the arguments may be shown. The output in this column
707                    may contain spaces. A process marked <defunct> is partly
708                    dead, waiting to be fully destroyed by its parent.
709                    Sometimes the process args will be unavailable; when this
710                    happens, ps will instead print the executable name in
711                    brackets. (alias cmd, command). See also the comm format
712                    keyword, the -f option, and the c option.
713                    When specified last, this column will extend to the edge
714                    of the display. If ps can not determine display width, as
715                    when output is redirected (piped) into a file or another
716                    command, the output width is undefined. (it may be 80,
717                    unlimited, determined by the TERM variable, and so on) The
718                    COLUMNS environment variable or --cols option may be used
719                    to exactly determine the width in this case. The w or -w
720                    option may be also be used to adjust width.
721

blocked BLOCKED mask of the blocked signals, see signal(7). According to

723                    the width of the field, a 32-bit or 64-bit mask in
724                    hexadecimal format is displayed.
725                    (alias sig_block, sigmask).
726

bsdstart START time the command started. If the process was started less

728                    than 24 hours ago, the output format is " HH:MM", else it
729                    is "mmm dd" (where mmm is the three letters of the month).
730                    See also lstart, start, start_time, and stime.
731

bsdtime TIME accumulated cpu time, user + system. The display format is

733                    usually "MMM:SS", but can be shifted to the right if the
734                    process used more than 999 minutes of cpu time.
735
736
737
738

c C processor utilization. Currently, this is the integer

740                    value of the percent usage over the lifetime of the
741                    process. (see %cpu).
742

caught CAUGHT mask of the caught signals, see signal(7). According to

744                    the width of the field, a 32 or 64 bits mask in
745                    hexadecimal format is displayed.
746                    (alias sig_catch, sigcatch).
747

cgroup CGROUP display control groups to which the process belongs.

749

class CLS scheduling class of the process. (alias policy, cls).

751                    Field's possible values are:
752                    -   not reported
753                    TS  SCHED_OTHER
754                    FF  SCHED_FIFO
755                    RR  SCHED_RR
756                    B   SCHED_BATCH
757                    ISO SCHED_ISO
758                    IDL SCHED_IDLE
759                    ?   unknown value
760

cls CLS scheduling class of the process. (alias policy, class).

762                    Field's possible values are:
763                    -   not reported
764                    TS  SCHED_OTHER
765                    FF  SCHED_FIFO
766                    RR  SCHED_RR
767                    B   SCHED_BATCH
768                    ISO SCHED_ISO
769                    IDL SCHED_IDLE
770                    ?   unknown value
771

cmd CMD see args. (alias args, command).

773

comm COMMAND command name (only the executable name). Modifications to

775                    the command name will not be shown. A process marked
776                    <defunct> is partly dead, waiting to be fully destroyed by
777                    its parent. The output in this column may contain spaces.
778                    (alias ucmd, ucomm). See also the args format keyword, the
779                    -f option, and the c option.
780                    When specified last, this column will extend to the edge
781                    of the display. If ps can not determine display width, as
782                    when output is redirected (piped) into a file or another
783                    command, the output width is undefined. (it may be 80,
784                    unlimited, determined by the TERM variable, and so on) The
785                    COLUMNS environment variable or --cols option may be used
786                    to exactly determine the width in this case. The w or -w
787                    option may be also be used to adjust width.
788

command COMMAND see args. (alias args, cmd).

790

cp CP per-mill (tenths of a percent) CPU usage. (see %cpu).

792

cputime TIME cumulative CPU time, "[dd-]hh:mm:ss" format. (alias time).

794

egid EGID effective group ID number of the process as a decimal

796                    integer. (alias gid).
797

egroup EGROUP effective group ID of the process. This will be the

799                    textual group ID, if it can be obtained and the field
800                    width permits, or a decimal representation otherwise.
801                    (alias group).
802

eip EIP instruction pointer.

804

esp ESP stack pointer.

806
807
808

etime ELAPSED elapsed time since the process was started, in the

810                    form [[dd-]hh:]mm:ss.
811

euid EUID effective user ID. (alias uid).

813

euser EUSER effective user name. This will be the textual user ID,

815                    if it can be obtained and the field width permits,
816                    or a decimal representation otherwise. The n option can be
817                    used to force the decimal representation.
818                    (alias uname, user).
819

f F flags associated with the process, see the PROCESS FLAGS

821                    section. (alias flag, flags).
822

fgid FGID filesystem access group ID. (alias fsgid).

824

fgroup FGROUP filesystem access group ID. This will be the textual

826                    user ID, if it can be obtained and the field width
827                    permits, or a decimal representation otherwise.
828                    (alias fsgroup).
829

flag F see f. (alias f, flags).

831

flags F see f. (alias f, flag).

833

fname COMMAND first 8 bytes of the base name of the process's executable

835                    file. The output in this column may contain spaces.
836

fuid FUID filesystem access user ID. (alias fsuid).

838

fuser FUSER filesystem access user ID. This will be the textual

840                    user ID, if it can be obtained and the field width
841                    permits, or a decimal representation otherwise.
842

gid GID see egid. (alias egid).

844

group GROUP see egroup. (alias egroup).

846

ignored IGNORED mask of the ignored signals, see signal(7). According to

848                    the width of the field, a 32-bit or 64-bit mask in
849                    hexadecimal format is displayed. (alias sig_ignore,
850                    sigignore).
851

label LABEL security label, most commonly used for SE Linux context

853                    data. This is for the Mandatory Access Control ("MAC")
854                    found on high-security systems.
855

lstart STARTED time the command started. See also bsdstart, start,

857                    start_time, and stime.
858

lwp LWP lwp (light weight process, or thread) ID of the lwp being

860                    reported. (alias spid, tid).
861

ni NI nice value. This ranges from 19 (nicest) to -20 (not nice

863                    to others), see nice(1). (alias nice).
864

nice NI see ni. (alias ni).

866

nlwp NLWP number of lwps (threads) in the process. (alias thcount).

868

nwchan WCHAN address of the kernel function where the process is

870                    sleeping (use wchan if you want the kernel function name).
871                    Running tasks will display a dash ('-') in this column.
872

pcpu %CPU see %cpu. (alias %cpu).

874
875
876
877
878

pending PENDING mask of the pending signals. See signal(7). Signals

880                    pending on the process are distinct from signals pending
881                    on individual threads. Use the m option or the -m option
882                    to see both. According to the width of the field, a 32-bit
883                    or 64-bit mask in hexadecimal format is displayed.
884                    (alias sig).
885

pgid PGID process group ID or, equivalently, the process ID of the

887                    process group leader. (alias pgrp).
888

pgrp PGRP see pgid. (alias pgid).

890

pid PID process ID number of the process.

892

pmem %MEM see %mem. (alias %mem).

894

policy POL scheduling class of the process. (alias class, cls).

896                    Possible values are:
897                    -   not reported
898                    TS  SCHED_OTHER
899                    FF  SCHED_FIFO
900                    RR  SCHED_RR
901                    B   SCHED_BATCH
902                    ISO SCHED_ISO
903                    IDL SCHED_IDLE
904                    ?   unknown value
905

ppid PPID parent process ID.

907

psr PSR processor that process is currently assigned to.

909

rgid RGID real group ID.

911

rgroup RGROUP real group name. This will be the textual group ID, if it

913                    can be obtained and the field width permits, or a decimal
914                    representation otherwise.
915

rip RIP 64-bit instruction pointer.

917

rsp RSP 64-bit stack pointer.

919

rss RSS resident set size, the non-swapped physical memory that a

921                    task has used (in kiloBytes). (alias rssize, rsz).
922

rssize RSS see rss. (alias rss, rsz).

924

rsz RSZ see rss. (alias rss, rssize).

926

rtprio RTPRIO realtime priority.

928

ruid RUID real user ID.

930

ruser RUSER real user ID. This will be the textual user ID, if it can

932                    be obtained and the field width permits, or a decimal
933                    representation otherwise.
934

s S minimal state display (one character). See section PROCESS

936                    STATE CODES for the different values. See also stat if you
937                    want additional information displayed. (alias state).
938

sched SCH scheduling policy of the process. The policies SCHED_OTHER

940                    (SCHED_NORMAL), SCHED_FIFO, SCHED_RR, SCHED_BATCH,
941                    SCHED_ISO, and SCHED_IDLE are respectively displayed as
942                    0, 1, 2, 3, 4, and 5.
943

sess SESS session ID or, equivalently, the process ID of the

945                    session leader. (alias session, sid).
946
947
948

sgi_p P processor that the process is currently executing on.

950                    Displays "*" if the process is not currently running or
951                    runnable.
952

sgid SGID saved group ID. (alias svgid).

954

sgroup SGROUP saved group name. This will be the textual group ID, if it

956                    can be obtained and the field width permits, or a decimal
957                    representation otherwise.
958

sid SID see sess. (alias sess, session).

960

sig PENDING see pending. (alias pending, sig_pend).

962

sigcatch CAUGHT see caught. (alias caught, sig_catch).

964

sigignore IGNORED see ignored. (alias ignored, sig_ignore).

966

sigmask BLOCKED see blocked. (alias blocked, sig_block).

968

size SZ approximate amount of swap space that would be required if

970                    the process were to dirty all writable pages and then be
971                    swapped out. This number is very rough!
972

spid SPID see lwp. (alias lwp, tid).

974

stackp STACKP address of the bottom (start) of stack for the process.

976

start STARTED time the command started. If the process was started less

978                    than 24 hours ago, the output format is "HH:MM:SS", else
979                    it is "  mmm dd" (where mmm is a three-letter month name).
980                    See also lstart, bsdstart, start_time, and stime.
981

start_time START starting time or date of the process. Only the year will

983                    be displayed if the process was not started the same year
984                    ps was invoked, or "mmmdd" if it was not started the same
985                    day, or "HH:MM" otherwise. See also bsdstart, start,
986                    lstart, and stime.
987

stat STAT multi-character process state. See section PROCESS STATE

989                    CODES for the different values meaning. See also s and
990                    state if you just want the first character displayed.
991

state S see s. (alias s).

993

suid SUID saved user ID. (alias svuid).

995

suser SUSER saved user name. This will be the textual user ID, if it

997                    can be obtained and the field width permits, or a decimal
998                    representation otherwise. (alias svuser).
999

svgid SVGID see sgid. (alias sgid).

1001

svuid SVUID see suid. (alias suid).

1003

sz SZ size in physical pages of the core image of the process.

1005                    This includes text, data, and stack space. Device mappings
1006                    are currently excluded; this is subject to change. See vsz
1007                    and rss.
1008

thcgr THCGR display control groups to which the thread belongs.

1010

thcount THCNT see nlwp. (alias nlwp). number of kernel threads owned by

1012                    the process.
1013

tid TID see lwp. (alias lwp).

1015

time TIME cumulative CPU time, "[dd-]hh:mm:ss" format.

1017                    (alias cputime).
1018
1019

tname TTY controlling tty (terminal). (alias tt, tty).

1021

tpgid TPGID ID of the foreground process group on the tty (terminal)

1023                    that the process is connected to, or -1 if the process is
1024                    not connected to a tty.
1025

tt TT controlling tty (terminal). (alias tname, tty).

1027

tty TT controlling tty (terminal). (alias tname, tt).

1029

ucmd CMD see comm. (alias comm, ucomm).

1031

ucomm COMMAND see comm. (alias comm, ucmd).

1033

uid UID see euid. (alias euid).

1035

uname USER see euser. (alias euser, user).

1037

user USER see euser. (alias euser, uname).

1039

vsize VSZ see vsz. (alias vsz).

1041

vsz VSZ virtual memory size of the process in KiB

1043                    (1024-byte units). Device mappings are currently excluded;
1044                    this is subject to change. (alias vsize).
1045

wchan WCHAN name of the kernel function in which the process is

1047                    sleeping, a "-" if the process is running, or a "*" if the
1048                    process is multi-threaded and ps is not displaying
1049                    threads.
1050

ENVIRONMENT VARIABLES

1052       The following environment variables could affect ps:
1053
1054       COLUMNS
1055          Override default display width.
1056
1057       LINES
1058          Override default display height.
1059
1060       PS_PERSONALITY
1061          Set to one of posix, old, linux, bsd, sun, digital...
1062          (see section PERSONALITY below).
1063
1064       CMD_ENV
1065          Set to one of posix, old, linux, bsd, sun, digital...
1066          (see section PERSONALITY below).
1067
1068       I_WANT_A_BROKEN_PS
1069          Force obsolete command line interpretation.
1070
1071       LC_TIME
1072          Date format.
1073
1074       PS_COLORS
1075          Not currently supported.
1076
1077       PS_FORMAT
1078          Default output format override. You may set this to a format string
1079          of the type used for the -o option. The DefSysV and DefBSD values
1080          are particularly useful.
1081
1082       PS_SYSMAP
1083          Default namelist (System.map) location.
1084
1085       PS_SYSTEM_MAP
1086          Default namelist (System.map) location.
1087
1088       POSIXLY_CORRECT
1089          Don't find excuses to ignore bad "features".
1090
1091       POSIX2
1092          When set to "on", acts as POSIXLY_CORRECT.
1093
1094       UNIX95
1095          Don't find excuses to ignore bad "features".
1096
1097       _XPG
1098          Cancel CMD_ENV=irix non-standard behavior.
1099
1100       In general, it is a bad idea to set these variables. The one exception
1101       is CMD_ENV or PS_PERSONALITY, which could be set to Linux for normal
1102       systems. Without that setting, ps follows the useless and bad parts of
1103       the Unix98 standard.
1104

PERSONALITY

1106       390        like the S/390 OpenEdition ps
1107       aix        like AIX ps
1108       bsd        like FreeBSD ps (totally non-standard)
1109       compaq     like Digital Unix ps
1110       debian     like the old Debian ps
1111       digital    like Tru64 (was Digital Unix, was OSF/1) ps
1112       gnu        like the old Debian ps
1113       hp         like HP-UX ps
1114       hpux       like HP-UX ps
1115       irix       like Irix ps
1116       linux      ***** RECOMMENDED *****
1117       old        like the original Linux ps (totally non-standard)
1118       os390      like OS/390 Open Edition ps
1119       posix      standard
1120       s390       like OS/390 Open Edition ps
1121       sco        like SCO ps
1122       sgi        like Irix ps
1123       solaris2   like Solaris 2+ (SunOS 5) ps
1124       sunos4     like SunOS 4 (Solaris 1) ps (totally non-standard)
1125       svr4       standard
1126       sysv       standard
1127       tru64      like Tru64 (was Digital Unix, was OSF/1) ps
1128       unix       standard
1129       unix95     standard
1130       unix98     standard
1131

SEE ALSO

1133       top(1), pgrep(1), pstree(1), proc(5).
1134

STANDARDS

1136       This ps conforms to:
1137
1138       1   Version 2 of the Single Unix Specification
1139       2   The Open Group Technical Standard Base Specifications, Issue 6
1140       3   IEEE Std 1003.1, 2004 Edition
1141       4   X/Open System Interfaces Extension [UP XSI]
1142       5   ISO/IEC 9945:2003
1143

AUTHOR

1145       ps was originally written by Branko Lankester <lankeste@fwi.uva.nl>.
1146       Michael K. Johnson <johnsonm@redhat.com> re-wrote it significantly to
1147       use the proc filesystem, changing a few things in the process. Michael
1148       Shields <mjshield@nyx.cs.du.edu> added the pid-list feature. Charles
1149       Blake <cblake@bbn.com> added multi-level sorting, the dirent-style
1150       library, the device name-to-number mmaped database, the approximate
1151       binary search directly on System.map, and many code and documentation
1152       cleanups. David Mossberger-Tang wrote the generic BFD support for
1153       psupdate. Albert Cahalan <albert@users.sf.net> rewrote ps for full
1154       Unix98 and BSD support, along with some ugly hacks for obsolete and
1155       foreign syntax.
1156
1157       Please send bug reports to <procps-feedback@lists.sf.net>.
1158       No subscription is required or suggested.
1159
1160
1161
1162Linux                            July 28, 2004                           PS(1)
Impressum