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