1PS(1) Linux User's Manual PS(1)
2
3
4
6 ps - report a snapshot of the current processes.
7
9 ps [options]
10
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
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 -p 42 -o comm=
95
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 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
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 -s sesslist Select by session ID.
205 This selects the processes with a session ID specified
206 in sesslist.
207
208
209 t ttylist Select by tty. Nearly identical to -t and --tty, but
210 can also be used with an empty ttylist to indicate the
211 terminal associated with ps. Using the T option is
212 considered cleaner than using T with an empty ttylist.
213
214
215 -t ttylist Select by tty.
216 This selects the processes associated with the
217 terminals given in ttylist. Terminals (ttys, or screens
218 for text output) can be specified in several forms:
219 /dev/ttyS1, ttyS1, S1. A plain "-" may be used to
220 select processes not attached to any terminal.
221
222
223 -u userlist Select by effective user ID (EUID) or name.
224 This selects the processes whose effective user name or
225 ID is in userlist. The effective user ID describes the
226 user whose file access permissions are used by the
227 process (see geteuid(2)). Identical to U and --user.
228
229
230 --Group grplist Select by real group ID (RGID) or name. Identical to
231 -G.
232
233
234 --User userlist Select by real user ID (RUID) or name. Identical to -U.
235
236
237 --group grplist Select by effective group ID (EGID) or name.
238 This selects the processes whose effective group name
239 or ID is in grouplist. The effective group ID describes
240 the group whose file access permissions are used by the
241 process (see geteuid(2)). The -g option is often an
242 alternative to --group.
243
244
245 --pid pidlist Select by process ID. Identical to -p and p.
246
247
248 --ppid pidlist Select by parent process ID. This selects the processes
249 with a parent process ID in pidlist. That is, it
250 selects processes that are children of those listed in
251 pidlist.
252
253
254 --sid sesslist Select by session ID. Identical to -s.
255
256
257 --tty ttylist Select by terminal. Identical to -t and t.
258
259
260 --user userlist Select by effective user ID (EUID) or name. Identical
261 to -u and U.
262
263
264 -123 Identical to --sid 123.
265
266
267 123 Identical to --pid 123.
268
269
271 These options are used to choose the information displayed by ps. The
272 output may differ by personality.
273
274 -F extra full format. See the -f option, which -F implies.
275
276
277 -O format is like -o, but preloaded with some default columns.
278 Identical to -o pid,format,state,tname,time,command or
279 -o pid,format,tname,time,cmd, see -o below.
280
281
282 O format is preloaded o (overloaded).
283 The BSD O option can act like -O (user-defined output
284 format with some common fields predefined) or can be
285 used to specify sort order. Heuristics are used to
286 determine the behavior of this option. To ensure that
287 the desired behavior is obtained (sorting or
288 formatting), specify the option in some other way (e.g.
289 with -O or --sort). When used as a formatting option,
290 it is identical to -O, with the BSD personality.
291
292
293 -M Add a column of security data. Identical to Z.
294 (for SE Linux)
295
296
297 X Register format.
298
299
300 Z Add a column of security data. Identical to -M.
301 (for SE Linux)
302
303
304 -c Show different scheduler information for the -l option.
305
306
307 -f does full-format listing. This option can be combined
308 with many other UNIX-style options to add additional
309 columns. It also causes the command arguments to be
310 printed. When used with -L, the NLWP (number of
311 threads) and LWP (thread ID) columns will be added. See
312 the c option, the format keyword args, and the format
313 keyword comm.
314
315
316 j BSD job control format.
317
318
319 -j jobs format
320
321
322 l display BSD long format.
323
324
325 -l long format. The -y option is often useful with this.
326
327
328 o format specify user-defined format. Identical to -o and
329 --format.
330
331
332 -o format user-defined format.
333 format is a single argument in the form of a
334 blank-separated or comma-separated list, which offers a
335 way to specify individual output columns. The
336 recognized keywords are described in the STANDARD
337 FORMAT SPECIFIERS section below. Headers may be renamed
338 (ps -o pid,ruser=RealUser -o comm=Command) as desired.
339 If all column headers are empty (ps -o pid= -o comm=)
340 then the header line will not be output. Column width
341 will increase as needed for wide headers; this may be
342 used to widen up columns such as WCHAN
343 (ps -o pid,wchan=WIDE-WCHAN-COLUMN -o comm). Explicit
344 width control (ps opid,wchan:42,cmd) is offered too.
345 The behavior of ps -o pid=X,comm=Y varies with
346 personality; output may be one column named "X,comm=Y"
347 or two columns named "X" and "Y". Use multiple -o
348 options when in doubt. Use the PS_FORMAT environment
349 variable to specify a default as desired; DefSysV and
350 DefBSD are macros that may be used to choose the
351 default UNIX or BSD columns.
352
353
354 s display signal format
355
356
357 u display user-oriented format
358
359
360 v display virtual memory format
361
362
363 -y Do not show flags; show rss in place of addr. This
364 option can only be used with -l.
365
366
367 -Z display security context format (SELinux, etc.)
368
369
370 --format format user-defined format. Identical to -o and o.
371
372
373 --context Display security context format. (for SE Linux)
374
375
377 -H show process hierarchy (forest)
378
379
380 N namelist Specify namelist file. Identical to -n, see -n above.
381
382
383 O order Sorting order. (overloaded)
384 The BSD O option can act like -O (user-defined output
385 format with some common fields predefined) or can be
386 used to specify sort order. Heuristics are used to
387 determine the behavior of this option. To ensure that
388 the desired behavior is obtained (sorting or
389 formatting), specify the option in some other way (e.g.
390 with -O or --sort).
391
392 For sorting, obsolete BSD O option syntax is
393 O[+|-]k1[,[+|-]k2[,...]]. It orders the processes
394 listing according to the multilevel sort specified by
395 the sequence of one-letter short keys k1, k2, ...
396 described in the OBSOLETE SORT KEYS section below.
397 The "+" is currently optional, merely re-iterating the
398 default direction on a key, but may help to distinguish
399 an O sort from an O format. The "-" reverses direction
400 only on the key it precedes.
401
402
403 S Sum up some information, such as CPU usage, from dead
404 child processes into their parent. This is useful for
405 examining a system where a parent process repeatedly
406 forks off short-lived children to do work.
407
408
409 c Show the true command name. This is derived from the
410 name of the executable file, rather than from the argv
411 value. Command arguments and any modifications to them
412 (see setproctitle(3)) are thus not shown. This option
413 effectively turns the args format keyword into the comm
414 format keyword; it is useful with the -f format option
415 and with the various BSD-style format options, which
416 all normally display the command arguments. See the -f
417 option, the format keyword args, and the format keyword
418 comm.
419
420
421 e Show the environment after the command.
422
423
424 f ASCII-art process hierarchy (forest)
425
426
427 h No header. (or, one header per screen in the BSD
428 personality)
429 The h option is problematic. Standard BSD ps uses this
430 option to print a header on each page of output, but
431 older Linux ps uses this option to totally disable the
432 header. This version of ps follows the Linux usage of
433 not printing the header unless the BSD personality has
434 been selected, in which case it prints a header on each
435 page of output. Regardless of the current personality,
436 you can use the long options --headers and --no-headers
437 to enable printing headers each page or disable headers
438 entirely, respectively.
439
440
441 k spec specify sorting order. Sorting syntax is
442 [+|-]key[,[+|-]key[,...]] Choose a multi-letter key
443 from the STANDARD FORMAT SPECIFIERS section. The "+" is
444 optional since default direction is increasing
445 numerical or lexicographic order. Identical to --sort.
446 Examples:
447 ps jaxkuid,-ppid,+pid
448 ps axk comm o comm,args
449 ps kstart_time -ef
450
451
452 -n namelist set namelist file. Identical to N.
453 The namelist file is needed for a proper WCHAN display,
454 and must match the current Linux kernel exactly for
455 correct output. Without this option, the default search
456 path for the namelist is:
457
458 $PS_SYSMAP
459 $PS_SYSTEM_MAP
460 /proc/*/wchan
461 /boot/System.map-`uname -r`
462 /boot/System.map
463 /lib/modules/`uname -r`/System.map
464 /usr/src/linux/System.map
465 /System.map
466
467
468 n Numeric output for WCHAN and USER. (including all types
469 of UID and GID)
470
471
472 -w Wide output. Use this option twice for unlimited width.
473
474
475 w Wide output. Use this option twice for unlimited width.
476
477
478 --cols n set screen width
479
480
481 --columns n set screen width
482
483
484 --cumulative include some dead child process data (as a sum with the
485 parent)
486
487
488 --forest ASCII art process tree
489
490
491 --headers repeat header lines, one per page of output
492
493
494 --no-headers print no header line at all
495
496
497 --lines n set screen height
498
499
500 --rows n set screen height
501
502
503 --sort spec specify sorting order. Sorting syntax is
504 [+|-]key[,[+|-]key[,...]] Choose a multi-letter key
505 from the STANDARD FORMAT SPECIFIERS section. The "+" is
506 optional since default direction is increasing
507 numerical or lexicographic order. Identical to k. For
508 example: ps jax --sort=uid,-ppid,+pid
509
510
511 --width n set screen width
512
513
515 H Show threads as if they were processes
516
517 -L Show threads, possibly with LWP and NLWP columns
518
519 -T Show threads, possibly with SPID column
520
521 m Show threads after processes
522
523 -m Show threads after processes
524
525
527 L List all format specifiers.
528
529 -V Print the procps version.
530
531 V Print the procps version.
532
533 --help Print a help message.
534
535 --info Print debugging info.
536
537 --version Print the procps version.
538
539
541 This ps works by reading the virtual files in /proc. This ps does not
542 need to be setuid kmem or have any privileges to run. Do not give this
543 ps any special permissions.
544
545 This ps needs access to namelist data for proper WCHAN display. For
546 kernels prior to 2.6, the System.map file must be installed.
547
548 CPU usage is currently expressed as the percentage of time spent
549 running during the entire lifetime of a process. This is not ideal,
550 and it does not conform to the standards that ps otherwise conforms to.
551 CPU usage is unlikely to add up to exactly 100%.
552
553 The SIZE and RSS fields don't count some parts of a process including
554 the page tables, kernel stack, struct thread_info, and struct
555 task_struct. This is usually at least 20 KiB of memory that is always
556 resident. SIZE is the virtual size of the process (code+data+stack).
557
558 Processes marked <defunct> are dead processes (so-called "zombies")
559 that remain because their parent has not destroyed them properly. These
560 processes will be destroyed by init(8) if the parent process exits.
561
562
563
565 The sum of these values is displayed in the "F" column, which is
566 provided by the flags output specifier.
567 1 forked but didn't exec
568 4 used super-user privileges
569
571 Here are the different values that the s, stat and state output
572 specifiers (header "STAT" or "S") will display to describe the state of
573 a process.
574 D Uninterruptible sleep (usually IO)
575 R Running or runnable (on run queue)
576 S Interruptible sleep (waiting for an event to complete)
577 T Stopped, either by a job control signal or because it is being
578 traced.
579 W paging (not valid since the 2.6.xx kernel)
580 X dead (should never be seen)
581 Z Defunct ("zombie") process, terminated but not reaped by its
582 parent.
583
584 For BSD formats and when the stat keyword is used, additional
585 characters may be displayed:
586 < high-priority (not nice to other users)
587 N low-priority (nice to other users)
588 L has pages locked into memory (for real-time and custom IO)
589 s is a session leader
590 l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
591 + is in the foreground process group
592
594 These keys are used by the BSD O option (when it is used for sorting).
595 The GNU --sort option doesn't use these keys, but the specifiers
596 described below in the STANDARD FORMAT SPECIFIERS section. Note that
597 the values used in sorting are the internal values ps uses and not the
598 "cooked" values used in some of the output format fields (e.g. sorting
599 on tty will sort into device number, not according to the terminal name
600 displayed). Pipe ps output into the sort(1) command if you want to sort
601 the cooked values.
602
603
604 KEY LONG DESCRIPTION
605 c cmd simple name of executable
606 C pcpu cpu utilization
607
608 f flags flags as in long format F field
609 g pgrp process group ID
610 G tpgid controlling tty process group ID
611 j cutime cumulative user time
612 J cstime cumulative system time
613 k utime user time
614 m min_flt number of minor page faults
615 M maj_flt number of major page faults
616 n cmin_flt cumulative minor page faults
617 N cmaj_flt cumulative major page faults
618 o session session ID
619 p pid process ID
620 P ppid parent process ID
621 r rss resident set size
622 R resident resident pages
623 s size memory size in kilobytes
624 S share amount of shared pages
625 t tty the device number of the controlling tty
626 T start_time time process was started
627 U uid user ID number
628 u user user name
629 v vsize total VM size in kB
630 y priority kernel scheduling priority
631
633 This ps supports AIX format descriptors, which work somewhat like the
634 formatting codes of printf(1) and printf(3). For example, the normal
635 default output can be produced with this: ps -eo "%p %y %x %c".
636 The NORMAL codes are described in the next section.
637
638 CODE NORMAL HEADER
639 %C pcpu %CPU
640 %G group GROUP
641 %P ppid PPID
642 %U user USER
643 %a args COMMAND
644 %c comm COMMAND
645 %g rgroup RGROUP
646 %n nice NI
647 %p pid PID
648 %r pgid PGID
649 %t etime ELAPSED
650 %u ruser RUSER
651 %x time TIME
652 %y tty TTY
653 %z vsz VSZ
654
655
657 Here are the different keywords that may be used to control the output
658 format (e.g. with option -o) or to sort the selected processes with the
659 GNU-style --sort option.
660
661 For example: ps -eo pid,user,args --sort user
662
663 This version of ps tries to recognize most of the keywords used in
664 other implementations of ps.
665
666 The following user-defined format specifiers may contain spaces: args,
667 cmd, comm, command, fname, ucmd, ucomm, lstart, bsdstart, start.
668
669 Some keywords may not be available for sorting.
670
671
672
674
675
676
678 Currently, it is the CPU time used divided by the time the
679 process has been running (cputime/realtime ratio),
680 expressed as a percentage. It will not add up to 100%
681 unless you are lucky. (alias pcpu).
682
684 memory on the machine, expressed as a percentage.
685 (alias pmem).
686
688 to the arguments may be shown. The output in this column
689 may contain spaces. A process marked <defunct> is partly
690 dead, waiting to be fully destroyed by its parent.
691 Sometimes the process args will be unavailable; when this
692 happens, ps will instead print the executable name in
693 brackets. (alias cmd, command). See also the comm format
694 keyword, the -f option, and the c option.
695 When specified last, this column will extend to the edge
696 of the display. If ps can not determine display width, as
697 when output is redirected (piped) into a file or another
698 command, the output width is undefined. (it may be 80,
699 unlimited, determined by the TERM variable, and so on) The
700 COLUMNS environment variable or --cols option may be used
701 to exactly determine the width in this case. The w or -w
702 option may be also be used to adjust width.
703
705 the width of the field, a 32-bit or 64-bit mask in
706 hexadecimal format is displayed.
707 (alias sig_block, sigmask).
708
710 than 24 hours ago, the output format is " HH:MM", else it
711 is "mmm dd" (where mmm is the three letters of the month).
712
714 usually "MMM:SS", but can be shifted to the right if the
715 process used more than 999 minutes of cpu time.
716
718 value of the percent usage over the lifetime of the
719 process. (see %cpu).
720
722 the width of the field, a 32 or 64 bits mask in
723 hexadecimal format is displayed.
724 (alias sig_catch, sigcatch).
725
727 Field's possible values are:
728 - not reported
729 TS SCHED_OTHER
730 FF SCHED_FIFO
731 RR SCHED_RR
732 ? unknown value
733
735 Field's possible values are:
736 - not reported
737 TS SCHED_OTHER
738 FF SCHED_FIFO
739 RR SCHED_RR
740 ? unknown value
741
743
744
745
747 the command name will not be shown. A process marked
748 <defunct> is partly dead, waiting to be fully destroyed by
749 its parent. The output in this column may contain spaces.
750 (alias ucmd, ucomm). See also the args format keyword, the
751 -f option, and the c option.
752 When specified last, this column will extend to the edge
753 of the display. If ps can not determine display width, as
754 when output is redirected (piped) into a file or another
755 command, the output width is undefined. (it may be 80,
756 unlimited, determined by the TERM variable, and so on) The
757 COLUMNS environment variable or --cols option may be used
758 to exactly determine the width in this case. The w or -w
759 option may be also be used to adjust width.
760
762
764
766
768 integer. (alias gid).
769
771 textual group ID, if it can be obtained and the field
772 width permits, or a decimal representation otherwise.
773 (alias group).
774
776
778
780 form [[dd-]hh:]mm:ss.
781
783
785 if it can be obtained and the field width permits,
786 or a decimal representation otherwise. The n option can be
787 used to force the decimal representation.
788 (alias uname, user).
789
791 section. (alias flag, flags).
792
794
796 user ID, if it can be obtained and the field width
797 permits, or a decimal representation otherwise.
798 (alias fsgroup).
799
801
803
805 file. The output in this column may contain spaces.
806
808
810 user ID, if it can be obtained and the field width
811 permits, or a decimal representation otherwise.
812
814
815
817
819 the width of the field, a 32-bit or 64-bit mask in
820 hexadecimal format is displayed. (alias sig_ignore,
821 sigignore).
822
824 data. This is for the Mandatory Access Control ("MAC")
825 found on high-security systems.
826
828
830 reported. (alias spid, tid).
831
833 to others), see nice(1). (alias nice).
834
836
838
840 sleeping (use wchan if you want the kernel function name).
841 Running tasks will display a dash ('-') in this column.
842
844
846 pending on the process are distinct from signals pending
847 on individual threads. Use the m option or the -m option
848 to see both. According to the width of the field, a 32-bit
849 or 64-bit mask in hexadecimal format is displayed.
850 (alias sig).
851
853 process group leader. (alias pgrp).
854
856
858
860
862 Possible values are:
863 - not reported
864 TS SCHED_OTHER
865 FF SCHED_FIFO
866 RR SCHED_RR
867 ? unknown value
868
870
872
874
876 can be obtained and the field width permits, or a decimal
877 representation otherwise.
878
880
882
883
885 task has used (in kiloBytes). (alias rssize, rsz).
886
888
890
892
894
896 be obtained and the field width permits, or a decimal
897 representation otherwise.
898
900 STATE CODES for the different values. See also stat if you
901 want additional information displayed. (alias state).
902
904 sched_other, sched_fifo, and sched_rr are respectively
905 displayed as 0, 1, and 2.
906
908 session leader. (alias session, sid).
909
911 Displays "*" if the process is not currently running or
912 runnable.
913
915
917 can be obtained and the field width permits, or a decimal
918 representation otherwise.
919
921
923
925
927
929
931 the process were to dirty all writable pages and then be
932 swapped out. This number is very rough!
933
935
937
939 than 24 hours ago, the output format is "HH:MM:SS", else
940 it is " mmm dd" (where mmm is a three-letter month name).
941
943 be displayed if the process was not started the same year
944 ps was invoked, or "mmmdd" if it was not started the same
945 day, or "HH:MM" otherwise.
946
948 CODES for the different values meaning. See also s and
949 state if you just want the first character displayed.
950
952
953
955
957 can be obtained and the field width permits, or a decimal
958 representation otherwise. (alias svuser).
959
961
963
965 This includes text, data, and stack space. Device mappings
966 are currently excluded; this is subject to change. See vsz
967 and rss.
968
970 the process.
971
973
975 (alias cputime).
976
978
980 that the process is connected to, or -1 if the process is
981 not connected to a tty.
982
984
986
988
990
992
994
996
998
1000 (1024-byte units). Device mappings are currently excluded;
1001 this is subject to change. (alias vsize).
1002
1004 sleeping, a "-" if the process is running, or a "*" if the
1005 process is multi-threaded and ps is not displaying
1006 threads.
1007
1009 The following environment variables could affect ps:
1010
1011 COLUMNS
1012 Override default display width.
1013
1014 LINES
1015 Override default display height.
1016
1017 PS_PERSONALITY
1018 Set to one of posix, old, linux, bsd, sun, digital...
1019 (see section PERSONALITY below).
1020
1021 CMD_ENV
1022 Set to one of posix, old, linux, bsd, sun, digital...
1023 (see section PERSONALITY below).
1024
1025 I_WANT_A_BROKEN_PS
1026 Force obsolete command line interpretation.
1027
1028 LC_TIME
1029 Date format.
1030
1031 PS_COLORS
1032 Not currently supported.
1033
1034 PS_FORMAT
1035 Default output format override. You may set this to a format string
1036 of the type used for the -o option. The DefSysV and DefBSD values
1037 are particularly useful.
1038
1039 PS_SYSMAP
1040 Default namelist (System.map) location.
1041
1042 PS_SYSTEM_MAP
1043 Default namelist (System.map) location.
1044
1045 POSIXLY_CORRECT
1046 Don't find excuses to ignore bad "features".
1047
1048 POSIX2
1049 When set to "on", acts as POSIXLY_CORRECT.
1050
1051 UNIX95
1052 Don't find excuses to ignore bad "features".
1053
1054 _XPG
1055 Cancel CMD_ENV=irix non-standard behavior.
1056
1057 In general, it is a bad idea to set these variables. The one exception
1058 is CMD_ENV or PS_PERSONALITY, which could be set to Linux for normal
1059 systems. Without that setting, ps follows the useless and bad parts of
1060 the Unix98 standard.
1061
1063 390 like the S/390 OpenEdition ps
1064 aix like AIX ps
1065 bsd like FreeBSD ps (totally non-standard)
1066 compaq like Digital Unix ps
1067 debian like the old Debian ps
1068 digital like Tru64 (was Digital Unix, was OSF/1) ps
1069 gnu like the old Debian ps
1070 hp like HP-UX ps
1071 hpux like HP-UX ps
1072 irix like Irix ps
1073 linux ***** RECOMMENDED *****
1074 old like the original Linux ps (totally non-standard)
1075 os390 like OS/390 Open Edition ps
1076 posix standard
1077 s390 like OS/390 Open Edition ps
1078 sco like SCO ps
1079 sgi like Irix ps
1080 solaris2 like Solaris 2+ (SunOS 5) ps
1081 sunos4 like SunOS 4 (Solaris 1) ps (totally non-standard)
1082 svr4 standard
1083 sysv standard
1084 tru64 like Tru64 (was Digital Unix, was OSF/1) ps
1085 unix standard
1086 unix95 standard
1087 unix98 standard
1088
1090 top(1), pgrep(1), pstree(1), proc(5).
1091
1093 This ps conforms to:
1094
1095 1 Version 2 of the Single Unix Specification
1096 2 The Open Group Technical Standard Base Specifications, Issue 6
1097 3 IEEE Std 1003.1, 2004 Edition
1098 4 X/Open System Interfaces Extension [UP XSI]
1099 5 ISO/IEC 9945:2003
1100
1102 ps was originally written by Branko Lankester <lankeste@fwi.uva.nl>.
1103 Michael K. Johnson <johnsonm@redhat.com> re-wrote it significantly to
1104 use the proc filesystem, changing a few things in the process. Michael
1105 Shields <mjshield@nyx.cs.du.edu> added the pid-list feature. Charles
1106 Blake <cblake@bbn.com> added multi-level sorting, the dirent-style
1107 library, the device name-to-number mmaped database, the approximate
1108 binary search directly on System.map, and many code and documentation
1109 cleanups. David Mossberger-Tang wrote the generic BFD support for
1110 psupdate. Albert Cahalan <albert@users.sf.net> rewrote ps for full
1111 Unix98 and BSD support, along with some ugly hacks for obsolete and
1112 foreign syntax.
1113
1114 Please send bug reports to <procps-feedback@lists.sf.net>.
1115 No subscription is required or suggested.
1116
1117
1118
1119Linux July 28, 2004 PS(1)