Print this page
2989 Eliminate use of LOGNAME_MAX in ON
1166 useradd have warning with name more 8 chars
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/ps.1
+++ new/usr/src/man/man1/ps.1
1 1 '\" te
2 2 .\" Copyright 1989 AT&T
3 3 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
4 4 .\" Copyright (c) 2012, Joyent, Inc. All Rights Reserved
5 +.\" Copyright (c) 2013 Gary Mills
5 6 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
6 7 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
7 8 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
8 9 .\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
9 10 .\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
10 11 .\" This notice shall appear on any product containing this material.
11 12 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
12 13 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
13 14 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
14 -.TH PS 1 "Aug 16, 2009"
15 +.TH PS 1 "Apr 16, 2013"
15 16 .SH NAME
16 17 ps \- report process status
17 18 .SH SYNOPSIS
18 19 .LP
19 20 .nf
20 -\fBps\fR [\fB-aAcdefjHlLPyZ\fR] [\fB-g\fR \fIgrplist\fR] [\fB-h\fR \fIlgrplist\fR]
21 +\fBps\fR [\fB-aAcdefjHlLPWyZ\fR] [\fB-g\fR \fIgrplist\fR] [\fB-h\fR \fIlgrplist\fR]
21 22 [\fB-n\fR \fInamelist\fR] [\fB-o\fR \fIformat\fR]... [\fB-p\fR \fIproclist\fR]
22 23 [\fB-s\fR \fIsidlist\fR] [\fB-t\fR \fIterm\fR] [\fB-u\fR \fIuidlist\fR] [\fB-U\fR \fIuidlist\fR]
23 24 [\fB-G\fR \fIgidlist\fR] [\fB-z\fR \fIzonelist\fR]
24 25 .fi
25 26
26 27 .SH DESCRIPTION
27 28 .sp
28 29 .LP
29 30 The \fBps\fR command prints information about active processes. Without
30 31 options, \fBps\fR prints information about processes that have the same
31 32 effective user \fBID\fR and the same controlling terminal as the invoker. The
32 33 output contains only the process \fBID\fR, terminal identifier, cumulative
33 34 execution time, and the command name. Otherwise, the information that is
34 35 displayed is controlled by the options.
35 36 .sp
36 37 .LP
37 38 Some options accept lists as arguments. Items in a list can be either separated
38 39 by commas or else enclosed in quotes and separated by commas or spaces. Values
39 40 for \fIproclist\fR and \fIgrplist\fR must be numeric.
40 41 .SH OPTIONS
41 42 .sp
42 43 .LP
43 44 The following options are supported:
44 45 .sp
45 46 .ne 2
46 47 .na
47 48 \fB\fB-a\fR\fR
48 49 .ad
49 50 .RS 15n
50 51 Lists information about \fBa\fRll processes most frequently requested: all
51 52 those except session leaders and processes not associated with a terminal.
52 53 .RE
53 54
54 55 .sp
55 56 .ne 2
56 57 .na
57 58 \fB\fB-A\fR\fR
58 59 .ad
59 60 .RS 15n
60 61 Lists information for all processes. Identical to \fB-e\fR, below.
61 62 .RE
62 63
63 64 .sp
64 65 .ne 2
65 66 .na
66 67 \fB\fB-c\fR\fR
67 68 .ad
68 69 .RS 15n
69 70 Prints information in a format that reflects scheduler properties as described
70 71 in \fBpriocntl\fR(1). The \fB-c\fR option affects the output of the \fB-f\fR
71 72 and \fB-l\fR options, as described below.
72 73 .RE
73 74
74 75 .sp
75 76 .ne 2
76 77 .na
77 78 \fB\fB-d\fR\fR
78 79 .ad
79 80 .RS 15n
80 81 Lists information about all processes except session leaders.
81 82 .RE
82 83
83 84 .sp
84 85 .ne 2
85 86 .na
86 87 \fB\fB-e\fR\fR
87 88 .ad
88 89 .RS 15n
89 90 Lists information about \fBe\fRvery process now running.
90 91 .sp
91 92 When the \fB-e\fRoption is specified, options \fB-z\fR, \fB-t\fR, \fB-u\fR,
92 93 \fB-U\fR, \fB-g\fR, \fB-G\fR, \fB-p\fR, \fB-g\fR, \fB-s\fR and \fB-a\fR options
93 94 have no effect.
94 95 .RE
95 96
96 97 .sp
97 98 .ne 2
98 99 .na
99 100 \fB\fB-f\fR\fR
100 101 .ad
101 102 .RS 15n
102 103 Generates a \fBf\fRull listing. (See below for significance of columns in a
103 104 full listing.)
104 105 .RE
105 106
106 107 .sp
107 108 .ne 2
108 109 .na
109 110 \fB\fB-g\fR \fIgrplist\fR\fR
110 111 .ad
111 112 .RS 15n
112 113 Lists only process data whose group leader's \fBID\fR number(s) appears in
113 114 \fIgrplist\fR. (A group leader is a process whose process \fBID\fR number is
114 115 identical to its process group \fBID\fR number.)
115 116 .RE
116 117
117 118 .sp
118 119 .ne 2
119 120 .na
120 121 \fB\fB-G\fR \fIgidlist\fR\fR
121 122 .ad
122 123 .RS 15n
123 124 Lists information for processes whose real group ID numbers are given in
124 125 \fIgidlist\fR. The \fIgidlist\fR must be a single argument in the form of a
125 126 blank- or comma-separated list.
126 127 .RE
127 128
128 129 .sp
129 130 .ne 2
130 131 .na
131 132 \fB\fB-h\fR \fIlgrplist\fR\fR
132 133 .ad
133 134 .RS 15n
134 135 Lists only the processes homed to the specified \fIlgrplist\fR. Nothing is
135 136 listed for any invalid group specified in \fIlgrplist\fR.
136 137 .RE
137 138
138 139 .sp
139 140 .ne 2
140 141 .na
141 142 \fB\fB-H\fR\fR
142 143 .ad
143 144 .RS 15n
144 145 Prints the home lgroup of the process under an additional column header, LGRP.
145 146 .RE
146 147
147 148 .sp
148 149 .ne 2
149 150 .na
150 151 \fB\fB-j\fR\fR
151 152 .ad
152 153 .RS 15n
153 154 Prints session \fBID\fR and process group \fBID\fR.
154 155 .RE
155 156
156 157 .sp
157 158 .ne 2
158 159 .na
159 160 \fB\fB-l\fR\fR
160 161 .ad
161 162 .RS 15n
162 163 Generates a \fBl\fRong listing. (See below.)
163 164 .RE
164 165
165 166 .sp
166 167 .ne 2
167 168 .na
168 169 \fB\fB-L\fR\fR
169 170 .ad
170 171 .RS 15n
171 172 Prints information about each light weight process (\fIlwp\fR) in each selected
172 173 process. (See below.)
173 174 .RE
174 175
175 176 .sp
176 177 .ne 2
177 178 .na
178 179 \fB\fB-n\fR \fInamelist\fR\fR
179 180 .ad
180 181 .RS 15n
181 182 Specifies the name of an alternative system \fInamelist\fR file in place of the
182 183 default. This option is accepted for compatibility, but is ignored.
183 184 .RE
184 185
185 186 .sp
186 187 .ne 2
187 188 .na
188 189 \fB\fB-o\fR \fIformat\fR\fR
189 190 .ad
190 191 .RS 15n
191 192 Prints information according to the format specification given in \fIformat\fR.
192 193 This is fully described in \fBDISPLAY FORMATS\fR. Multiple \fB-o\fR options can
193 194 be specified; the format specification is interpreted as the
194 195 space-character-separated concatenation of all the \fIformat\fR
195 196 option-arguments.
196 197 .RE
197 198
198 199 .sp
199 200 .ne 2
200 201 .na
201 202 \fB\fB-p\fR \fIproclist\fR\fR
202 203 .ad
203 204 .RS 15n
204 205 Lists only process data whose process \fBID\fR numbers are given in
205 206 \fIproclist\fR.
206 207 .RE
207 208
208 209 .sp
209 210 .ne 2
210 211 .na
211 212 \fB\fB-P\fR\fR
212 213 .ad
213 214 .RS 15n
214 215 Prints the number of the processor to which the process or lwp is bound, if
215 216 any, under an additional column header, \fBPSR\fR.
216 217 .RE
217 218
218 219 .sp
219 220 .ne 2
220 221 .na
221 222 \fB\fB-s\fR \fIsidlist\fR\fR
222 223 .ad
223 224 .RS 15n
224 225 Lists information on all session leaders whose \fBID\fRs appear in
225 226 \fIsidlist\fR.
226 227 .RE
227 228
228 229 .sp
229 230 .ne 2
230 231 .na
231 232 \fB\fB-t\fR \fIterm\fR\fR
232 233 .ad
233 234 .RS 15n
234 235 Lists only process data associated with \fIterm\fR. Terminal identifiers are
235 236 specified as a device file name, and an identifier. For example, \fBterm/a\fR,
236 237 or \fBpts/0\fR.
237 238 .RE
238 239
239 240 .sp
240 241 .ne 2
241 242 .na
242 243 \fB\fB-u\fR \fIuidlist\fR\fR
243 244 .ad
244 245 .RS 15n
245 246 Lists only process data whose effective user \fBID\fR number or login name is
246 247 given in \fIuidlist\fR. In the listing, the numerical user \fBID\fR is printed
247 248 unless you give the \fB-f\fR option, which prints the login name.
248 249 .RE
249 250
250 251 .sp
251 252 .ne 2
252 253 .na
253 254 \fB\fB-U\fR \fIuidlist\fR\fR
↓ open down ↓ |
223 lines elided |
↑ open up ↑ |
254 255 .ad
255 256 .RS 15n
256 257 Lists information for processes whose real user \fBID\fR numbers or login names
257 258 are given in \fIuidlist\fR. The \fIuidlist\fR must be a single argument in the
258 259 form of a blank- or comma-separated list.
259 260 .RE
260 261
261 262 .sp
262 263 .ne 2
263 264 .na
265 +\fB\fB-W\fR\fR
266 +.ad
267 +.RS 15n
268 +Truncate long names even when \fBps\fR would normally print them
269 +in full.
270 +A trailing asterisk marks a long name that has been truncated
271 +to fit the column.
272 +.RE
273 +
274 +.sp
275 +.ne 2
276 +.na
264 277 \fB\fB-y\fR\fR
265 278 .ad
266 279 .RS 15n
267 280 Under a long listing (\fB-l\fR), omits the obsolete \fBF\fR and \fBADDR\fR
268 281 columns and includes an \fBRSS\fR column to report the resident set size of the
269 282 process. Under the \fB-y\fR option, both \fBRSS\fR and \fBSZ\fR (see below) is
270 283 reported in units of kilobytes instead of pages.
271 284 .RE
272 285
273 286 .sp
274 287 .ne 2
275 288 .na
276 289 \fB\fB-z\fR \fIzonelist\fR\fR
277 290 .ad
278 291 .RS 15n
279 292 Lists only processes in the specified zones. Zones can be specified either by
280 293 name or ID. This option is only useful when executed in the global zone.
281 294 .RE
282 295
283 296 .sp
284 297 .ne 2
285 298 .na
286 299 \fB\fB-Z\fR\fR
287 300 .ad
288 301 .RS 15n
289 302 Prints the name of the zone with which the process is associated under an
290 303 additional column header, \fBZONE\fR. The \fBZONE\fR column width is limited to
291 304 8 characters. Use \fBps\fR \fB-eZ\fR for a quick way to see information about
292 305 every process now running along with the associated zone name. Use
293 306 .sp
294 307 .in +2
295 308 .nf
296 309 ps -eo zone,uid,pid,ppid,time,comm,...
297 310 .fi
298 311 .in -2
299 312 .sp
300 313
301 314 to see zone names wider than 8 characters.
302 315 .RE
303 316
304 317 .sp
305 318 .LP
306 319 Many of the options shown are used to select processes to list. If any are
307 320 specified, the default list is ignored and \fBps\fR selects the processes
308 321 represented by the inclusive OR of all the selection-criteria options.
309 322 .SH DISPLAY FORMATS
310 323 .sp
311 324 .LP
312 325 Under the \fB-f\fR option, \fBps\fR tries to determine the command name and
313 326 arguments given when the process was created by examining the user block.
314 327 Failing this, the command name is printed, as it would have appeared without
315 328 the \fB-f\fR option, in square brackets.
316 329 .sp
317 330 .LP
318 331 The column headings and the meaning of the columns in a \fBps\fR listing are
319 332 given below; the letters \fBf\fR and \fBl\fR indicate the option (f\fBull\fR or
320 333 \fBl\fRong, respectively) that causes the corresponding heading to appear;
321 334 \fBall\fR means that the heading always appears. \fBNote:\fR These two options
322 335 determine only what information is provided for a process; they do not
323 336 determine which processes are listed.
324 337 .sp
325 338 .ne 2
326 339 .na
327 340 \fB\fBF\fR(l)\fR
328 341 .ad
329 342 .RS 14n
330 343 Flags (hexadecimal and additive) associated with the process. These flags are
331 344 available for historical purposes; no meaning should be currently ascribed to
332 345 them.
333 346 .RE
334 347
335 348 .sp
336 349 .ne 2
337 350 .na
338 351 \fB\fBS\fR (l)\fR
339 352 .ad
340 353 .RS 14n
341 354 The state of the process:
342 355 .sp
343 356 .ne 2
344 357 .na
345 358 \fBO\fR
346 359 .ad
347 360 .RS 5n
348 361 Process is running on a processor.
349 362 .RE
350 363
351 364 .sp
352 365 .ne 2
353 366 .na
354 367 \fBS\fR
355 368 .ad
356 369 .RS 5n
357 370 Sleeping: process is waiting for an event to complete.
358 371 .RE
359 372
360 373 .sp
361 374 .ne 2
362 375 .na
363 376 \fBR\fR
364 377 .ad
365 378 .RS 5n
366 379 Runnable: process is on run queue.
367 380 .RE
368 381
369 382 .sp
370 383 .ne 2
371 384 .na
372 385 \fBT\fR
373 386 .ad
374 387 .RS 5n
375 388 Process is stopped, either by a job control signal or because it is being
376 389 traced.
377 390 .RE
378 391
379 392 .sp
380 393 .ne 2
381 394 .na
382 395 \fBW\fR
383 396 .ad
384 397 .RS 5n
385 398 Waiting: process is waiting for CPU usage to drop to the CPU-caps enforced
386 399 limits.
387 400 .RE
388 401
389 402 .sp
390 403 .ne 2
391 404 .na
392 405 \fBZ\fR
393 406 .ad
394 407 .RS 5n
395 408 Zombie state: process terminated and parent not waiting.
396 409 .RE
397 410
↓ open down ↓ |
124 lines elided |
↑ open up ↑ |
398 411 .RE
399 412
400 413 .sp
401 414 .ne 2
402 415 .na
403 416 \fB\fBUID\fR (f,l)\fR
404 417 .ad
405 418 .RS 14n
406 419 The effective user \fBID\fR number of the process (the login name is printed
407 420 under the \fB-f\fR option).
421 +A trailing asterisk marks a long name that has been truncated
422 +to fit the column.
408 423 .RE
409 424
410 425 .sp
411 426 .ne 2
412 427 .na
413 428 \fB\fBPID\fR(all)\fR
414 429 .ad
415 430 .RS 14n
416 431 The process \fBID\fR of the process (this datum is necessary in order to kill a
417 432 process).
418 433 .RE
419 434
420 435 .sp
421 436 .ne 2
422 437 .na
423 438 \fB\fBPPID\fR(f,l)\fR
424 439 .ad
425 440 .RS 14n
426 441 The process \fBID\fR of the parent process.
427 442 .RE
428 443
429 444 .sp
430 445 .ne 2
431 446 .na
432 447 \fB\fBC\fR(f,l)\fR
433 448 .ad
434 449 .RS 14n
435 450 Processor utilization for scheduling (obsolete). Not printed when the \fB-c\fR
436 451 option is used.
437 452 .RE
438 453
439 454 .sp
440 455 .ne 2
441 456 .na
442 457 \fB\fBCLS\fR(f,l)\fR
443 458 .ad
444 459 .RS 14n
445 460 Scheduling class. Printed only when the \fB-c\fR option is used.
446 461 .RE
447 462
448 463 .sp
449 464 .ne 2
450 465 .na
451 466 \fB\fBPRI\fR(l)\fR
452 467 .ad
453 468 .RS 14n
454 469 The priority of the process. Without the \fB-c\fR option, higher numbers mean
455 470 lower priority. With the \fB-c\fR option, higher numbers mean higher priority.
456 471 .RE
457 472
458 473 .sp
459 474 .ne 2
460 475 .na
461 476 \fB\fBNI\fR(l)\fR
462 477 .ad
463 478 .RS 14n
464 479 Nice value, used in priority computation. Not printed when the \fB-c\fR option
465 480 is used. Only processes in the certain scheduling classes have a nice value.
466 481 .RE
467 482
468 483 .sp
469 484 .ne 2
470 485 .na
471 486 \fB\fBADDR\fR(l)\fR
472 487 .ad
473 488 .RS 14n
474 489 The memory address of the process.
475 490 .RE
476 491
477 492 .sp
478 493 .ne 2
479 494 .na
480 495 \fB\fBSZ\fR(l)\fR
481 496 .ad
482 497 .RS 14n
483 498 The total size of the process in virtual memory, including all mapped files and
484 499 devices, in pages. See \fBpagesize\fR(1).
485 500 .RE
486 501
487 502 .sp
488 503 .ne 2
489 504 .na
490 505 \fB\fBWCHAN\fR(l)\fR
491 506 .ad
492 507 .RS 14n
493 508 The address of an event for which the process is sleeping (if blank, the
494 509 process is running).
495 510 .RE
496 511
497 512 .sp
498 513 .ne 2
499 514 .na
500 515 \fB\fBSTIME\fR(f)\fR
501 516 .ad
502 517 .RS 14n
503 518 The starting time of the process, given in hours, minutes, and seconds. (A
504 519 process begun more than twenty-four hours before the \fBps\fR inquiry is
505 520 executed is given in months and days.)
506 521 .RE
507 522
508 523 .sp
509 524 .ne 2
510 525 .na
511 526 \fB\fBTTY\fR(all)\fR
512 527 .ad
513 528 .RS 14n
514 529 The controlling terminal for the process (the message, \fB?\fR, is printed when
515 530 there is no controlling terminal).
516 531 .RE
517 532
518 533 .sp
519 534 .ne 2
520 535 .na
521 536 \fB\fBTIME\fR(all)\fR
522 537 .ad
523 538 .RS 14n
524 539 The cumulative execution time for the process.
525 540 .RE
526 541
527 542 .sp
528 543 .ne 2
529 544 .na
530 545 \fB\fBLTIME\fR(all)\fR
531 546 .ad
532 547 .RS 14n
533 548 The execution time for the lwp being reported.
534 549 .RE
535 550
536 551 .sp
537 552 .ne 2
538 553 .na
539 554 \fB\fBCMD\fR(all)\fR
540 555 .ad
541 556 .RS 14n
542 557 The command name (the full command name and its arguments, up to a limit of 80
543 558 characters, are printed under the \fB-f\fR option).
544 559 .RE
545 560
546 561 .sp
547 562 .LP
548 563 The following two additional columns are printed when the \fB-j\fR option is
549 564 specified:
550 565 .sp
551 566 .ne 2
552 567 .na
553 568 \fB\fBPGID\fR\fR
554 569 .ad
555 570 .RS 8n
556 571 The process ID of the process group leader.
557 572 .RE
558 573
559 574 .sp
560 575 .ne 2
561 576 .na
562 577 \fB\fBSID\fR\fR
563 578 .ad
564 579 .RS 8n
565 580 The process ID of the session leader.
566 581 .RE
567 582
568 583 .sp
569 584 .LP
570 585 The following two additional columns are printed when the \fB-L\fR option is
571 586 specified:
572 587 .sp
573 588 .ne 2
574 589 .na
575 590 \fB\fBLWP\fR\fR
576 591 .ad
577 592 .RS 8n
578 593 The lwp ID of the lwp being reported.
579 594 .RE
580 595
581 596 .sp
582 597 .ne 2
583 598 .na
584 599 \fB\fBNLWP\fR\fR
585 600 .ad
586 601 .RS 8n
587 602 The number of lwps in the process (if \fB-f\fR is also specified).
588 603 .RE
589 604
590 605 .sp
591 606 .LP
592 607 Under the \fB-L\fR option, one line is printed for each lwp in the process and
593 608 the time-reporting fields \fBSTIME\fR and \fBLTIME\fR show the values for the
594 609 lwp, not the process. A traditional single-threaded process contains only one
595 610 lwp.
596 611 .sp
597 612 .LP
598 613 A process that has exited and has a parent, but has not yet been waited for by
599 614 the parent, is marked \fB<defunct>\fR\&.
600 615 .SS "\fB-o\fR format"
601 616 .sp
602 617 .LP
603 618 The \fB-o\fR option allows the output format to be specified under user
604 619 control.
↓ open down ↓ |
187 lines elided |
↑ open up ↑ |
605 620 .sp
606 621 .LP
607 622 The format specification must be a list of names presented as a single
608 623 argument, blank- or comma-separated. Each variable has a default header. The
609 624 default header can be overridden by appending an equals sign and the new text
610 625 of the header. The rest of the characters in the argument is used as the header
611 626 text. The fields specified are written in the order specified on the command
612 627 line, and should be arranged in columns in the output. The field widths are
613 628 selected by the system to be at least as wide as the header text (default or
614 629 overridden value). If the header text is null, such as \fB-o\fR \fIuser=,\fR
615 -the field width is at least as wide as the default header text. If all header
616 -text fields are null, no header line is written.
630 +the field width is at least as wide as the default header text.
631 +Long names are not truncated in this mode.
632 +If all header text fields are null, no header line is written.
617 633 .sp
618 634 .LP
619 635 The following names are recognized in the POSIX locale:
620 636 .sp
621 637 .ne 2
622 638 .na
623 639 \fB\fBuser\fR\fR
624 640 .ad
625 641 .RS 10n
626 642 The effective user \fBID\fR of the process. This is the textual user \fBID\fR,
627 643 if it can be obtained and the field width permits, or a decimal representation
628 644 otherwise.
629 645 .RE
630 646
631 647 .sp
632 648 .ne 2
633 649 .na
634 650 \fB\fBruser\fR\fR
635 651 .ad
636 652 .RS 10n
637 653 The real user \fBID\fR of the process. This is the textual user \fBID\fR, if it
638 654 can be obtained and the field width permits, or a decimal representation
639 655 otherwise.
640 656 .RE
641 657
642 658 .sp
643 659 .ne 2
644 660 .na
645 661 \fB\fBgroup\fR\fR
646 662 .ad
647 663 .RS 10n
648 664 The effective group \fBID\fR of the process. This is the textual group
649 665 \fBID,\fR if it can be obtained and the field width permits, or a decimal
650 666 representation otherwise.
651 667 .RE
652 668
653 669 .sp
654 670 .ne 2
655 671 .na
656 672 \fB\fBrgroup\fR\fR
657 673 .ad
658 674 .RS 10n
659 675 The real group \fBID\fR of the process. This is the textual group \fBID,\fR if
660 676 it can be obtained and the field width permits, or a decimal representation
661 677 otherwise.
662 678 .RE
663 679
664 680 .sp
665 681 .ne 2
666 682 .na
667 683 \fB\fBpid\fR\fR
668 684 .ad
669 685 .RS 10n
670 686 The decimal value of the process \fBID\fR.
671 687 .RE
672 688
673 689 .sp
674 690 .ne 2
675 691 .na
676 692 \fB\fBppid\fR\fR
677 693 .ad
678 694 .RS 10n
679 695 The decimal value of the parent process \fBID\fR.
680 696 .RE
681 697
682 698 .sp
683 699 .ne 2
684 700 .na
685 701 \fB\fBpgid\fR\fR
686 702 .ad
687 703 .RS 10n
688 704 The decimal value of the process group \fBID.\fR
689 705 .RE
690 706
691 707 .sp
692 708 .ne 2
693 709 .na
694 710 \fB\fBpcpu\fR\fR
695 711 .ad
696 712 .RS 10n
697 713 The ratio of CPU time used recently to CPU time available in the same period,
698 714 expressed as a percentage. The meaning of ``recently'' in this context is
699 715 unspecified. The CPU time available is determined in an unspecified manner.
700 716 .RE
701 717
702 718 .sp
703 719 .ne 2
704 720 .na
705 721 \fB\fBvsz\fR\fR
706 722 .ad
707 723 .RS 10n
708 724 The total size of the process in virtual memory, in kilobytes.
709 725 .RE
710 726
711 727 .sp
712 728 .ne 2
713 729 .na
714 730 \fB\fBnice\fR\fR
715 731 .ad
716 732 .RS 10n
717 733 The decimal value of the system scheduling priority of the process. See
718 734 \fBnice\fR(1).
719 735 .RE
720 736
721 737 .sp
722 738 .ne 2
723 739 .na
724 740 \fB\fBetime\fR\fR
725 741 .ad
726 742 .RS 10n
727 743 In the POSIX locale, the elapsed time since the process was started, in the
728 744 form:
729 745 .sp
730 746 \fB[[\fR\fIdd\fR-\fB]\fR\fIhh\fR:\fB]\fR\fImm\fR:\fIss\fR
731 747 .sp
732 748 where
733 749 .sp
734 750 .ne 2
735 751 .na
736 752 \fB\fIdd\fR\fR
737 753 .ad
738 754 .RS 6n
739 755 is the number of days
740 756 .RE
741 757
742 758 .sp
743 759 .ne 2
744 760 .na
745 761 \fB\fIhh\fR\fR
746 762 .ad
747 763 .RS 6n
748 764 is the number of hours
749 765 .RE
750 766
751 767 .sp
752 768 .ne 2
753 769 .na
754 770 \fB\fImm\fR\fR
755 771 .ad
756 772 .RS 6n
757 773 is the number of minutes
758 774 .RE
759 775
760 776 .sp
761 777 .ne 2
762 778 .na
763 779 \fB\fIss\fR\fR
764 780 .ad
765 781 .RS 6n
766 782 is the number of seconds
767 783 .RE
768 784
769 785 The \fIdd\fR field is a decimal integer. The \fIhh\fR, \fImm\fR and \fIss\fR
770 786 fields is two-digit decimal integers padded on the left with zeros.
771 787 .RE
772 788
773 789 .sp
774 790 .ne 2
775 791 .na
776 792 \fB\fBtime\fR\fR
777 793 .ad
778 794 .RS 10n
779 795 In the POSIX locale, the cumulative CPU time of the process in the form:
780 796 .sp
781 797 \fB[\fR\fIdd\fR-\fB]\fR\fIhh\fR:\fImm\fR:\fIss\fR
782 798 .sp
783 799 The \fIdd\fR, \fIhh\fR, \fImm\fR, and \fIss\fR fields is as described in the
784 800 \fBetime\fR specifier.
785 801 .RE
786 802
787 803 .sp
788 804 .ne 2
789 805 .na
790 806 \fB\fBtty\fR\fR
791 807 .ad
792 808 .RS 10n
793 809 The name of the controlling terminal of the process (if any) in the same format
794 810 used by the \fBwho\fR(1) command.
795 811 .RE
796 812
797 813 .sp
798 814 .ne 2
799 815 .na
800 816 \fB\fBcomm\fR\fR
801 817 .ad
802 818 .RS 10n
803 819 The name of the command being executed (\fBargv[0]\fR value) as a string.
804 820 .RE
805 821
806 822 .sp
807 823 .ne 2
808 824 .na
809 825 \fB\fBargs\fR\fR
810 826 .ad
811 827 .RS 10n
812 828 The command with all its arguments as a string. The implementation might
813 829 truncate this value to the field width; it is implementation-dependent whether
814 830 any further truncation occurs. It is unspecified whether the string represented
815 831 is a version of the argument list as it was passed to the command when it
816 832 started, or is a version of the arguments as they might have been modified by
817 833 the application. Applications cannot depend on being able to modify their
818 834 argument list and having that modification be reflected in the output of
819 835 \fBps\fR. The Solaris implementation limits the string to 80 bytes; the string
820 836 is the version of the argument list as it was passed to the command when it
821 837 started.
822 838 .RE
823 839
824 840 .sp
825 841 .LP
826 842 The following names are recognized in the Solaris implementation:
827 843 .sp
828 844 .ne 2
829 845 .na
830 846 \fB\fBf\fR\fR
831 847 .ad
832 848 .RS 11n
833 849 Flags (hexadecimal and additive) associated with the process.
834 850 .RE
835 851
836 852 .sp
837 853 .ne 2
838 854 .na
839 855 \fB\fBs\fR\fR
840 856 .ad
841 857 .RS 11n
842 858 The state of the process.
843 859 .RE
844 860
845 861 .sp
846 862 .ne 2
847 863 .na
848 864 \fB\fBc\fR\fR
849 865 .ad
850 866 .RS 11n
851 867 Processor utilization for scheduling (obsolete).
852 868 .RE
853 869
854 870 .sp
855 871 .ne 2
856 872 .na
857 873 \fB\fBuid\fR\fR
858 874 .ad
859 875 .RS 11n
860 876 The effective user \fBID\fR number of the process as a decimal integer.
861 877 .RE
862 878
863 879 .sp
864 880 .ne 2
865 881 .na
866 882 \fB\fBruid\fR\fR
867 883 .ad
868 884 .RS 11n
869 885 The real user \fBID\fR number of the process as a decimal integer.
870 886 .RE
871 887
872 888 .sp
873 889 .ne 2
874 890 .na
875 891 \fB\fBgid\fR\fR
876 892 .ad
877 893 .RS 11n
878 894 The effective group \fBID\fR number of the process as a decimal integer.
879 895 .RE
880 896
881 897 .sp
882 898 .ne 2
883 899 .na
884 900 \fB\fBrgid\fR\fR
885 901 .ad
886 902 .RS 11n
887 903 The real group \fBID\fR number of the process as a decimal integer.
888 904 .RE
889 905
890 906 .sp
891 907 .ne 2
892 908 .na
893 909 \fB\fBprojid\fR\fR
894 910 .ad
895 911 .RS 11n
896 912 The project \fBID\fR number of the process as a decimal integer.
897 913 .RE
898 914
899 915 .sp
900 916 .ne 2
901 917 .na
902 918 \fB\fBproject\fR\fR
903 919 .ad
904 920 .RS 11n
905 921 The project \fBID\fR of the process as a textual value if that value can be
906 922 obtained; otherwise, as a decimal integer.
907 923 .RE
908 924
909 925 .sp
910 926 .ne 2
911 927 .na
912 928 \fB\fBzoneid\fR\fR
913 929 .ad
914 930 .RS 11n
915 931 The zone \fBID\fR number of the process as a decimal integer.
916 932 .RE
917 933
918 934 .sp
919 935 .ne 2
920 936 .na
921 937 \fB\fBzone\fR\fR
922 938 .ad
923 939 .RS 11n
924 940 The zone \fBID\fR of the process as a textual value if that value can be
925 941 obtained; otherwise, as a decimal integer.
926 942 .RE
927 943
928 944 .sp
929 945 .ne 2
930 946 .na
931 947 \fB\fBsid\fR\fR
932 948 .ad
933 949 .RS 11n
934 950 The process ID of the session leader.
935 951 .RE
936 952
937 953 .sp
938 954 .ne 2
939 955 .na
940 956 \fB\fBtaskid\fR\fR
941 957 .ad
942 958 .RS 11n
943 959 The task \fBID\fR of the process.
944 960 .RE
945 961
946 962 .sp
947 963 .ne 2
948 964 .na
949 965 \fB\fBclass\fR\fR
950 966 .ad
951 967 .RS 11n
952 968 The scheduling class of the process.
953 969 .RE
954 970
955 971 .sp
956 972 .ne 2
957 973 .na
958 974 \fB\fBpri\fR\fR
959 975 .ad
960 976 .RS 11n
961 977 The priority of the process. Higher numbers mean higher priority.
962 978 .RE
963 979
964 980 .sp
965 981 .ne 2
966 982 .na
967 983 \fB\fBopri\fR\fR
968 984 .ad
969 985 .RS 11n
970 986 The obsolete priority of the process. Lower numbers mean higher priority.
971 987 .RE
972 988
973 989 .sp
974 990 .ne 2
975 991 .na
976 992 \fB\fBlwp\fR\fR
977 993 .ad
978 994 .RS 11n
979 995 The decimal value of the lwp \fBID\fR. Requesting this formatting option causes
980 996 one line to be printed for each lwp in the process.
981 997 .RE
982 998
983 999 .sp
984 1000 .ne 2
985 1001 .na
986 1002 \fB\fBnlwp\fR\fR
987 1003 .ad
988 1004 .RS 11n
989 1005 The number of lwps in the process.
990 1006 .RE
991 1007
992 1008 .sp
993 1009 .ne 2
994 1010 .na
995 1011 \fB\fBpsr\fR\fR
996 1012 .ad
997 1013 .RS 11n
998 1014 The number of the processor to which the process or lwp is bound.
999 1015 .RE
1000 1016
1001 1017 .sp
1002 1018 .ne 2
1003 1019 .na
1004 1020 \fB\fBpset\fR\fR
1005 1021 .ad
1006 1022 .RS 11n
1007 1023 The \fBID\fR of the processor set to which the process or lwp is bound.
1008 1024 .RE
1009 1025
1010 1026 .sp
1011 1027 .ne 2
1012 1028 .na
1013 1029 \fB\fBaddr\fR\fR
1014 1030 .ad
1015 1031 .RS 11n
1016 1032 The memory address of the process.
1017 1033 .RE
1018 1034
1019 1035 .sp
1020 1036 .ne 2
1021 1037 .na
1022 1038 \fB\fBosz\fR\fR
1023 1039 .ad
1024 1040 .RS 11n
1025 1041 The total size of the process in virtual memory, in pages.
1026 1042 .RE
1027 1043
1028 1044 .sp
1029 1045 .ne 2
1030 1046 .na
1031 1047 \fB\fBwchan\fR\fR
1032 1048 .ad
1033 1049 .RS 11n
1034 1050 The address of an event for which the process is sleeping (if \(mi, the process
1035 1051 is running).
1036 1052 .RE
1037 1053
1038 1054 .sp
1039 1055 .ne 2
1040 1056 .na
1041 1057 \fB\fBstime\fR\fR
1042 1058 .ad
1043 1059 .RS 11n
1044 1060 The starting time or date of the process, printed with no blanks.
1045 1061 .RE
1046 1062
1047 1063 .sp
1048 1064 .ne 2
1049 1065 .na
1050 1066 \fB\fBrss\fR\fR
1051 1067 .ad
1052 1068 .RS 11n
1053 1069 The resident set size of the process, in kilobytes. The \fBrss\fR value
1054 1070 reported by \fBps\fR is an estimate provided by \fBproc\fR(4) that might
1055 1071 underestimate the actual resident set size. Users who wish to get more accurate
1056 1072 usage information for capacity planning should use \fBpmap\fR(1) \fB-x\fR
1057 1073 instead.
1058 1074 .RE
1059 1075
1060 1076 .sp
1061 1077 .ne 2
1062 1078 .na
1063 1079 \fB\fBpmem\fR\fR
1064 1080 .ad
1065 1081 .RS 11n
1066 1082 The ratio of the process's resident set size to the physical memory on the
1067 1083 machine, expressed as a percentage.
1068 1084 .RE
1069 1085
1070 1086 .sp
1071 1087 .ne 2
1072 1088 .na
1073 1089 \fB\fBfname\fR\fR
1074 1090 .ad
1075 1091 .RS 11n
1076 1092 The first 8 bytes of the base name of the process's executable file.
1077 1093 .RE
1078 1094
1079 1095 .sp
1080 1096 .ne 2
1081 1097 .na
1082 1098 \fB\fBctid\fR\fR
1083 1099 .ad
1084 1100 .RS 11n
1085 1101 The contract ID of the process contract the process is a member of as a decimal
1086 1102 integer.
1087 1103 .RE
1088 1104
1089 1105 .sp
1090 1106 .ne 2
1091 1107 .na
1092 1108 \fB\fBlgrp\fR\fR
1093 1109 .ad
1094 1110 .RS 11n
1095 1111 The home lgroup of the process.
1096 1112 .RE
1097 1113
1098 1114 .sp
1099 1115 .ne 2
1100 1116 .na
1101 1117 \fB\fBdmodel\fR\fR
1102 1118 .ad
1103 1119 .RS 11n
1104 1120 The data model of the process, printed in the same manner as via
1105 1121 \fBpflags\fR(1). The currently supported data models are _ILP32 and _LP64.
1106 1122 .RE
1107 1123
1108 1124 .sp
1109 1125 .LP
1110 1126 Only \fBcomm\fR and \fBargs\fR are allowed to contain blank characters; all
1111 1127 others, including the Solaris implementation variables, are not.
1112 1128 .sp
1113 1129 .LP
1114 1130 The following table specifies the default header to be used in the POSIX locale
1115 1131 corresponding to each format specifier.
1116 1132 .sp
1117 1133
1118 1134 .sp
1119 1135 .TS
1120 1136 box;
1121 1137 c c c c
1122 1138 c c c c .
1123 1139 Format Default Format Default
1124 1140 Specifier Header Specifier Header
1125 1141 _
1126 1142 args COMMAND ppid PPID
1127 1143 comm COMMAND rgroup RGROUP
1128 1144 etime ELAPSED ruser RUSER
1129 1145 group GROUP time TIME
1130 1146 nice NI tty TT
1131 1147 pcpu %CPU user USER
1132 1148 pgid PGID vsz VSZ
1133 1149 pid PID
1134 1150 .TE
1135 1151
1136 1152 .sp
1137 1153 .LP
1138 1154 The following table lists the Solaris implementation format specifiers and the
1139 1155 default header used with each.
1140 1156 .sp
1141 1157
1142 1158 .sp
1143 1159 .TS
1144 1160 box;
1145 1161 c c c c
1146 1162 c c c c .
1147 1163 Format Default Format Default
1148 1164 Specifier Header Specifier Header
1149 1165 _
1150 1166 addr ADDR projid PROJID
1151 1167 c C project PROJECT
1152 1168 class CLS psr PSR
1153 1169 f F rgid RGID
1154 1170 fname COMMAND rss RSS
1155 1171 gid GID ruid RUID
1156 1172 lgrp LGRP s S
1157 1173 lwp LWP sid SID
1158 1174 nlwp NLWP stime STIME
1159 1175 opri PRI taskid TASKID
1160 1176 osz SZ uid UID
1161 1177 pmem %MEM wchan WCHAN
1162 1178 pri PRI zone ZONE
1163 1179 ctid CTID zoneid ZONEID
1164 1180 .TE
1165 1181
1166 1182 .SH EXAMPLES
1167 1183 .LP
1168 1184 \fBExample 1 \fRUsing \fBps\fR Command
1169 1185 .sp
1170 1186 .LP
1171 1187 The command:
1172 1188
1173 1189 .sp
1174 1190 .in +2
1175 1191 .nf
1176 1192 example% \fBps -o user,pid,ppid=MOM -o args\fR
1177 1193 .fi
1178 1194 .in -2
1179 1195 .sp
1180 1196
1181 1197 .sp
1182 1198 .LP
1183 1199 writes the following in the POSIX locale:
1184 1200
1185 1201 .sp
1186 1202 .in +2
1187 1203 .nf
1188 1204 USER PID MOM COMMAND
1189 1205 helene 34 12 ps -o uid,pid,ppid=MOM -o args
1190 1206 .fi
1191 1207 .in -2
1192 1208 .sp
1193 1209
1194 1210 .sp
1195 1211 .LP
1196 1212 The contents of the \fBCOMMAND\fR field need not be the same due to possible
1197 1213 truncation.
1198 1214
1199 1215 .SH ENVIRONMENT VARIABLES
1200 1216 .sp
1201 1217 .LP
1202 1218 See \fBenviron\fR(5) for descriptions of the following environment variables
1203 1219 that affect the execution of \fBps\fR: \fBLANG\fR, \fBLC_ALL\fR,
1204 1220 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, and \fBNLSPATH\fR.
1205 1221 .sp
1206 1222 .ne 2
1207 1223 .na
1208 1224 \fB\fBCOLUMNS\fR\fR
1209 1225 .ad
1210 1226 .RS 11n
1211 1227 Override the system-selected horizontal screen size, used to determine the
1212 1228 number of text columns to display.
1213 1229 .RE
1214 1230
1215 1231 .SH EXIT STATUS
1216 1232 .sp
1217 1233 .LP
1218 1234 The following exit values are returned:
1219 1235 .sp
1220 1236 .ne 2
1221 1237 .na
1222 1238 \fB\fB0\fR\fR
1223 1239 .ad
1224 1240 .RS 6n
1225 1241 Successful completion.
1226 1242 .RE
1227 1243
1228 1244 .sp
1229 1245 .ne 2
1230 1246 .na
1231 1247 \fB\fB>0\fR\fR
1232 1248 .ad
1233 1249 .RS 6n
1234 1250 An error occurred.
1235 1251 .RE
1236 1252
1237 1253 .SH FILES
1238 1254 .sp
1239 1255 .ne 2
1240 1256 .na
1241 1257 \fB\fB/dev/pts/*\fR\fR
1242 1258 .ad
1243 1259 .RS 15n
1244 1260
1245 1261 .RE
1246 1262
1247 1263 .sp
1248 1264 .ne 2
1249 1265 .na
1250 1266 \fB\fB/dev/term/*\fR\fR
1251 1267 .ad
1252 1268 .RS 15n
1253 1269 terminal (``tty'') names searcher files
1254 1270 .RE
1255 1271
1256 1272 .sp
1257 1273 .ne 2
1258 1274 .na
1259 1275 \fB\fB/etc/passwd\fR\fR
1260 1276 .ad
1261 1277 .RS 15n
1262 1278 \fBUID\fR information supplier
1263 1279 .RE
1264 1280
1265 1281 .sp
1266 1282 .ne 2
1267 1283 .na
1268 1284 \fB\fB/proc/*\fR\fR
1269 1285 .ad
1270 1286 .RS 15n
1271 1287 process control files
1272 1288 .RE
1273 1289
1274 1290 .SH ATTRIBUTES
1275 1291 .sp
1276 1292 .LP
1277 1293 See \fBattributes\fR(5) for descriptions of the following attributes:
1278 1294 .sp
1279 1295
1280 1296 .sp
1281 1297 .TS
1282 1298 box;
1283 1299 c | c
1284 1300 l | l .
1285 1301 ATTRIBUTE TYPE ATTRIBUTE VALUE
1286 1302 _
1287 1303 CSI Enabled (see USAGE)
1288 1304 _
1289 1305 Interface Stability Committed
1290 1306 _
1291 1307 Standard See \fBstandards\fR(5).
1292 1308 .TE
1293 1309
1294 1310 .SH SEE ALSO
1295 1311 .sp
1296 1312 .LP
1297 1313 \fBkill\fR(1), \fBlgrpinfo\fR(1), \fBnice\fR(1), \fBpagesize\fR(1),
1298 1314 \fBpmap\fR(1), \fBpriocntl\fR(1), \fBwho\fR(1), \fBgetty\fR(1M), \fBproc\fR(4),
1299 1315 \fBttysrch\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
1300 1316 \fBresource_controls\fR(5), \fBstandards\fR(5), \fBzones\fR(5)
1301 1317 .SH NOTES
1302 1318 .sp
1303 1319 .LP
1304 1320 Things can change while \fBps\fR is running. The snapshot it gives is true only
1305 1321 for a split-second, and it might not be accurate by the time you see it. Some
1306 1322 data printed for defunct processes is irrelevant.
1307 1323 .sp
1308 1324 .LP
1309 1325 If no options to select processes are specified, \fBps\fR reports all processes
1310 1326 associated with the controlling terminal. If there is no controlling terminal,
1311 1327 there is no report other than the header.
1312 1328 .sp
1313 1329 .LP
1314 1330 \fBps\fR \fB-ef\fR or \fBps\fR \fB-o\fR \fBstime\fR might not report the actual
1315 1331 start of a tty login session, but rather an earlier time, when a getty was last
1316 1332 respawned on the tty line.
1317 1333 .sp
1318 1334 .LP
1319 1335 \fBps\fR is \fBCSI\fR-enabled except for login names (usernames).
↓ open down ↓ |
693 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX