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