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 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
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 See also lstart, start, start_time, and stime.
713
715 usually "MMM:SS", but can be shifted to the right if the
716 process used more than 999 minutes of cpu time.
717
719 value of the percent usage over the lifetime of the
720 process. (see %cpu).
721
723 the width of the field, a 32 or 64 bits mask in
724 hexadecimal format is displayed.
725 (alias sig_catch, sigcatch).
726
728
729 class CLS T{ scheduling class of the process.
730 (alias policy, cls). Field's possible values are:
731 - not reported
732 TS SCHED_OTHER
733 FF SCHED_FIFO
734 RR SCHED_RR
735 B SCHED_BATCH
736 ISO SCHED_ISO
737 IDL SCHED_IDLE
738 ? unknown value
739
740
741
742
743
744
745
747 Field's possible values are:
748 - not reported
749 TS SCHED_OTHER
750 FF SCHED_FIFO
751 RR SCHED_RR
752 B SCHED_BATCH
753 ISO SCHED_ISO
754 IDL SCHED_IDLE
755 ? unknown value
756
758
760 the command name will not be shown. A process marked
761 <defunct> is partly dead, waiting to be fully destroyed by
762 its parent. The output in this column may contain spaces.
763 (alias ucmd, ucomm). See also the args format keyword, the
764 -f option, and the c option.
765 When specified last, this column will extend to the edge
766 of the display. If ps can not determine display width, as
767 when output is redirected (piped) into a file or another
768 command, the output width is undefined. (it may be 80,
769 unlimited, determined by the TERM variable, and so on) The
770 COLUMNS environment variable or --cols option may be used
771 to exactly determine the width in this case. The w or -w
772 option may be also be used to adjust width.
773
775
777
779
781 integer. (alias gid).
782
784 textual group ID, if it can be obtained and the field
785 width permits, or a decimal representation otherwise.
786 (alias group).
787
789
791
793 form [[dd-]hh:]mm:ss.
794
796
798 if it can be obtained and the field width permits,
799 or a decimal representation otherwise. The n option can be
800 used to force the decimal representation.
801 (alias uname, user).
802
804 section. (alias flag, flags).
805
807
809 user ID, if it can be obtained and the field width
810 permits, or a decimal representation otherwise.
811 (alias fsgroup).
812
814
815
817
819 file. The output in this column may contain spaces.
820
822
824 user ID, if it can be obtained and the field width
825 permits, or a decimal representation otherwise.
826
828
830
832 the width of the field, a 32-bit or 64-bit mask in
833 hexadecimal format is displayed. (alias sig_ignore,
834 sigignore).
835
837 data. This is for the Mandatory Access Control ("MAC")
838 found on high-security systems.
839
841 start_time, and stime.
842
844 reported. (alias spid, tid).
845
847 to others), see nice(1). (alias nice).
848
850
852
854 sleeping (use wchan if you want the kernel function name).
855 Running tasks will display a dash ('-') in this column.
856
858
860 pending on the process are distinct from signals pending
861 on individual threads. Use the m option or the -m option
862 to see both. According to the width of the field, a 32-bit
863 or 64-bit mask in hexadecimal format is displayed.
864 (alias sig).
865
867 process group leader. (alias pgrp).
868
870
872
874
875
876
877
878
879
880
881
882
883
885 Possible values are:
886 - not reported
887 TS SCHED_OTHER
888 FF SCHED_FIFO
889 RR SCHED_RR
890 B SCHED_BATCH
891 ISO SCHED_ISO
892 IDL SCHED_IDLE
893 ? unknown value
894
896
898
900
902 can be obtained and the field width permits, or a decimal
903 representation otherwise.
904
906
908
910 task has used (in kiloBytes). (alias rssize, rsz).
911
913
915
917
919
921 be obtained and the field width permits, or a decimal
922 representation otherwise.
923
925 STATE CODES for the different values. See also stat if you
926 want additional information displayed. (alias state).
927
929 (SCHED_NORMAL), SCHED_FIFO, SCHED_RR, SCHED_BATCH,
930 SCHED_ISO, and SCHED_IDLE are respectively displayed as
931 0, 1, 2, 3, 4, and 5.
932
934 session leader. (alias session, sid).
935
937 Displays "*" if the process is not currently running or
938 runnable.
939
941
943 can be obtained and the field width permits, or a decimal
944 representation otherwise.
945
947
949
951
952
954
956
958 the process were to dirty all writable pages and then be
959 swapped out. This number is very rough!
960
962
964
966 than 24 hours ago, the output format is "HH:MM:SS", else
967 it is " mmm dd" (where mmm is a three-letter month name).
968 See also lstart, bsdstart, start_time, and stime.
969
971 be displayed if the process was not started the same year
972 ps was invoked, or "mmmdd" if it was not started the same
973 day, or "HH:MM" otherwise. See also bsdstart, start,
974 lstart, and stime.
975
977 CODES for the different values meaning. See also s and
978 state if you just want the first character displayed.
979
981
983
985 can be obtained and the field width permits, or a decimal
986 representation otherwise. (alias svuser).
987
989
991
993 This includes text, data, and stack space. Device mappings
994 are currently excluded; this is subject to change. See vsz
995 and rss.
996
998 the process.
999
1001
1003 (alias cputime).
1004
1006
1008 that the process is connected to, or -1 if the process is
1009 not connected to a tty.
1010
1012
1014
1016
1018
1020
1021
1023
1025
1027
1029 (1024-byte units). Device mappings are currently excluded;
1030 this is subject to change. (alias vsize).
1031
1033 sleeping, a "-" if the process is running, or a "*" if the
1034 process is multi-threaded and ps is not displaying
1035 threads.
1036
1038 The following environment variables could affect ps:
1039
1040 COLUMNS
1041 Override default display width.
1042
1043 LINES
1044 Override default display height.
1045
1046 PS_PERSONALITY
1047 Set to one of posix, old, linux, bsd, sun, digital...
1048 (see section PERSONALITY below).
1049
1050 CMD_ENV
1051 Set to one of posix, old, linux, bsd, sun, digital...
1052 (see section PERSONALITY below).
1053
1054 I_WANT_A_BROKEN_PS
1055 Force obsolete command line interpretation.
1056
1057 LC_TIME
1058 Date format.
1059
1060 PS_COLORS
1061 Not currently supported.
1062
1063 PS_FORMAT
1064 Default output format override. You may set this to a format string
1065 of the type used for the -o option. The DefSysV and DefBSD values
1066 are particularly useful.
1067
1068 PS_SYSMAP
1069 Default namelist (System.map) location.
1070
1071 PS_SYSTEM_MAP
1072 Default namelist (System.map) location.
1073
1074 POSIXLY_CORRECT
1075 Don't find excuses to ignore bad "features".
1076
1077 POSIX2
1078 When set to "on", acts as POSIXLY_CORRECT.
1079
1080 UNIX95
1081 Don't find excuses to ignore bad "features".
1082
1083 _XPG
1084 Cancel CMD_ENV=irix non-standard behavior.
1085
1086 In general, it is a bad idea to set these variables. The one exception
1087 is CMD_ENV or PS_PERSONALITY, which could be set to Linux for normal
1088 systems. Without that setting, ps follows the useless and bad parts of
1089 the Unix98 standard.
1090
1092 390 like the S/390 OpenEdition ps
1093 aix like AIX ps
1094 bsd like FreeBSD ps (totally non-standard)
1095 compaq like Digital Unix ps
1096 debian like the old Debian ps
1097 digital like Tru64 (was Digital Unix, was OSF/1) ps
1098 gnu like the old Debian ps
1099 hp like HP-UX ps
1100 hpux like HP-UX ps
1101 irix like Irix ps
1102 linux ***** RECOMMENDED *****
1103 old like the original Linux ps (totally non-standard)
1104 os390 like OS/390 Open Edition ps
1105 posix standard
1106 s390 like OS/390 Open Edition ps
1107 sco like SCO ps
1108 sgi like Irix ps
1109 solaris2 like Solaris 2+ (SunOS 5) ps
1110 sunos4 like SunOS 4 (Solaris 1) ps (totally non-standard)
1111 svr4 standard
1112 sysv standard
1113 tru64 like Tru64 (was Digital Unix, was OSF/1) ps
1114 unix standard
1115 unix95 standard
1116 unix98 standard
1117
1119 top(1), pgrep(1), pstree(1), proc(5).
1120
1122 This ps conforms to:
1123
1124 1 Version 2 of the Single Unix Specification
1125 2 The Open Group Technical Standard Base Specifications, Issue 6
1126 3 IEEE Std 1003.1, 2004 Edition
1127 4 X/Open System Interfaces Extension [UP XSI]
1128 5 ISO/IEC 9945:2003
1129
1131 ps was originally written by Branko Lankester <lankeste@fwi.uva.nl>.
1132 Michael K. Johnson <johnsonm@redhat.com> re-wrote it significantly to
1133 use the proc filesystem, changing a few things in the process. Michael
1134 Shields <mjshield@nyx.cs.du.edu> added the pid-list feature. Charles
1135 Blake <cblake@bbn.com> added multi-level sorting, the dirent-style
1136 library, the device name-to-number mmaped database, the approximate
1137 binary search directly on System.map, and many code and documentation
1138 cleanups. David Mossberger-Tang wrote the generic BFD support for
1139 psupdate. Albert Cahalan <albert@users.sf.net> rewrote ps for full
1140 Unix98 and BSD support, along with some ugly hacks for obsolete and
1141 foreign syntax.
1142
1143 Please send bug reports to <procps-feedback@lists.sf.net>.
1144 No subscription is required or suggested.
1145
1146
1147
1148Linux July 28, 2004 PS(1)