]>
Commit | Line | Data |
---|---|---|
649623d2 | 1 | --- procps-3.1.8.orig/ps/ps.1 |
2 | +++ procps-3.1.8/ps/ps.1 | |
3 | @@ -1,3 +1,5 @@ | |
4 | +'\" t | |
5 | +.\" (The preceding line is a note to broken versions of man to tell | |
6 | .\" Man page for ps. | |
7 | .\" Quick hack conversion by Albert Cahalan, 1998. | |
8 | .\" Licensed under version 2 of the Gnu General Public License. | |
9 | @@ -10,8 +12,8 @@ | |
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 | +.SH NAME | |
16 | +ps \- report a snapshot of the current processes. | |
17 | .ad r | |
18 | .na | |
19 | .ss 12 0 | |
20 | @@ -19,17 +21,17 @@ | |
21 | .nh | |
22 | .nf | |
23 | ||
24 | -SYNOPSIS | |
25 | +.SH SYNOPSIS | |
26 | ps [options] | |
27 | ||
28 | ||
29 | -DESCRIPTION | |
30 | +.SH DESCRIPTION | |
31 | ps gives a snapshot of the current processes. If you want | |
32 | a repetitive update of this status, use top. This man | |
33 | page documents the /proc-based version of ps, or tries to. | |
34 | ||
35 | ||
36 | -COMMAND-LINE OPTIONS | |
37 | +.SH "COMMAND-LINE OPTIONS" | |
38 | ||
39 | This version of ps accepts several kinds of options. | |
40 | ||
41 | @@ -43,7 +45,9 @@ | |
42 | when options are preceeded by a dash. The PS_PERSONALITY environment | |
43 | variable (described below) provides more detailed control of ps behavior. | |
44 | ||
45 | -SIMPLE PROCESS SELECTION | |
46 | +.SH "SIMPLE PROCESS SELECTION" | |
47 | +.TS | |
48 | +l l. | |
49 | -A select all processes | |
50 | -N negate selection | |
51 | -a select all with a tty except session leaders | |
52 | @@ -55,8 +59,11 @@ | |
53 | r restrict output to running processes | |
54 | x select processes without controlling ttys | |
55 | --deselect negate selection | |
56 | +.TE | |
57 | ||
58 | -PROCESS SELECTION BY LIST | |
59 | +.SH "PROCESS SELECTION BY LIST" | |
60 | +.TS | |
61 | +l l. | |
62 | -C select by command name | |
63 | -G select by RGID (supports names) | |
64 | -U select by RUID (supports names) | |
65 | @@ -78,8 +85,10 @@ | |
66 | --user select by effective user name or ID | |
67 | -123 implied --sid | |
68 | 123 implied --pid | |
69 | - | |
70 | -OUTPUT FORMAT CONTROL | |
71 | +.TE | |
72 | +.SH "OUTPUT FORMAT CONTROL" | |
73 | +.TS | |
74 | +l l. | |
75 | -O is preloaded "-o" | |
76 | -F extra full format | |
77 | -c different scheduler info for -l option | |
78 | @@ -99,8 +108,10 @@ | |
79 | --format user-defined format | |
80 | --context (SELinux only) Display security context format; implies --secsid | |
81 | --secsid (SELinux only) Display Security ID | |
82 | - | |
83 | -OUTPUT MODIFIERS | |
84 | +.TE | |
85 | +.SH "OUTPUT MODIFIERS" | |
86 | +.TS | |
87 | +l l. | |
88 | -H show process hierarchy (forest) | |
89 | -m show threads | |
90 | -n set namelist file | |
91 | @@ -126,24 +137,31 @@ | |
92 | --rows set screen height | |
93 | --sort specify sorting order | |
94 | --width set screen width | |
95 | +.TE | |
96 | ||
97 | -INFORMATION | |
98 | +.SH INFORMATION | |
99 | + | |
100 | +.TS | |
101 | +l l. | |
102 | -V print version | |
103 | L list all format specifiers | |
104 | V show version info | |
105 | --help print help message | |
106 | --info print debugging info | |
107 | --version print version | |
108 | +.TE | |
109 | + | |
110 | +.SH OBSOLETE | |
111 | ||
112 | -OBSOLETE | |
113 | +.TS | |
114 | +l l. | |
115 | A increases the argument space (DecUnix) | |
116 | M use alternate core (try -n or N instead) | |
117 | W get swap info from ... not /dev/drum (try -n or N instead) | |
118 | k use /vmcore as c-dumpfile (try -n or N instead) | |
119 | +.TE | |
120 | ||
121 | - | |
122 | - | |
123 | -NOTES | |
124 | +.SH NOTES | |
125 | ||
126 | The "-g" option can select by session leader OR by group name. | |
127 | Selection by session leader is specified by many standards, | |
128 | @@ -226,15 +244,19 @@ | |
129 | will be destroyed by init(8) if the parent process exits. | |
130 | ||
131 | ||
132 | -PROCESS FLAGS | |
133 | - | |
134 | +.SH "PROCESS FLAGS" | |
135 | +.TS | |
136 | +l l l. | |
137 | FORKNOEXEC 1 forked but didn't exec | |
138 | SUPERPRIV 2 used super-user privileges | |
139 | DUMPCORE 4 dumped core | |
140 | +.TE | |
141 | ||
142 | ||
143 | -PROCESS STATE CODES | |
144 | +.SH "PROCESS STATE CODES" | |
145 | ||
146 | +.TS | |
147 | +l l. | |
148 | D uninterruptible sleep (usually IO) | |
149 | R runnable (on run queue) | |
150 | S sleeping | |
151 | @@ -242,23 +264,30 @@ | |
152 | W paging | |
153 | X dead | |
154 | Z a defunct ("zombie") process | |
155 | +.TE | |
156 | ||
157 | For BSD formats and when the "stat" keyword is used, additional | |
158 | letters may be displayed: | |
159 | ||
160 | -W has no resident pages | |
161 | -< high-priority process | |
162 | -N low-priority task | |
163 | -L has pages locked into memory (for real-time and custom IO) | |
164 | +.IP W | |
165 | +has no resident pages | |
166 | +.IP < | |
167 | +high-priority process | |
168 | +.IP N | |
169 | +low-priority task | |
170 | +.IP L | |
171 | +has pages locked into memory (for real-time and custom IO) | |
172 | ||
173 | ||
174 | -SORT KEYS | |
175 | +.SH "SORT KEYS" | |
176 | ||
177 | Note that the values used in sorting are the internal values ps uses and not | |
178 | the `cooked' values used in some of the output format fields. Pipe ps | |
179 | output into the sort(1) command if you want to sort the cooked values. | |
180 | ||
181 | -KEY LONG DESCRIPTION | |
182 | +.TS | |
183 | +l l l. | |
184 | +\fBKEY LONG DESCRIPTION\fR | |
185 | c cmd simple name of executable | |
186 | C cmdline full command line | |
187 | f flags flags as in long format F field | |
188 | @@ -285,14 +314,15 @@ | |
189 | u user user name | |
190 | v vsize total VM size in kB | |
191 | y priority kernel scheduling priority | |
192 | +.TE | |
193 | ||
194 | - | |
195 | -AIX FORMAT DESCRIPTORS | |
196 | +.SH "AIX FORMAT DESCRIPTORS" | |
197 | ||
198 | This ps supports AIX format descriptors, which work somewhat like the | |
199 | formatting codes of printf(1) and printf(3). For example, the normal | |
200 | default output can be produced with this: ps -eo "%p %y %x %c" | |
201 | - | |
202 | +.TS | |
203 | +l l l. | |
204 | CODE NORMAL HEADER | |
205 | %C pcpu %CPU | |
206 | %G group GROUP | |
207 | @@ -309,14 +339,16 @@ | |
208 | %x time TIME | |
209 | %y tty TTY | |
210 | %z vsz VSZ | |
211 | +.TE | |
212 | ||
213 | - | |
214 | -STANDARD FORMAT SPECIFIERS | |
215 | +.SH "STANDARD FORMAT SPECIFIERS" | |
216 | ||
217 | These may be used to control both output format and sorting. | |
218 | For example: ps -eo pid,user,args --sort user | |
219 | ||
220 | -CODE HEADER | |
221 | +.TS | |
222 | +l l. | |
223 | +\fBCODE HEADER\fR | |
224 | %cpu %CPU | |
225 | %mem %MEM | |
226 | alarm ALARM | |
227 | @@ -438,25 +470,51 @@ | |
228 | vsize VSZ | |
229 | vsz VSZ | |
230 | wchan WCHAN | |
231 | +.TE | |
232 | ||
233 | +.SH "ENVIRONMENT VARIABLES" | |
234 | ||
235 | - | |
236 | - | |
237 | -ENVIRONMENT VARIABLES | |
238 | The following environment variables could affect ps: | |
239 | - COLUMNS Override default display width. | |
240 | - LINES Override default display height. | |
241 | - PS_PERSONALITY Set to one of posix,old,linux,bsd,sun,digital... | |
242 | - CMD_ENV Set to one of posix,old,linux,bsd,sun,digital... | |
243 | - I_WANT_A_BROKEN_PS Force obsolete command line interpretation. | |
244 | - LC_TIME Date format. | |
245 | - PS_COLORS Not currently supported. | |
246 | - PS_FORMAT Default output format override. | |
247 | - PS_SYSMAP Default namelist (System.map) location. | |
248 | - PS_SYSTEM_MAP Default namelist (System.map) location. | |
249 | - POSIXLY_CORRECT Don't find excuses to ignore bad "features". | |
250 | - UNIX95 Don't find excuses to ignore bad "features". | |
251 | - _XPG Cancel CMD_ENV=irix non-standard behavior. | |
252 | + | |
253 | +.TP | |
254 | +.B COLUMNS | |
255 | +Override default display width. | |
256 | +.TP | |
257 | +.B LINES | |
258 | +Override default display height. | |
259 | +.TP | |
260 | +.B PS_PERSONALITY | |
261 | +Set to one of posix,old,linux,bsd,sun,digital... | |
262 | +.TP | |
263 | +.B CMD_ENV | |
264 | +Set to one of posix,old,linux,bsd,sun,digital... | |
265 | +.TP | |
266 | +.B I_WANT_A_BROKEN_PS | |
267 | +Force obsolete command line interpretation. | |
268 | +.TP | |
269 | +.B LC_TIME | |
270 | +Date format. | |
271 | +.TP | |
272 | +.B PS_COLORS | |
273 | +Not currently supported. | |
274 | +.TP | |
275 | +.B PS_FORMAT | |
276 | +Default output format override. | |
277 | +.TP | |
278 | +.B PS_SYSMAP | |
279 | +Default namelist (System.map) location. | |
280 | +.TP | |
281 | +.B PS_SYSTEM_MAP | |
282 | +Default namelist (System.map) location. | |
283 | +.TP | |
284 | +.B POSIXLY_CORRECT | |
285 | +Don't find excuses to ignore bad "features". | |
286 | +.TP | |
287 | +.B UNIX95 | |
288 | +Don't find excuses to ignore bad "features". | |
289 | +.TP | |
290 | +.B _XPG | |
291 | +Cancel CMD_ENV=irix non-standard behavior. | |
292 | ||
293 | In general, it is a bad idea to set these variables. The one exception | |
294 | is CMD_ENV or PS_PERSONALITY, which could be set to Linux for normal | |
295 | @@ -464,7 +522,9 @@ | |
296 | of the Unix98 standard. | |
297 | ||
298 | ||
299 | -PERSONALITY | |
300 | +.SH "PERSONALITY" | |
301 | +.TS | |
302 | +l l. | |
303 | 390 like the S/390 OpenEdition ps | |
304 | aix like AIX ps | |
305 | bsd like FreeBSD ps (totally non-standard) | |
306 | @@ -486,9 +546,9 @@ | |
307 | unix standard | |
308 | unix95 standard | |
309 | unix98 standard | |
310 | +.TE | |
311 | ||
312 | - | |
313 | -EXAMPLES | |
314 | +.SH "EXAMPLES" | |
315 | To see every process on the system using standard syntax: | |
316 | ps -e | |
317 | To see every process on the system using BSD syntax: | |
318 | @@ -502,13 +562,13 @@ | |
319 | Print only the process IDs of syslogd: | |
320 | ps -C syslogd -o pid= | |
321 | ||
322 | -SEE ALSO | |
323 | -top(1) pgrep(1) pstree(1) proc(5) | |
324 | +.SH "SEE ALSO" | |
325 | +.BR top (1), pgrep (1), pstree (1), proc (5). | |
326 | ||
327 | -STANDARDS | |
328 | +.SH STANDARDS | |
329 | This ps conforms to version 2 of the Single Unix Specification. | |
330 | ||
331 | -AUTHOR | |
332 | +.SH AUTHOR | |
333 | ps was originally written by Branko Lankester <lankeste@fwi.uva.nl>. Michael | |
334 | K. Johnson <johnsonm@redhat.com> re-wrote it significantly to use the proc | |
335 | filesystem, changing a few things in the process. Michael Shields | |
336 | @@ -520,4 +580,4 @@ | |
337 | <acahalan@cs.uml.edu> rewrote ps for full Unix98 and BSD support, along with | |
338 | some ugly hacks for obsolete and foreign syntax. | |
339 | ||
340 | -Please send bug reports to <acahalan@cs.uml.edu> | |
341 | +Please send bug reports to <procps-feedback@lists.sf.net>. | |
342 | --- procps-3.1.8.orig/ps/module.mk | |
343 | +++ procps-3.1.8/ps/module.mk | |
344 | @@ -20,7 +20,7 @@ | |
345 | TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X)) | |
346 | ||
347 | ps/ps: $(PSOBJ) $(LIBPROC) | |
348 | - $(CC) $(LDFLAGS) -o $@ $^ | |
349 | + $(CC) $(LDFLAGS) -o $@ $^ $(SELIB) | |
350 | ||
351 | # This just adds the stacktrace code | |
352 | ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC) | |
353 | --- procps-3.1.8.orig/proc/readproc.c | |
354 | +++ procps-3.1.8/proc/readproc.c | |
355 | @@ -759,6 +759,8 @@ | |
356 | else | |
357 | PT = openproc(flags); | |
358 | va_end(ap); | |
359 | + if (!PT) | |
360 | + return 0; | |
361 | do { /* read table: */ | |
362 | tab = xrealloc(tab, (n+1)*sizeof(proc_t*));/* realloc as we go, using */ | |
363 | tab[n] = readproc_direct(PT, NULL); /* final null to terminate */ | |
364 | --- procps-3.1.8.orig/Makefile | |
365 | +++ procps-3.1.8/Makefile | |
366 | @@ -155,13 +155,13 @@ | |
367 | ############ prog.o --> prog | |
368 | ||
369 | pmap w uptime tload free sysctl vmstat utmp pgrep skill: % : %.o $(LIBPROC) | |
370 | - $(CC) $(LDFLAGS) -o $@ $^ | |
371 | + $(CC) $(LDFLAGS) -o $@ $^ $(SELIB) | |
372 | ||
373 | top: % : %.o $(LIBPROC) | |
374 | - $(CC) $(LDFLAGS) -o $@ $^ $(CURSESLIB) | |
375 | + $(CC) $(LDFLAGS) -o $@ $^ $(CURSESLIB) $(SELIB) | |
376 | ||
377 | watch: % : %.o | |
378 | - $(CC) $(LDFLAGS) -o $@ $^ $(CURSESLIB) | |
379 | + $(CC) $(LDFLAGS) -o $@ $^ $(CURSESLIB) $(SELIB) | |
380 | ||
381 | ############ progX --> progY | |
382 | ||
383 | --- procps-3.1.8.orig/skill.1 | |
384 | +++ procps-3.1.8/skill.1 | |
385 | @@ -8,7 +8,8 @@ | |
386 | .\" | |
387 | .TH SKILL 1 "March 12, 1999" "Linux" "Linux User's Manual" | |
388 | .SH NAME | |
389 | -skill, snice \- report process status | |
390 | +skill \- Terminate or signal processes based on selection criteria | |
391 | +snice \- Change processes priority based on selection criteria | |
392 | ||
393 | .SH SYNOPSIS | |
394 | .nf | |
395 | --- procps-3.1.8.orig/kill.1 | |
396 | +++ procps-3.1.8/kill.1 | |
397 | @@ -7,7 +7,7 @@ | |
398 | .\" Michael K. Johnson | |
399 | .TH KILL 1 "November 21, 1999" "Linux" "Linux User's Manual" | |
400 | .SH NAME | |
401 | -kill \- report process status | |
402 | +kill \- Terminate or signal a process | |
403 | ||
404 | .SH SYNOPSIS | |
405 | .TS |