~ubuntu-branches/ubuntu/intrepid/procps/intrepid-security

« back to all changes in this revision

Viewing changes to ps/ps.1

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2004-12-08 10:45:17 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041208104517-dddigjyt093j9ql6
Tags: 1:3.2.4-1ubuntu1
Resynchronise with Debian.

Show diffs side-by-side

added added

removed removed

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