Penguin
Annotated edit history of oldps(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 PS
2 !!!PS
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 COMMAND-LINE OPTIONS
7 LONG COMMAND-LINE OPTIONS
8 SORT KEYS
9 FIELD DESCRIPTIONS
10 UPDATING
11 NOTES
12 AUTHOR
13 ----
14 !!NAME
15
16
17 ps - report process status
18 !!SYNOPSIS
19
20
21 ps [[__lujsvmaxScewhrnu__] [[__t__''xx'']
22 [[__O__[[__+__|__-__]''k1''[[[[__+__|__-__]''k2''...]]
23 [[''pids'']
24
25
26 there are also three long options:
27
28
29 __--sort__''X''[[__+__|__-__]''key''[[,[[__+__|__-__]''key''[[,__...__]]
30
31
32 __--help__
33
34
35 __--version__
36
37
38 More long options are on the way...
39 !!DESCRIPTION
40
41
42 __ps__ gives a snapshot of the current processes. If you
43 want a repetitive update of this status, use __top__.
44 This man page documents the ''/proc''-based version of
45 __ps__, or tries to.
46 !!COMMAND-LINE OPTIONS
47
48
49 The command-line options for this version of __ps__ are
50 derived from the BSD version of __ps__, not the System V
51 version.
52
53
54 The command-line arguments should __not__ be preceeded by
55 a `-' character, because in the future, a `-' will be used
56 to indicate Unix98-standard command-line arguments, while no
57 `-' will indicate the current ``extended BSD'' style of
58 command line arguments.
59
60
61 For now, ps will give you a warning if you use a `-' for a
62 short option, but it will still work. If you have shell
63 scripts which use BSD-style arguments to ps, take heed of
64 the warning and fix them, or else your scripts will fail to
65 function correctly at some point in the future. If you want
66 to turn off the warnings, set the __I_WANT_A_BROKEN_PS__
67 environment variable.
68
69
70 There are also some ``long options'' in GNU style; see below
71 for those.
72
73
74 __l__
75
76
77 long format
78
79
80 __u__
81
82
83 user format: gives user name and start time
84
85
86 __j__
87
88
89 jobs format: pgid sid
90
91
92 __s__
93
94
95 signal format
96
97
98 __v__
99
100
101 vm format
102
103
104 __m__
105
106
107 displays memory info (combine with __p__ flag to get
108 number of pages).
109
110
111 __f__
112
113
114
115
116 __a__
117
118
119 show processes of other users too
120
121
122 __x__
123
124
125 show processes without controlling terminal
126
127
128 __S__
129
130
131 add child cpu time and page faults
132
133
134 __c__
135
136
137 command name from task_struct
138
139
140 __e__
141
142
143 show environment after command line and ` + '
144
145
146 __w__
147
148
149 wide output: don't truncate command lines to fit on one
150 line. To be exact, every w that is specified will add
151 another possible line to the output. If the space isn't
152 needed it isn't used. You may up to 100
153 __w__'s.
154
155
156 __h__
157
158
159 no header
160
161
162 __r__
163
164
165 running procs only
166
167
168 __n__
169
170
171 numeric output for __USER__ and
172 __WCHAN__.
173
174
175 __t__''xx''
176
177
178 only procs with controlling tty ''xx''; for ''xx'' you
179 may use either the name of a device file under
180 ''tty'' or
181 ''cu'' sliced off. This is the reverse heuristic that ps
182 uses to print out the abbreviated tty name in the __TT__
183 field, e.g. __ps t1__.
184
185
186 __O__[[__+__|__-__]''k1''[[,[[__+__|__-__]''k2''[[,__...__]]
187
188
189 Order the process listing according to the multi-level sort
190 specified by the sequence of ''short'' keys from __SORT
191 KEYS__, ''k1'', ''k2'', ... Default order
192 specifications exist for each of the various formats of
193 __ps__. These are over-ridden by a user specified
194 ordering. The `+' is quite optional, merely re-iterating the
195 default direction on a key. `-' reverses direction only on
196 the key it precedes. As with __t__ and ''pids'', the O
197 option must be the last option in a single command argument,
198 but specifications in successive arguments are
199 catenated.
200
201
202 ''pids''
203
204
205 List only the specified processes; they are comma-delimited.
206 The list must be given immediately after the last option in
207 a single command-line argument, with no intervening space,
208 e.g. __ps j1,4,5__. Lists specified in subsequent
209 arguments are catenated, e.g. __ps l 1,2 3,4 5 6__ will
210 list all of the processes 1-6 in long format. If pids are
211 given, they are listed no matter what. If a tty is given
212 matching processes are listed no matter what. These two
213 features override the 'a' and 'x' flags.
214 !!LONG COMMAND-LINE OPTIONS
215
216
217 These options are preceeded by a double-hyphen.
218
219
220 __--sort__''X''[[__+__|__-__]''key''[[,[[__+__|__-__]''key''[[,__...__]]
221
222
223 Choose a ''multi-letter key'' from the __SORT KEYS__
224 section. ''X'' may be any convenient separator character.
225 To be GNU-ish use `='. The `+' is really optional since
226 default direction is increasing numerical or lexicographic
227 order. E.g.: __ps jax
228 --sort=uid,-ppid,+pid__
229
230
231 __--help__
232
233
234 Get a help message that summarizes the usage and gives a
235 list of supported sort keys. This list may be more up to
236 date than this man page.
237
238
239 __--version__
240
241
242 Display version and source of this program.
243 !!SORT KEYS
244
245
246 Note that the values used in sorting are the internal values
247 __ps__ uses and ''not'' the `cooked' values used in
248 some of the output format fields. If someone wants to
249 volunteer to write special comparison functions for the
250 cooked values, ... ;-)
251
252
253 SHORT LONG DESCRIPTION
254
255
256 c cmd simple name of executable
257
258
259 C cmdline full command line
260
261
262 f flags flags as in long format F field
263
264
265 g pgrp process group ID
266
267
268 G tpgid controlling tty process group ID
269
270
271 j cutime cumulative user time
272
273
274 J cstime cumulative system time
275
276
277 k utime user time
278
279
280 K stime system time
281
282
283 m min_flt number of minor page faults
284
285
286 M maj_flt number of major page faults
287
288
289 n cmin_flt cumulative minor page faults
290
291
292 N cmaj_flt cumulative major page faults
293
294
295 o session session ID
296
297
298 p pid process ID
299
300
301 P ppid parent process ID
302
303
304 r rss resident set size
305
306
307 R resident resident pages
308
309
310 s size memory size in kilobytes
311
312
313 S share amount of shared pages
314
315
316 t tty the minor device number of tty
317
318
319 T start_time time process was started
320
321
322 U uid user ID number
323
324
325 u user user name
326
327
328 v vsize total VM size in bytes
329
330
331 y priority kernel scheduling priority
332 !!FIELD DESCRIPTIONS
333
334
335 __PRI__
336
337
338 This is the counter field in the task struct. It is the time
339 in __HZ__ of the process's possible
340 timeslice.
341
342
343 __NI__
344
345
346 Standard unix nice value; a positive value means less cpu
347 time.
348
349
350 __SIZE__
351
352
353 Virtual image size; size of text+data+stack.
354
355
356 __RSS__
357
358
359 Resident set size; kilobytes of program in
360 memory.
361
362
363 __WCHAN__
364
365
366 Name of the kernel function where the process is sleeping,
367 with the `__sys___' stripped from the function name. If
368 ''/etc/psdatabase'' does not exist, it is just a hex
369 number instead.
370
371
372 __STAT__
373
374
375 Information about the status of the process. The first field
376 is __R__ for runnable, __S__ for sleeping, __D__
377 for uninterruptible sleep, __T__ for stopped or traced,
378 or __Z__ for a zombie process. The second field contains
379 __W__ if the process has no resident pages. The third
380 field is __N__ if the process has a positive nice value
381 (__NI__ field).
382
383
384 __TT__
385
386
387 Controlling tty.
388
389
390 __PAGEIN__
391
392
393 Number of major page faults (page faults that cause pages to
394 be read from disk, including pages read from the buffer
395 cache).
396
397
398 __TRS__
399
400
401 Text resident size.
402
403
404 __SWAP__
405
406
407 Kilobytes (or pages if __p__ is used) on swap
408 device.
409
410
411 __SHARE__
412
413
414 Shared memory.
415 !!UPDATING
416
417
418 This __proc__-based __ps__ works by reading the files
419 in the __proc__ filesystem, mounted on __/proc__. This
420 __ps__ does not need to be suid __kmem__ or have any
421 privileges to run. ''Do not give this ps any special
422 permissions.''
423
424
425 You will need to put in place the appropriate System.map
426 file when you install a new kernel in order to get
427 meaningful information from the __WCHAN__ field. This
428 should be done every time you compile a new kernel. You
429 should also run 'ps' as root once and then any time the tty
430 devices in the
431 __
432
433
434 As of procps-1.00, ps/top read System.map directly if it is
435 available. The search path for kernel address-to-symbol
436 resolution is:
437
438
439 $PS_SYSTEM_MAP
440 /boot/System.map-`uname -r`
441 /boot/System.map
442 /lib/modules/`uname -r`/System.map
443 /etc/psdatabase
444 /boot/psdatabase-`uname -r`
445 /boot/psdatabase,
446 /lib/modules/`uname -r`/psdatabase
447 !!NOTES
448
449
450 The member __used_math__ of __task_struct__ is not
451 shown, since __crt0.s__ checks to see if math is present.
452 This causes the math flag to be set for all processes, and
453 so it is worthless.
454
455
456 Programs swapped out to disk will be shown without command
457 line arguments, and unless the __c__ option is given, in
458 parentheses.
459
460
461 __%CPU__ shows the cputime/realtime percentage. It will
462 not add up to 100% unless you are lucky. It is time used
463 divided by the time the process has been
464 running.
465
466
467 The __SIZE__ and __RSS__ fields don't count the page
468 tables and the __task_struct__ of a proc; this is at
469 least 12k of memory that is always resident. __SIZE__ is
470 the virtual size of the proc (code+data+stack).
471 !!AUTHOR
472
473
474 __ps__ was originally written by Branko Lankester
475 __
476
477
478 Please send bug reports to
479 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.