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