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