Updated with Tizen:Base source codes
[external/procps.git] / ps / ps.1
1 '\" t
2 .\" (The preceding line is a note to broken versions of man to tell
3 .\" Man page for ps.
4 .\" Quick hack conversion by Albert Cahalan, 1998.
5 .\" Licensed under version 2 of the Gnu General Public License.
6 .\"
7 .TH PS 1 "July 28, 2004" "Linux" "Linux User's Manual"
8 .\"
9 .\" To render this page:
10 .\"    groff -t -b -man -X -P-resolution -P100 -Tps ps.1 &
11 .\"    groff -t -b -man -X -TX100 ps.1 &
12 .\"    tbl ps.1 | troff -Ww -man -z
13 .\"    groff -t -man -Tps ps.1 | ps2pdf - - > ps.pdf
14 .\"
15 .\" The '70s called. They want their perfect justification,
16 .\" hyphenation, and double-spaced sentences back.
17 .na
18 .nh
19 .if n .ss 12 0
20 .\"
21 .\" See /usr/share/groff/current/tmac/an-old.tmac for what these do.
22 .\" Setting them to zero provides extra space, but only do that for
23 .\" plain text output. PostScript and such will remain indented.
24 .if n .nr IN 0n
25 .if n .nr an-prevailing-indent 0n
26 .\"
27 .\"
28 .\" ColSize is used for the format spec table.
29 .\" It's the left margin, minus the right, minus
30 .\" the space needed for the 1st two columns.
31 .\" Making it messy: inches, ens, points, scaled points...
32 .\"
33 .nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-20u)n)
34 .\"
35 .\" This is for command options
36 .nr OptSize (16u)
37 .\"
38 .\" l=\n(.l
39 .\" i=\n(.i
40 .\" o=\n(.o
41 .\" H=\n(.H
42 .\" s=\n(.s
43 .\" ColSize=\n[ColSize]
44 .\" 
45 .\" Macro for easy option formatting:   .opt \-x
46 .de opt              
47 .  TP \\n[OptSize]
48 .  BI \\$*
49 ..
50 .\"
51 .SH NAME
52 ps \- report a snapshot of the current processes.
53 .SH SYNOPSIS
54 \fBps\fR [\fIoptions\fR]
55 .PP
56 .PP
57 .SH DESCRIPTION
58 .B ps
59 displays information about a selection of the active processes.
60 If you want a repetitive update of the selection and the
61 displayed information, use\ \fItop\fR(1) instead.
62 .P
63 This version of \fBps\fR accepts several kinds of options:
64 .PD 0
65 .IP 1 4
66 UNIX options, which may be grouped and must be preceded by a dash.
67 .IP 2 4
68 BSD options, which may be grouped and must not be used with a dash.
69 .IP 3 4
70 GNU long options, which are preceded by two dashes.
71 .PD
72 .PP
73 Options of different types may be freely mixed, but conflicts can appear.
74 There are some synonymous options, which are functionally identical, due
75 to the many standards and \fBps\fR implementations that this \fBps\fR is
76 compatible with.
77 .P
78 Note that "\fBps\ \-aux\fR" is distinct from "\fBps\ aux\fR".
79 The POSIX and UNIX standards require that "\fBps\ \-aux\fR" print all
80 processes owned by a user named "x", as well as printing all processes
81 that would be selected by the \fB\-a\fR option. If the user named "x" does
82 not exist, this \fBps\fR may interpret the command as "\fBps\ aux\fR"
83 instead and print a warning. This behavior is intended to aid in
84 transitioning old scripts and habits. It is fragile, subject to change,
85 and thus should not be relied upon.
86 .P
87 By default, \fBps\fR selects all processes
88 with the same effective user ID (euid=EUID) as the current user
89 and
90 associated with the same terminal as the invoker.
91 It displays the process ID (pid=PID),
92 the terminal associated with the process (tname=TTY),
93 the cumulated CPU time in [dd\-]hh:mm:ss format (time=TIME),
94 and the executable name (ucmd=CMD).
95 Output is unsorted by default.
96 .P
97 The use of BSD\-style options will add process state (stat=STAT) to the
98 default display and show the command args (args=COMMAND) instead of the
99 executable name. You can override this with the \fBPS_FORMAT\fR
100 environment variable. The use of BSD\-style options will also change the
101 process selection to include processes on other terminals (TTYs) that
102 are owned by you; alternately, this may be described as setting the
103 selection to be the set of all processes filtered to exclude
104 processes owned by other users or not on a terminal. These effects
105 are not considered when options are described as being "identical" below,
106 so \fB\-M\fR will be considered identical to \fBZ\fR and so on.
107 .P
108 Except as described below, process selection options are additive.
109 The default selection is discarded, and then the selected processes
110 are added to the set of processes to be displayed.
111 A\ process will thus be shown if it meets any of the given
112 selection criteria.
113 .PP
114 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
115 .SH "EXAMPLES"
116 .TP 3
117 To see every process on the system using standard syntax:
118 .B ps\ \-e
119 .br
120 .B ps\ \-ef
121 .br
122 .B ps\ \-eF
123 .br
124 .B ps\ \-ely
125 .TP
126 To see every process on the system using BSD syntax:
127 .B ps\ ax
128 .br
129 .B ps\ axu
130 .TP
131 To print a process tree:
132 .B ps\ -ejH
133 .br
134 .B ps\ axjf
135 .TP
136 To get info about threads:
137 .B ps\ -eLf
138 .br
139 .B ps\ axms
140 .TP
141 To get security info:
142 .B ps\ -eo euser,ruser,suser,fuser,f,comm,label
143 .br
144 .B ps\ axZ
145 .br
146 .B ps\ -eM
147 .TP
148 To see every process running as root (real\ &\ effective\ ID) in user format:
149 .B ps\ \-U\ root\ \-u\ root\ u
150 .TP
151 To see every process with a user\-defined format:
152 .B ps\ \-eo\ pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
153 .br
154 .B ps\ axo\ stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
155 .br
156 .B ps\ \-eopid,tt,user,fname,tmout,f,wchan
157 .TP
158 Print only the process IDs of syslogd:
159 .B ps\ \-C\ syslogd\ \-o\ pid=
160 .TP
161 Print only the name of PID 42:
162 .B ps\ \-p\ 42\ \-o\ comm=
163 .PP
164 .PP
165 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
166 .SH "SIMPLE PROCESS SELECTION"
167 .opt \-A
168 Select all processes.  Identical to \fB\-e\fR.
169
170 .opt \-N
171 Select all processes except those that fulfill the specified conditions.
172 (negates the selection) Identical to \fB\-\-deselect\fR.
173
174 .opt T
175 Select all processes associated with this terminal.  Identical to the
176 \fBt\fR option without any argument.
177
178 .opt \-a
179 Select all processes except both session leaders (see \fIgetsid\fR(2)) and
180 processes not associated with a terminal.
181
182 .opt a
183 Lift the BSD\-style "only yourself" restriction, which is imposed upon
184 the set of all processes when some BSD\-style (without\ "\-") options
185 are used or when the \fBps\fR personality setting is BSD\-like.
186 The set of processes selected in this manner is
187 in addition to the set of processes selected by other means.
188 An alternate description is that this option causes \fBps\fR to
189 list all processes with a terminal (tty),
190 or to list all processes when used together with the \fBx\fR option.
191
192 .opt \-d
193 Select all processes except session leaders.
194
195 .opt \-e
196 Select all processes.  Identical to \fB\-A\fR.
197
198 .\" Current "g" behavior: add in the session leaders, which would
199 .\" be excluded in the sunos4 personality. Supposed "g" behavior:
200 .\" add in the group leaders -- at least according to the SunOS 4
201 .\" man page on the FreeBSD site. Uh oh. I think I had tested SunOS
202 .\" though, so maybe the code is correct.
203 .opt g
204 Really all, even session leaders.  This flag is obsolete and may be
205 discontinued in a future release. It is normally implied by the \fBa\fR flag,
206 and is only useful when operating in the sunos4 personality.
207
208 .opt r
209 Restrict the selection to only running processes.
210
211 .opt x
212 Lift the BSD\-style "must have a tty" restriction, which is imposed upon
213 the set of all processes when some BSD\-style (without\ "\-") options
214 are used or when the \fBps\fR personality setting is BSD\-like.
215 The set of processes selected in this manner is
216 in addition to the set of processes selected by other means.
217 An alternate description is that this option causes \fBps\fR to
218 list all processes owned by you (same EUID as \fBps\fR),
219 or to list all processes when used together with the \fBa\fR option.
220
221 .opt \-\-deselect
222 Select all processes except those that fulfill the specified conditions.
223 (negates the selection) Identical to \fB\-N\fR.
224
225 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
226 .PD
227 .PP
228 .SH "PROCESS SELECTION BY LIST"
229 These options accept a single argument in the form of a blank\-separated
230 or comma\-separated list.  They can be used multiple times.
231 For\ example:\ \fBps\ \-p\ "1\ 2"\ \-p\ 3,4\fR
232 .P
233 .opt \-C \ cmdlist
234 Select by command name.
235 .br
236 This selects the processes whose executable name is given in
237 \fIcmdlist\fR.
238
239 .opt \-G \ grplist
240 Select by real group ID (RGID) or name.
241 .br
242 This selects the processes whose real group name or ID is in the
243 \fIgrplist\fR list.  The real group ID identifies the group of the user
244 who created the process, see \fIgetgid\fR(2).
245
246 .opt U \ userlist
247 Select by effective user ID (EUID) or name.
248 .br
249 This selects the processes whose effective user name
250 or ID is in \fIuserlist\fR.
251 The effective user\ ID describes the user whose file
252 access permissions are used by the process
253 (see\ \fIgeteuid\fR(2)).
254 Identical to \fB\-u\fR and\ \fB\-\-user\fR.
255
256 .opt \-U \ userlist
257 select by real user ID (RUID) or name.
258 .br
259 It selects the processes whose real user name or ID is in the
260 \fIuserlist\fR list.
261 The real user ID identifies the user who created the process,
262 see\ \fIgetuid\fR(2).
263
264 .opt \-g \ grplist
265 Select by session OR by effective group name.
266 .br
267 Selection by session is specified by many standards,
268 but selection by effective group is the logical behavior that
269 several other operating systems use.
270 This \fBps\fR will select by session when the list
271 is completely numeric (as\ sessions\ are).
272 Group ID numbers will work only when some group names are also specified.
273 See the \fB\-s\fR and \fB\-\-group\fR options.
274
275 .opt p \ pidlist
276 Select by process ID.  Identical to \fB\-p\fR and\ \fB\-\-pid\fR.
277
278 .opt \-p \ pidlist
279 Select by PID.
280 .br
281 This selects the processes whose process ID numbers appear in
282 \fIpidlist\fR.  Identical to \fBp\fR and\ \fB\-\-pid\fR.
283
284 .opt \-s \ sesslist
285 Select by session ID.
286 .br
287 This selects the processes
288 with a session ID specified in\ \fIsesslist\fR.
289
290 .opt t \ ttylist
291 Select by tty.  Nearly identical to \fB\-t\fR and \fB\-\-tty\fR,
292 but can also be used with an empty \fIttylist\fR to indicate
293 the terminal associated with \fBps\fR.
294 Using the \fBT\fR option is considered cleaner than using \fBT\fR with
295 an\ empty\ \fIttylist\fR.
296
297 .opt \-t \ ttylist
298 Select by tty.
299 .br
300 This selects the processes associated with the terminals
301 given in \fIttylist\fR.
302 Terminals (ttys, or screens for text output) can be specified in several
303 forms: /dev/ttyS1, ttyS1, S1.
304 A\ plain "\-" may be used to select processes not attached to any terminal.
305
306 .opt \-u \ userlist
307 Select by effective user ID (EUID) or name.
308 .br
309 This selects the processes whose effective user name or ID is in
310 \fIuserlist\fR.  The effective user ID describes the user whose file
311 access permissions are used by the process (see\ \fIgeteuid\fR(2)).
312 Identical to \fBU\fR and \fB\-\-user\fR.
313
314 .opt \-\-Group \ grplist
315 Select by real group ID (RGID) or name.  Identical to \fB\-G\fR.
316
317 .opt \-\-User \ userlist
318 Select by real user ID (RUID) or name.  Identical to \fB\-U\fR.
319
320 .opt \-\-group \ grplist
321 Select by effective group ID (EGID) or name.
322 .br
323 This selects the processes whose effective group name or ID is in
324 \fIgrouplist\fR.  The effective group ID describes the group whose file
325 access permissions are used by the process (see\ \fIgeteuid\fR(2)).
326 The \fB\-g\fR option is often an alternative to\ \fB\-\-group\fR.
327
328 .opt \-\-pid \ pidlist
329 Select by process\ ID.  Identical to \fB\-p\fR\ and\ \fBp\fR.
330
331 .opt \-\-ppid \ pidlist
332 Select by parent process\ ID.
333 This selects the processes
334 with a parent\ process\ ID in \fRpidlist\fR.
335 That\ is, it selects processes that are children
336 of those listed in \fRpidlist\fR.
337
338 .opt \-\-sid \ sesslist
339 Select by session\ ID.  Identical to\ \fB\-s\fR.
340
341 .opt \-\-tty \ ttylist
342 Select by terminal.  Identical to \fB\-t\fR and\ \fBt\fR.
343
344 .opt \-\-user \ userlist
345 Select by effective user ID (EUID) or name.
346 Identical to \fB\-u\fR and\ \fBU\fR.
347
348 .opt \-\fI123\fR
349 Identical to \fB\-\-sid\ \fI123\fR.
350
351 .opt \fI123\fR
352 Identical to \fB\-\-pid\ \fI123\fR.
353
354 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
355 .PD
356 .PP
357 .SH "OUTPUT FORMAT CONTROL"
358 These options are used to choose the information displayed by \fBps\fR.
359 The output may differ by personality.
360 .PP
361
362 .opt \-F
363 extra full format. See the \fB\-f\fR option, which \fB\-F\fR implies.
364
365 .opt \-O \ format
366 is like \fB\-o\fR, but preloaded with some default columns.
367 Identical to \fB\-o\ pid,\fIformat\fB,state,tname,time,command\fR
368 or \fB\-o\ pid,\fIformat\fB,tname,time,cmd\fR, see\ \fB\-o\fR\ below.
369
370 .opt O \ format
371 is preloaded \fBo\fR (overloaded).
372 .br
373 The BSD \fBO\fR option can act like \fB\-O\fR (user\-defined output
374 format with some common fields predefined) or can be used to specify
375 sort order.  Heuristics are used to determine the behavior of this
376 option. To ensure that the desired behavior is obtained (sorting or
377 formatting), specify the option in some other way
378 (e.g. with \fB\-O\fR or \fB\-\-sort\fR).
379 When used as a formatting option, it is identical to \fB\-O\fR, with the
380 BSD\ personality.
381
382 .opt \-M
383 Add a column of security data. Identical to \fBZ\fR. (for\ SE\ Linux)
384
385 .opt X
386 Register format.
387
388 .opt Z
389 Add a column of security data. Identical to \fB\-M\fR. (for\ SE\ Linux)
390
391 .opt \-c
392 Show different scheduler information for the \fB\-l\fR option.
393
394 .opt \-f
395 does full\-format listing. This option can be combined with many
396 other UNIX\-style options to add additional columns. It also causes
397 the command arguments to be printed. When used with \fB\-L\fR, the
398 NLWP (number of threads) and LWP (thread ID) columns will be added.
399 See the \fBc\fR option, the format keyword \fBargs\fR, and the
400 format keyword \fBcomm\fR.
401
402 .opt j
403 BSD job control format.
404
405 .opt \-j
406 jobs format
407
408 .opt l
409 display BSD long format.
410
411 .opt \-l
412 long format. The \fB\-y\fR option is often useful with this.
413
414 .opt o \ format
415 specify user\-defined format.  Identical to \fB\-o\fR and
416 \fB\-\-format\fR.
417
418 .opt \-o \ format
419 user\-defined format.
420 .br
421 \fIformat\fR is a single argument in the form of a
422 blank\-separated or comma\-separated list, which offers
423 a way to specify individual output columns.
424 The recognized keywords are described in the \fBSTANDARD FORMAT
425 SPECIFIERS\fR section below.
426 Headers may be
427 renamed (\fBps\ \-o\ pid,ruser=RealUser\ \-o\ comm=Command\fR) as desired.
428 If all column headers are empty (\fBps\ \-o\ pid=\ \-o\ comm=\fR) then the
429 header line will not be output. Column width will increase as
430 needed for wide headers; this may be used to widen up columns
431 such as WCHAN (\fBps\ \-o\ pid,wchan=WIDE\-WCHAN\-COLUMN\ \-o\ comm\fR).
432 Explicit width control (\fBps\ opid,wchan:42,cmd\fR) is offered too.
433 The behavior of \fBps\ \-o\ pid=X,comm=Y\fR varies with personality;
434 output may be one column named "X,comm=Y" or two columns
435 named "X" and "Y". Use multiple \fB\-o\fR options when in doubt.
436 Use the \fBPS_FORMAT\fR environment variable to specify a default
437 as desired; DefSysV and DefBSD are macros that may be used to
438 choose the default UNIX or BSD columns.
439
440 .opt s
441 display signal format
442
443 .opt u
444 display user\-oriented format
445
446 .opt v
447 display virtual memory format
448
449 .opt \-y
450 Do not show flags; show rss in place of addr.
451 This option can only be used with \fB\-l\fR.
452
453 .opt \-\-format \ format
454 user\-defined format.  Identical to \fB\-o\fR and \fBo\fR.
455
456 .opt \-\-context
457 Display security context format. (for\ SE\ Linux)
458
459 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
460 .PD
461 .PP
462 .SH "OUTPUT MODIFIERS"
463
464 .\"  .TP
465 .\"  .B C
466 .\"  use raw CPU time for %CPU instead of decaying average
467
468 .opt \-H
469 show process hierarchy (forest)
470
471 .opt N \ namelist
472 Specify namelist file.  Identical to \fB\-n\fR, see \fB\-n\fR above.
473
474 .opt O \ order
475 Sorting order. (overloaded)
476 .br
477 The BSD \fBO\fR option can act like \fB\-O\fR (user\-defined output
478 format with some common fields predefined) or can be used to specify
479 sort order.  Heuristics are used to determine the behavior of this
480 option. To ensure that the desired behavior is obtained (sorting or
481 formatting), specify the option in some other way (e.g. with \fB\-O\fR
482 or \fB\-\-sort\fR).
483
484 For sorting, obsolete BSD \fBO\fR option syntax is
485 \fBO\fR[\fB+\fR|\fB\-\fR]\fIk1\fR[,[\fB+\fR|\fB\-\fR]\fIk2\fR[,...]].
486 It orders the processes listing according to the multilevel sort specified by
487 the sequence of one\-letter short keys \fIk1\fR, \fIk2\fR, ... described
488 in the \fBOBSOLETE SORT KEYS\fR section below.
489 The\ "+" is currently optional,
490 merely re\-iterating the default direction on a key,
491 but may help to distinguish an \fBO\fR sort from an \fBO\fR format.
492 The\ "\-" reverses direction only on the key it precedes.
493
494 .opt S
495 Sum up some information, such as CPU usage, from dead child processes
496 into their parent. This is useful for examining a system where a
497 parent process repeatedly forks off short\-lived children to do work.
498
499 .opt c
500 Show the true command name. This is derived from the name of the
501 executable file, rather than from the argv value. Command arguments
502 and any modifications to them (see\ \fIsetproctitle\fR(3)) are
503 thus not shown. This option
504 effectively turns the \fBargs\fR format keyword into the \fBcomm\fR
505 format keyword; it is useful with the \fB\-f\fR format option and with
506 the various BSD\-style format options, which all normally
507 display the command arguments.
508 See the \fB\-f\fR option, the format keyword \fBargs\fR, and the
509 format keyword \fBcomm\fR.
510
511 .opt e
512 Show the environment after the command.
513
514 .opt f
515 ASCII\-art process hierarchy (forest)
516
517 .opt h
518 No header. (or, one header per screen in the BSD personality)
519 .br
520 The \fBh\fR option is problematic.  Standard BSD \fBps\fR uses
521 this option to print a header on each page of output, but older
522 Linux \fBps\fR uses this option to totally disable the header.
523 This version of \fBps\fR follows the Linux usage of not printing
524 the header unless the BSD personality has been selected, in which
525 case it prints a header on each page of output. Regardless of the
526 current personality, you can use the long options \fB\-\-headers\fR
527 and \fB\-\-no\-headers\fR to enable printing headers each page or
528 disable headers entirely, respectively.
529
530 .opt k \ spec
531 specify sorting order. Sorting syntax is
532 [\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]]
533 Choose a multi\-letter key from the \fBSTANDARD FORMAT SPECIFIERS\fR section.
534 The\ "+" is optional since default direction is increasing numerical or
535 lexicographic order. Identical to \fB\-\-sort\fR. Examples:
536 .br
537 \fBps\ jaxkuid,\-ppid,+pid\fR
538 .br
539 \fBps\ axk\ comm\ o\ comm,args\fR
540 .br
541 \fBps\ kstart_time\ \-ef\fR
542
543 .opt \-n \ namelist
544 set namelist file.  Identical to \fBN\fR.
545 .br
546 The namelist file is needed for a proper WCHAN display, and must match
547 the current Linux kernel exactly for correct output.
548 Without this option, the default search path for the namelist is:
549
550         $PS_SYSMAP
551 .br
552         $PS_SYSTEM_MAP
553 .br
554         /proc/*/wchan
555 .br
556         /boot/System.map\-\`uname\ \-r\`
557 .br
558         /boot/System.map
559 .br
560         /lib/modules/\`uname\ \-r\`/System.map
561 .br
562         /usr/src/linux/System.map
563 .br
564         /System.map
565
566 .opt n
567 Numeric output for WCHAN and USER. (including all types of UID and GID)
568
569 .opt \-w
570 Wide output. Use this option twice for unlimited width.
571
572 .opt w
573 Wide output. Use this option twice for unlimited width.
574
575 .opt \-\-cols \ n
576 set screen width
577
578 .opt \-\-columns \ n
579 set screen width
580
581 .opt \-\-cumulative
582 include some dead child process data (as a sum with the parent)
583
584 .opt \-\-forest
585 ASCII art process tree
586
587 .opt \-\-headers
588 repeat header lines, one per page of output
589
590 .opt \-\-no\-headers
591 print no header line at all
592
593 .opt \-\-lines \ n
594 set screen height
595
596 .opt \-\-rows \ n
597 set screen height
598
599 .opt \-\-sort \ spec
600 specify sorting order. Sorting syntax is
601 [\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]]
602 Choose a multi\-letter key from the \fBSTANDARD FORMAT SPECIFIERS\fR section.
603 The\ "+" is optional since default direction is increasing numerical or
604 lexicographic order. Identical to\ \fBk\fR.
605 For example: \fBps\ jax\ \-\-sort=uid,\-ppid,+pid\fR
606
607 .opt \-\-width \ n
608 set screen width
609
610 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
611 .PD
612 .PP
613 .SH "THREAD DISPLAY"
614 .PD 0
615
616 .opt H
617 Show threads as if they were processes
618
619 .opt \-L
620 Show threads, possibly with LWP and NLWP columns
621
622 .opt \-T
623 Show threads, possibly with SPID column
624
625 .opt m
626 Show threads after processes
627
628 .opt \-m
629 Show threads after processes
630
631 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
632 .PD
633 .PP
634 .SH "OTHER INFORMATION"
635 .PD 0
636
637 .opt L
638 List all format specifiers.
639
640 .opt \-V
641 Print the procps version.
642
643 .opt V
644 Print the procps version.
645
646 .opt \-\-help
647 Print a help message.
648
649 .opt \-\-info
650 Print debugging info.
651
652 .opt \-\-version
653 Print the procps version.
654
655 .\" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
656 .PD
657 .PP
658 .SH NOTES
659 This \fBps\fR works by reading the virtual files in\ /proc.
660 This \fBps\fR does not need to be setuid kmem or have any privileges to run.
661 Do not give this \fBps\fR any special permissions.
662
663 This \fBps\fR needs access to namelist data for proper WCHAN display.
664 For kernels prior to 2.6, the System.map file must be installed.
665
666 CPU usage is currently expressed as the percentage of time spent
667 running during the entire lifetime of a process.
668 This is not ideal, and\ it does not conform to the
669 standards that \fBps\fR otherwise conforms\ to.
670 CPU\ usage is unlikely to add up to exactly\ 100%.
671
672 The SIZE and RSS fields don't count some parts of a process including the
673 page tables, kernel stack, struct thread_info, and struct task_struct.
674 This is usually at least 20\ KiB of memory that is always resident.
675 SIZE is the virtual size of the process (code+data+stack).
676
677 Processes marked <defunct> are dead processes (so\-called\ "zombies") that
678 remain because their parent has not destroyed them properly. These processes
679 will be destroyed by \fIinit\fR(8) if the parent process exits.
680
681
682 .SH "PROCESS FLAGS"
683 The sum of these values is displayed in the "F" column,
684 which is provided by the \fBflags\fR output specifier.
685 .PD 0
686 .TP 5
687 1
688 forked but didn't exec
689 .TP
690 4
691 used super\-user privileges
692 .PD
693 .PP
694 .SH "PROCESS STATE CODES"
695 Here are the different values that the \fBs\fR, \fBstat\fR and
696 \fBstate\fR output specifiers (header\ "STAT"\ or\ "S") will display to
697 describe the state of a process.
698 .PD 0
699 .TP 5
700 D
701 Uninterruptible sleep (usually\ IO)
702 .TP
703 R
704 Running or runnable (on\ run\ queue)
705 .TP
706 S
707 Interruptible sleep (waiting for an event to complete)
708 .TP
709 T
710 Stopped, either by a job control signal or because it is being traced.
711 .TP
712 W
713 paging (not valid since the 2.6.xx kernel)
714 .TP
715 X
716 dead (should never be seen)
717 .TP
718 Z
719 Defunct ("zombie") process, terminated but not reaped by its parent.
720 .PD
721 .PP
722 For BSD formats and when the \fBstat\fR keyword is used, additional
723 characters may be displayed:
724 .PD 0
725 .TP 5
726 <
727 high\-priority (not nice to other users)
728 .TP
729 N
730 low\-priority (nice to other users)
731 .TP
732 L
733 has pages locked into memory (for real\-time and custom\ IO)
734 .TP
735 s
736 is a session leader
737 .TP
738 l
739 is multi-threaded (using CLONE_THREAD, like NPTL pthreads\ do)
740 .TP
741 +
742 is in the foreground process group
743 .PD
744 .PP
745 .PP
746 .SH "OBSOLETE SORT KEYS"
747 These keys are used by the BSD \fBO\fR option (when it is used for
748 sorting).  The GNU \fB\-\-sort\fR option doesn't use these keys, but the
749 specifiers described below in the \fBSTANDARD FORMAT SPECIFIERS\fR
750 section. Note that the values used in sorting are the internal
751 values \fBps\fR uses and not the "cooked" values used in some of
752 the output format fields (e.g. sorting on tty will sort into
753 device number, not according to the terminal name displayed).
754 Pipe \fBps\fR output into the \fIsort\fR(1) command if you want
755 to sort the cooked values.
756
757 .TS
758 l l lw(3i).
759 \fBKEY  LONG    DESCRIPTION\fR
760 c       cmd     simple name of executable
761 C       pcpu    cpu utilization
762 f       flags   flags as in long format F field
763 g       pgrp    process group ID
764 G       tpgid   controlling tty process group ID
765 j       cutime  cumulative user time
766 J       cstime  cumulative system time
767 k       utime   user time
768 m       min_flt number of minor page faults
769 M       maj_flt number of major page faults
770 n       cmin_flt        cumulative minor page faults
771 N       cmaj_flt        cumulative major page faults
772 o       session session ID
773 p       pid     process ID
774 P       ppid    parent process ID
775 r       rss     resident set size
776 R       resident        resident pages
777 s       size    memory size in kilobytes
778 S       share   amount of shared pages
779 t       tty     the device number of the controlling tty
780 T       start_time      time process was started
781 U       uid     user ID number
782 u       user    user name
783 v       vsize   total VM size in kB
784 y       priority        kernel scheduling priority
785 .\"K    stime   system time (conflict, system vs. start time)
786 .TE
787 .PP
788 .PP
789 .SH "AIX FORMAT DESCRIPTORS"
790 This \fBps\fR supports AIX format descriptors, which work somewhat like the
791 formatting codes of \fIprintf\fR(1) and \fIprintf\fR(3). For example, the normal
792 default output can be produced with this:  \fBps\ \-eo\ "%p\ %y\ %x\ %c"\fR.
793 The\ \fBNORMAL\fR codes are described in the next section.
794 .TS
795 l l l.
796 \fBCODE NORMAL  HEADER\fR
797 %C      pcpu    %CPU
798 %G      group   GROUP
799 %P      ppid    PPID
800 %U      user    USER
801 %a      args    COMMAND
802 %c      comm    COMMAND
803 %g      rgroup  RGROUP
804 %n      nice    NI
805 %p      pid     PID
806 %r      pgid    PGID
807 %t      etime   ELAPSED
808 %u      ruser   RUSER
809 %x      time    TIME
810 %y      tty     TTY
811 %z      vsz     VSZ
812 .TE
813
814 .SH "STANDARD FORMAT SPECIFIERS"
815 Here are the different keywords that may be used to control the output
816 format (e.g. with option \fB\-o\fR) or to sort the selected processes
817 with the GNU\-style \fB\-\-sort\fR option.
818
819 For example:  \fBps\ \-eo\ pid,user,args\ \-\-sort\ user\fR
820
821 This version of \fBps\fR tries to recognize most of the keywords used in
822 other implementations of \fBps\fR.
823
824 The following user\-defined format specifiers may contain
825 spaces: \fBargs\fR, \fBcmd\fR, \fBcomm\fR, \fBcommand\fR, \fBfname\fR,
826 \fBucmd\fR, \fBucomm\fR,
827 \fBlstart\fR, \fBbsdstart\fR, \fBstart\fR.
828
829 Some keywords may not be available for sorting.
830
831 .\" #######################################################################
832 .\" lB1 lB1 lB1 lB1 s s s
833 .\" lB1 l1  l1  l1  s s s.
834 .\"
835 .\" lB1 lB1 lBw(5.5i)
836 .\" lB1 l1  l.
837 .\"
838 .TS
839 expand;
840 lB1 lB1 lBw(\n[ColSize]n)
841 lB1 l1  l.
842 CODE    HEADER  DESCRIPTION
843
844 %cpu    %CPU    T{
845 cpu utilization of the process in "##.#" format.  Currently, it is the CPU time
846 used divided by the time the process has been running (cputime/realtime
847 ratio), expressed as a percentage. It will not add up to 100% unless you
848 are lucky.  (alias\ \fBpcpu\fR).
849 T}
850
851 %mem    %MEM    T{
852 ratio of the process's resident set size  to the physical memory on
853 the machine, expressed as a percentage.  (alias\ \fBpmem\fR).
854 T}
855
856 args    COMMAND T{
857 command with all its arguments as a string. Modifications to the arguments
858 may be shown. The output in this column may contain spaces.
859 A\ process marked <defunct> is partly dead, waiting
860 to be fully destroyed by its parent. Sometimes the process args
861 will be unavailable; when this happens, \fBps\fR will instead
862 print the executable name in brackets.
863 (alias\ \fBcmd\fR,\ \fBcommand\fR). See also the \fBcomm\fR format
864 keyword, the \fB\-f\fR option, and the \fBc\fR option.
865 .br
866 When specified last, this column will extend to the edge of the display.
867 If \fBps\fR can not determine display width, as when output is redirected
868 (piped) into a file or another command, the output width is undefined.
869 (it may be 80, unlimited, determined by the \fBTERM\fR variable, and so on)
870 The \fBCOLUMNS\fR environment variable or \fB\-\-cols\fR option may
871 be used to exactly determine the width in this case.
872 The \fBw\fR or \fB\-w\fR option may be also be used to adjust width.
873 T}
874
875 blocked BLOCKED T{
876 mask of the blocked signals, see \fIsignal\fR(7).
877 According to the width of the field,
878 a\ 32\-bit or 64\-bit mask in hexadecimal format is displayed.
879 (alias\ \fBsig_block\fR,\ \fBsigmask\fR).
880 T}
881
882 bsdstart        START   T{
883 time the command started.  If the process was started less
884 than 24 hours ago, the output format is "\ HH:MM",
885 else it is "mmm\ dd"
886 (where mmm is the three letters of the month).
887 See also \fBlstart\fR, \fBstart\fR, \fBstart_time\fR, and \fBstime\fR.
888 T}
889
890 bsdtime TIME    T{
891 accumulated cpu time, user\ +\ system.  The display format is usually
892 "MMM:SS", but can be shifted to the right if the process used more than 999
893 minutes of cpu time.
894 T}
895
896 c       C       T{
897 processor utilization. Currently, this is the integer value of
898 the percent usage over the lifetime of the process.  (see\ \fB%cpu\fR).
899 T}
900
901 caught  CAUGHT  T{
902 mask of the caught signals, see \fIsignal\fR(7).  According to the
903 width of the field, a 32 or 64 bits mask in hexadecimal format is
904 displayed.  (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR).
905 T}
906
907 class   CLS     T{
908 scheduling class of the process.  (alias\ \fBpolicy\fR,\ \fBcls\fR).
909 Field's possible values are:
910 .br
911 \-      not reported
912 .br
913 TS      SCHED_OTHER
914 .br
915 FF      SCHED_FIFO
916 .br
917 RR      SCHED_RR
918 .br
919 B       SCHED_BATCH
920 .br
921 ISO     SCHED_ISO
922 .br
923 IDL     SCHED_IDLE
924 .br
925 ?       unknown value
926 T}
927
928 cls     CLS     T{
929 scheduling class of the process.  (alias\ \fBpolicy\fR,\ \fBclass\fR).
930 Field's possible values are:
931 .br
932 \-      not reported
933 .br
934 TS      SCHED_OTHER
935 .br
936 FF      SCHED_FIFO
937 .br
938 RR      SCHED_RR
939 .br
940 B       SCHED_BATCH
941 .br
942 ISO     SCHED_ISO
943 .br
944 IDL     SCHED_IDLE
945 .br
946 ?       unknown value
947 T}
948
949 cmd     CMD     T{
950 see \fBargs\fR.  (alias\ \fBargs\fR,\ \fBcommand\fR).
951 T}
952
953 comm    COMMAND T{
954 command name (only\ the executable\ name).  Modifications to the command
955 name will not be shown. A\ process marked <defunct> is partly dead, waiting
956 to be fully destroyed by its parent. The output in this
957 column may contain spaces.  (alias\ \fBucmd\fR,\ \fBucomm\fR).
958 See also the \fBargs\fR format
959 keyword, the \fB\-f\fR option, and the \fBc\fR option.
960 .br
961 When specified last, this column will extend to the edge of the display.
962 If \fBps\fR can not determine display width, as when output is redirected
963 (piped) into a file or another command, the output width is undefined.
964 (it may be 80, unlimited, determined by the \fBTERM\fR variable, and so on)
965 The \fBCOLUMNS\fR environment variable or \fB\-\-cols\fR option may
966 be used to exactly determine the width in this case.
967 The \fBw\fR or \fB\-w\fR option may be also be used to adjust width.
968 T}
969
970 command COMMAND T{
971 see \fBargs\fR.  (alias\ \fBargs\fR,\ \fBcmd\fR).
972 T}
973
974 cp      CP      T{
975 per\-mill (tenths of a percent) CPU usage.  (see\ \fB%cpu\fR).
976 T}
977
978 cputime TIME    T{
979 cumulative CPU time, "[dd\-]hh:mm:ss" format.  (alias\ \fBtime\fR).
980 T}
981
982 egid    EGID    T{
983 effective group ID number of the process as a decimal integer.
984 (alias\ \fBgid\fR).
985 T}
986
987 egroup  EGROUP  T{
988 effective group ID of the process.  This will be the textual group ID,
989 if it can be obtained and the field width permits, or a decimal
990 representation otherwise.  (alias\ \fBgroup\fR).
991 T}
992
993 eip     EIP     T{
994 instruction pointer.
995 T}
996
997 esp     ESP     T{
998 stack pointer.
999 T}
1000
1001 etime   ELAPSED T{
1002 elapsed time since the process was started,
1003 in\ the form\ [[dd\-]hh:]mm:ss.
1004 T}
1005
1006 euid    EUID    T{
1007 effective user\ ID. (alias\ \fBuid\fR).
1008 T}
1009
1010 euser   EUSER   T{
1011 effective user\ name.  This will be the textual
1012 user\ ID, if\ it can be obtained and the field width permits,
1013 or\ a\ decimal representation otherwise.
1014 The\ \fBn\fR\ option can be used
1015 to force the decimal representation.
1016 (alias\ \fBuname\fR,\ \fBuser\fR).
1017 T}
1018
1019 f       F       T{
1020 flags associated with the process, see the \fBPROCESS FLAGS\fR section.
1021 (alias\ \fBflag\fR,\ \fBflags\fR).
1022 T}
1023
1024 fgid    FGID    T{
1025 filesystem access group\ ID.  (alias\ \fBfsgid\fR).
1026 T}
1027
1028 fgroup  FGROUP  T{
1029 filesystem access group\ ID.
1030 This will be the textual user\ ID, if\ it can be obtained
1031 and the field width permits,
1032 or\ a\ decimal representation otherwise.
1033 (alias\ \fBfsgroup\fR).
1034 T}
1035
1036 flag    F       T{
1037 see\ \fBf\fR.  (alias\ \fBf\fR,\ \fBflags\fR).
1038 T}
1039
1040 flags   F       T{
1041 see\ \fBf\fR.  (alias\ \fBf\fR,\ \fBflag\fR).
1042 T}
1043
1044 fname   COMMAND T{
1045 first 8 bytes of the base name of the process's executable file.
1046 The output in this column may contain spaces.
1047 T}
1048
1049 fuid    FUID    T{
1050 filesystem access user\ ID.  (alias\ \fBfsuid\fR).
1051 T}
1052
1053 fuser   FUSER   T{
1054 filesystem access user\ ID.  This will be the textual user\ ID,
1055 if\ it can be obtained and the field width permits,
1056 or\ a\ decimal representation otherwise.
1057 T}
1058
1059 gid     GID     T{
1060 see\ \fBegid\fR.  (alias\ \fBegid\fR).
1061 T}
1062
1063 group   GROUP   T{
1064 see\ \fBegroup\fR.  (alias\ \fBegroup\fR).
1065 T}
1066
1067 ignored IGNORED T{
1068 mask of the ignored signals, see \fIsignal\fR(7).  According to the
1069 width of the field, a\ 32\-bit or 64\-bit mask in hexadecimal format
1070 is displayed.  (alias \fBsig_ignore\fR, \fBsigignore\fR).
1071 T}
1072
1073 label   LABEL   T{
1074 security label, most commonly used for SE\ Linux context data.
1075 This is for the \fIMandatory Access Control\fR ("MAC") found on
1076 high\-security systems.
1077 T}
1078
1079 lstart  STARTED T{
1080 time the command started.
1081 See also \fBbsdstart\fR, \fBstart\fR, \fBstart_time\fR, and \fBstime\fR.
1082 T}
1083
1084 lwp     LWP     T{
1085 lwp (light weight process, or thread) ID of the lwp being reported.
1086 (alias\ \fBspid\fR,\ \fBtid\fR).
1087 T}
1088
1089 ni      NI      T{
1090 nice value. This ranges from 19 (nicest) to \-20 (not\ nice to\ others),
1091 see\ \fInice\fR(1).  (alias\ \fBnice\fR).
1092 T}
1093
1094 nice    NI      T{
1095 see\ \fBni\fR.  (alias\ \fBni\fR).
1096 T}
1097
1098 nlwp    NLWP    T{
1099 number of lwps (threads) in the process.  (alias\ \fBthcount\fR).
1100 T}
1101
1102 nwchan  WCHAN   T{
1103 address of the kernel function where the process is sleeping
1104 (use \fBwchan\fR if you want the kernel function name).
1105 Running tasks will display a dash ('\-') in this column.
1106 T}
1107
1108 pcpu    %CPU    T{
1109 see\ \fB%cpu\fR.  (alias\ \fB%cpu\fR).
1110 T}
1111
1112 pending PENDING T{
1113 mask of the pending signals. See\ \fIsignal\fR(7).  Signals pending on
1114 the process are distinct from signals pending on individual threads.
1115 Use the \fBm\fR option or the \fB\-m\fR option to see both.
1116 According to the width of the field, a\ 32\-bit or 64\-bit mask in
1117 hexadecimal format is displayed.  (alias\ \fBsig\fR).
1118 T}
1119
1120 pgid    PGID    T{
1121 process group\ ID or, equivalently, the process\ ID of the
1122 process group leader.  (alias\ \fBpgrp\fR).
1123 T}
1124
1125 pgrp    PGRP    T{
1126 see\ \fBpgid\fR.  (alias\ \fBpgid\fR).
1127 T}
1128
1129 pid     PID     T{
1130 process\ ID number of the process.
1131 T}
1132
1133 pmem    %MEM    T{
1134 see\ \fB%mem\fR.  (alias\ \fB%mem\fR).
1135 T}
1136
1137 policy  POL     T{
1138 scheduling class of the process.  (alias\ \fBclass\fR,\ \fBcls\fR).
1139 Possible values are:
1140 .br
1141 \-      not reported
1142 .br
1143 TS      SCHED_OTHER
1144 .br
1145 FF      SCHED_FIFO
1146 .br
1147 RR      SCHED_RR
1148 .br
1149 B       SCHED_BATCH
1150 .br
1151 ISO     SCHED_ISO
1152 .br
1153 IDL     SCHED_IDLE
1154 .br
1155 ?       unknown value
1156 T}
1157
1158 ppid    PPID    T{
1159 parent process ID.
1160 T}
1161
1162 psr     PSR     T{
1163 processor that process is currently assigned to.
1164 T}
1165
1166 rgid    RGID    T{
1167 real group ID.
1168 T}
1169
1170 rgroup  RGROUP  T{
1171 real group name.  This will be the textual group\ ID, if\ it can be
1172 obtained and the field width permits,
1173 or\ a\ decimal representation otherwise.
1174 T}
1175
1176 rss     RSS     T{
1177 resident set size, the non\-swapped physical memory that
1178 a task has used (in\ kiloBytes).
1179 (alias\ \fBrssize\fR,\ \fBrsz\fR).
1180 T}
1181
1182 rssize  RSS     T{
1183 see\ \fBrss\fR.  (alias\ \fBrss\fR,\ \fBrsz\fR).
1184 T}
1185
1186 rsz     RSZ     T{
1187 see\ \fBrss\fR.  (alias\ \fBrss\fR,\ \fBrssize\fR).
1188 T}
1189
1190 rtprio  RTPRIO  T{
1191 realtime priority.
1192 T}
1193
1194 ruid    RUID    T{
1195 real user\ ID.
1196 T}
1197
1198 ruser   RUSER   T{
1199 real user\ ID.  This will be the textual user\ ID,
1200 if\ it can be obtained and the field width permits,
1201 or\ a\ decimal representation otherwise.
1202 T}
1203
1204 s       S       T{
1205 minimal state display (one\ character).
1206 See\ section \fBPROCESS STATE CODES\fR for the different values.
1207 See\ also \fBstat\fR if you want additional
1208 information displayed.  (alias\ \fBstate\fR).
1209 T}
1210
1211 sched   SCH     T{
1212 scheduling policy of the process.  The policies SCHED_OTHER (SCHED_NORMAL),
1213 SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, and SCHED_IDLE are respectively
1214 displayed as 0,\ 1,\ 2,\ 3,\ 4,\ and\ 5.
1215 T}
1216
1217 sess    SESS    T{
1218 session\ ID or, equivalently, the process\ ID of the session\ leader.
1219 (alias\ \fBsession\fR,\ \fBsid\fR).
1220 T}
1221
1222 sgi_p   P       T{
1223 processor that the process is currently executing on.
1224 Displays "*" if the process is not currently running or runnable.
1225 T}
1226
1227 sgid    SGID    T{
1228 saved group\ ID.
1229 (alias\ \fBsvgid\fR).
1230 T}
1231
1232 sgroup  SGROUP  T{
1233 saved group\ name.  This will be the textual group\ ID,
1234 if\ it can be obtained and the field width permits,
1235 or\ a\ decimal representation otherwise.
1236 T}
1237
1238 sid     SID     T{
1239 see\ \fBsess\fR.  (alias\ \fBsess\fR,\ \fBsession\fR).
1240 T}
1241
1242 sig     PENDING T{
1243 see\ \fBpending\fR.  (alias\ \fBpending\fR,\ \fBsig_pend\fR).
1244 T}
1245
1246 sigcatch        CAUGHT  T{
1247 see\ \fBcaught\fR.  (alias\ \fBcaught\fR,\ \fBsig_catch\fR).
1248 T}
1249
1250 sigignore       IGNORED T{
1251 see\ \fBignored\fR.  (alias\ \fBignored\fR,\ \fBsig_ignore\fR).
1252 T}
1253
1254 sigmask BLOCKED T{
1255 see\ \fBblocked\fR.  (alias\ \fBblocked\fR,\ \fBsig_block\fR).
1256 T}
1257
1258 size    SZ      T{
1259 approximate amount of swap space that would be required
1260 if the process were to dirty all writable pages and then
1261 be swapped out.
1262 This number is very\ rough!
1263 T}
1264
1265 spid    SPID    T{
1266 see \fBlwp\fR.  (alias\ \fBlwp\fR,\ \fBtid\fR).
1267 T}
1268
1269 stackp  STACKP  T{
1270 address of the bottom (start) of stack for the process.
1271 T}
1272
1273 start   STARTED T{
1274 time the command started.
1275 If the process was started less than 24 hours ago,
1276 the output format is "HH:MM:SS",
1277 else it is "\ \ mmm\ dd"
1278 (where mmm is a three\-letter month\ name).
1279 See also \fBlstart\fR, \fBbsdstart\fR, \fBstart_time\fR, and \fBstime\fR.
1280 T}
1281
1282 start_time      START   T{
1283 starting time or date of the process.
1284 Only the year will be displayed if the process was not
1285 started the same year \fBps\fR was invoked,
1286 or\ "mmmdd" if\ it was not started the same day,
1287 or\ "HH:MM" otherwise.
1288 See also \fBbsdstart\fR, \fBstart\fR, \fBlstart\fR, and \fBstime\fR.
1289 T}
1290
1291 stat    STAT    T{
1292 multi\-character process state.
1293 See\ section \fBPROCESS STATE CODES\fR
1294 for the different values meaning.
1295 See also \fBs\fR and \fBstate\fR if you just want
1296 the first character displayed.
1297 T}
1298
1299 state   S       T{
1300 see\ \fBs\fR.  (alias\ \fBs\fR).
1301 T}
1302
1303 suid    SUID    T{
1304 saved user\ ID.  (alias\ \fBsvuid\fR).
1305 T}
1306
1307 suser   SUSER   T{
1308 saved user name.  This will be the textual user\ ID,
1309 if\ it can be obtained and the field width permits,
1310 or\ a\ decimal representation otherwise.
1311 (alias\ \fBsvuser\fR).
1312 T}
1313
1314 svgid   SVGID   T{
1315 see\ \fBsgid\fR.  (alias\ \fBsgid\fR).
1316 T}
1317
1318 svuid   SVUID   T{
1319 see\ \fBsuid\fR.  (alias\ \fBsuid\fR).
1320 T}
1321
1322 sz      SZ      T{
1323 size in physical pages of the core image of the process.
1324 This includes text, data, and stack space.
1325 Device mappings are currently excluded; this is subject to change.
1326 See \fBvsz\fR and \fBrss\fR.
1327 T}
1328
1329 thcount THCNT   T{
1330 see \fBnlwp\fR.  (alias\ \fBnlwp\fR).
1331 number of kernel threads owned by the process.
1332 T}
1333
1334 tid     TID     T{
1335 see\ \fBlwp\fR.  (alias\ \fBlwp\fR).
1336 T}
1337
1338 time    TIME    T{
1339 cumulative CPU\ time, "[dd\-]hh:mm:ss" format.  (alias\ \fBcputime\fR).
1340 T}
1341
1342 tname   TTY     T{
1343 controlling tty (terminal).
1344 (alias\ \fBtt\fR,\ \fBtty\fR).
1345 T}
1346
1347 tpgid   TPGID   T{
1348 ID of the foreground process group on the tty (terminal) that
1349 the process is connected to, or \-1 if the process is not connected
1350 to a tty.
1351 T}
1352
1353 tt      TT      T{
1354 controlling tty (terminal).  (alias\ \fBtname\fR,\ \fBtty\fR).
1355 T}
1356
1357 tty     TT      T{
1358 controlling tty (terminal).  (alias\ \fBtname\fR,\ \fBtt\fR).
1359 T}
1360
1361 ucmd    CMD     T{
1362 see \fBcomm\fR.  (alias\ \fBcomm\fR,\ \fBucomm\fR).
1363 T}
1364
1365 ucomm   COMMAND T{
1366 see \fBcomm\fR.  (alias\ \fBcomm\fR,\ \fBucmd\fR).
1367 T}
1368
1369 uid     UID     T{
1370 see \fBeuid\fR.  (alias\ \fBeuid\fR).
1371 T}
1372
1373 uname   USER    T{
1374 see \fBeuser\fR.  (alias\ \fBeuser\fR,\ \fBuser\fR).
1375 T}
1376
1377 user    USER    T{
1378 see \fBeuser\fR.  (alias\ \fBeuser\fR,\ \fBuname\fR).
1379 T}
1380
1381 vsize   VSZ     T{
1382 see \fBvsz\fR.  (alias\ \fBvsz\fR).
1383 T}
1384
1385 vsz     VSZ     T{
1386 virtual memory size of the process in KiB (1024\-byte\ units).
1387 Device mappings are currently excluded; this is subject to change.
1388 (alias\ \fBvsize\fR).
1389 T}
1390
1391 wchan   WCHAN   T{
1392 name of the kernel function in which the process is sleeping,
1393 a\ "\-"\ if the process is running,
1394 or a "*"\ if the process is multi\-threaded and
1395 \fBps\fR is not displaying threads.
1396 T}
1397 .TE
1398 .\" #######################################################################
1399 .PP
1400 .PP
1401 .SH "ENVIRONMENT VARIABLES"
1402 The following environment variables could affect \fBps\fR:
1403 .TP 3
1404 .B COLUMNS
1405 Override default display width.
1406 .TP
1407 .B LINES
1408 Override default display height.
1409 .TP
1410 .B PS_PERSONALITY
1411 Set to one of posix, old, linux, bsd, sun, digital...
1412 (see\ section\ \fBPERSONALITY\fR\ below).
1413 .TP
1414 .B CMD_ENV
1415 Set to one of posix, old, linux, bsd, sun, digital...
1416 (see\ section\ \fBPERSONALITY\fR\ below).
1417 .TP
1418 .B I_WANT_A_BROKEN_PS
1419 Force obsolete command line interpretation.
1420 .TP
1421 .B LC_TIME
1422 Date format.
1423 .TP
1424 .B PS_COLORS
1425 Not currently supported.
1426 .TP
1427 .B PS_FORMAT
1428 Default output format override. You may set this to a format
1429 string of the type used for the \fB\-o\fR option.
1430 The \fBDefSysV\fR and \fBDefBSD\fR values are particularly useful.
1431 .TP
1432 .B PS_SYSMAP
1433 Default namelist (System.map) location.
1434 .TP
1435 .B PS_SYSTEM_MAP
1436 Default namelist (System.map) location.
1437 .TP
1438 .B POSIXLY_CORRECT
1439 Don't find excuses to ignore bad "features".
1440 .TP
1441 .B POSIX2
1442 When set to "on", acts as \fBPOSIXLY_CORRECT\fR.
1443 .TP
1444 .B UNIX95
1445 Don't find excuses to ignore bad "features".
1446 .TP
1447 .B _XPG
1448 Cancel \fBCMD_ENV\fI=irix\fR non\-standard behavior.
1449 .PP
1450 In general, it\ is a bad idea to set these variables.
1451 The one exception is \fBCMD_ENV\fR or \fBPS_PERSONALITY\fR,
1452 which could be set to Linux for normal systems.
1453 Without that setting,
1454 \fBps\fR follows the useless and bad parts of the Unix98 standard.
1455 .PP
1456 .PP
1457 .SH "PERSONALITY"
1458 .TS
1459 l       l.
1460 390     like the S/390 OpenEdition \fBps\fR
1461 aix     like AIX \fBps\fR
1462 bsd     like FreeBSD \fBps\fR (totally\ non\-standard)
1463 compaq  like Digital Unix \fBps\fR
1464 debian  like the old Debian \fBps\fR
1465 digital like Tru64 (was Digital\ Unix, was OSF/1) \fBps\fR
1466 gnu     like the old Debian \fBps\fR
1467 hp      like HP\-UX \fBps\fR
1468 hpux    like HP\-UX \fBps\fR
1469 irix    like Irix \fBps\fR
1470 linux   ***** RECOMMENDED *****
1471 old     like the original Linux \fBps\fR (totally\ non\-standard)
1472 os390   like OS/390 Open Edition \fBps\fR
1473 posix   standard
1474 s390    like OS/390 Open Edition \fBps\fR
1475 sco     like SCO \fBps\fR
1476 sgi     like Irix \fBps\fR
1477 solaris2        like Solaris 2+ (SunOS 5) \fBps\fR
1478 sunos4  like SunOS 4 (Solaris 1) \fBps\fR (totally\ non\-standard)
1479 svr4    standard
1480 sysv    standard
1481 tru64   like Tru64 (was Digital\ Unix, was OSF/1) \fBps\fR
1482 unix    standard
1483 unix95  standard
1484 unix98  standard
1485 .TE
1486 .PP
1487 .PP
1488 .SH "SEE ALSO"
1489 \fItop\fR(1), \fIpgrep\fR(1), \fIpstree\fR(1), \fIproc\fR(5).
1490 .PP
1491 .PP
1492 .SH STANDARDS
1493 This \fBps\fR conforms to:
1494 .PP
1495 .PD 0
1496 .IP 1 4
1497 Version 2 of the Single Unix Specification
1498 .IP 2 4
1499 The Open Group Technical Standard Base Specifications, Issue\ 6
1500 .IP 3 4
1501 IEEE Std 1003.1, 2004\ Edition
1502 .IP 4 4
1503 X/Open System Interfaces Extension [UP\ XSI]
1504 .IP 5 4
1505 ISO/IEC 9945:2003
1506 .PD
1507 .PP
1508 .SH AUTHOR
1509 \fBps\fR was originally written by Branko Lankester <lankeste@fwi.uva.nl>. Michael
1510 K. Johnson <johnsonm@redhat.com> re\-wrote it significantly to use the proc
1511 filesystem, changing a few things in the process. Michael Shields
1512 <mjshield@nyx.cs.du.edu> added the pid\-list feature. Charles Blake
1513 <cblake@bbn.com> added multi\-level sorting, the dirent\-style library, the
1514 device name\-to\-number mmaped database, the approximate binary search
1515 directly on System.map, and many code and documentation cleanups. David
1516 Mossberger\-Tang wrote the generic BFD support for psupdate. Albert Cahalan
1517 <albert@users.sf.net> rewrote ps for full Unix98 and BSD support, along with
1518 some ugly hacks for obsolete and foreign syntax.
1519
1520 Please send bug reports to <procps\-feedback@lists.sf.net>.
1521 No\ subscription is required or suggested.