8158 Want named threads API
[unleashed.git] / usr / src / man / man1 / ps.1
blob3c838729fdf69ad6aaaec9be1fcb91e545d7464a
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) 2018, Joyent, Inc.
48 .\"
49 .TH PS 1 "August 22, 2018"
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
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
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
98 .sp
99 .ne 2
101 \fB\fB-c\fR\fR
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.
110 .ne 2
112 \fB\fB-d\fR\fR
114 .RS 15n
115 Lists information about all processes except session leaders.
119 .ne 2
121 \fB\fB-e\fR\fR
123 .RS 15n
124 Lists information about \fBe\fRvery process now running.
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.
132 .ne 2
134 \fB\fB-f\fR\fR
136 .RS 15n
137 Generates a \fBf\fRull listing. (See below for significance of columns in a
138 full listing.)
142 .ne 2
144 \fB\fB-g\fR \fIgrplist\fR\fR
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.)
151 This option is ignored when the \fB-e\fR option is also specified.
155 .ne 2
157 \fB\fB-G\fR \fIgidlist\fR\fR
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.
164 This option is ignored when the \fB-e\fR option is also specified.
168 .ne 2
170 \fB\fB-h\fR \fIlgrplist\fR\fR
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.
176 This option is ignored when the \fB-e\fR option is also specified.
180 .ne 2
182 \fB\fB-H\fR\fR
184 .RS 15n
185 Prints the home lgroup of the process under an additional column header, LGRP.
189 .ne 2
191 \fB\fB-j\fR\fR
193 .RS 15n
194 Prints session \fBID\fR and process group \fBID\fR.
198 .ne 2
200 \fB\fB-l\fR\fR
202 .RS 15n
203 Generates a \fBl\fRong listing. (See below.)
207 .ne 2
209 \fB\fB-L\fR\fR
211 .RS 15n
212 Prints information about each light weight process (\fIlwp\fR) in each selected
213 process. (See below.)
217 .ne 2
219 \fB\fB-n\fR \fInamelist\fR\fR
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.
227 .ne 2
229 \fB\fB-o\fR \fIformat\fR\fR
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.
240 .ne 2
242 \fB\fB-p\fR \fIproclist\fR\fR
244 .RS 15n
245 Lists only process data whose process \fBID\fR numbers are given in
246 \fIproclist\fR.
248 This option is ignored when the \fB-e\fR option is also specified.
252 .ne 2
254 \fB\fB-P\fR\fR
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.
262 .ne 2
264 \fB\fB-s\fR \fIsidlist\fR\fR
266 .RS 15n
267 Lists information on all session leaders whose \fBID\fRs appear in
268 \fIsidlist\fR.
270 This option is ignored when the \fB-e\fR option is also specified.
274 .ne 2
276 \fB\fB-t\fR \fIterm\fR\fR
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.
283 This option is ignored when the \fB-e\fR option is also specified.
287 .ne 2
289 \fB\fB-u\fR \fIuidlist\fR\fR
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.
296 This option is ignored when the \fB-e\fR option is also specified.
300 .ne 2
302 \fB\fB-U\fR \fIuidlist\fR\fR
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.
309 This option is ignored when the \fB-e\fR option is also specified.
313 .ne 2
315 \fB\fB-W\fR\fR
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.
325 .ne 2
327 \fB\fB-y\fR\fR
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.
337 .ne 2
339 \fB\fB-z\fR \fIzonelist\fR\fR
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.
345 This option is ignored when the \fB-e\fR option is also specified.
349 .ne 2
351 \fB\fB-Z\fR\fR
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
359 .in +2
361 ps -eo zone,uid,pid,ppid,time,comm,...
363 .in -2
366 to see zone names wider than 8 characters.
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
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.
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.
389 .ne 2
391 \fB\fBF\fR(l)\fR
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.
400 .ne 2
402 \fB\fBS\fR (l)\fR
404 .RS 14n
405 The state of the process:
407 .ne 2
409 \fBO\fR
411 .RS 5n
412 Process is running on a processor.
416 .ne 2
418 \fBS\fR
420 .RS 5n
421 Sleeping: process is waiting for an event to complete.
425 .ne 2
427 \fBR\fR
429 .RS 5n
430 Runnable: process is on run queue.
434 .ne 2
436 \fBT\fR
438 .RS 5n
439 Process is stopped, either by a job control signal or because it is being
440 traced.
444 .ne 2
446 \fBW\fR
448 .RS 5n
449 Waiting: process is waiting for CPU usage to drop to the CPU-caps enforced
450 limits.
454 .ne 2
456 \fBZ\fR
458 .RS 5n
459 Zombie state: process terminated and parent not waiting.
465 .ne 2
467 \fB\fBUID\fR (f,l)\fR
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.
477 .ne 2
479 \fB\fBPID\fR(all)\fR
481 .RS 14n
482 The process \fBID\fR of the process (this datum is necessary in order to kill a
483 process).
487 .ne 2
489 \fB\fBPPID\fR(f,l)\fR
491 .RS 14n
492 The process \fBID\fR of the parent process.
496 .ne 2
498 \fB\fBC\fR(f,l)\fR
500 .RS 14n
501 Processor utilization for scheduling (obsolete). Not printed when the \fB-c\fR
502 option is used.
506 .ne 2
508 \fB\fBCLS\fR(f,l)\fR
510 .RS 14n
511 Scheduling class. Printed only when the \fB-c\fR option is used.
515 .ne 2
517 \fB\fBPRI\fR(l)\fR
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.
525 .ne 2
527 \fB\fBNI\fR(l)\fR
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.
535 .ne 2
537 \fB\fBADDR\fR(l)\fR
539 .RS 14n
540 The memory address of the process.
544 .ne 2
546 \fB\fBSZ\fR(l)\fR
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).
554 .ne 2
556 \fB\fBWCHAN\fR(l)\fR
558 .RS 14n
559 The address of an event for which the process is sleeping (if blank, the
560 process is running).
564 .ne 2
566 \fB\fBSTIME\fR(f)\fR
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.)
575 .ne 2
577 \fB\fBTTY\fR(all)\fR
579 .RS 14n
580 The controlling terminal for the process (the message, \fB?\fR, is printed when
581 there is no controlling terminal).
585 .ne 2
587 \fB\fBTIME\fR(all)\fR
589 .RS 14n
590 The cumulative execution time for the process.
594 .ne 2
596 \fB\fBLTIME\fR(all)\fR
598 .RS 14n
599 The execution time for the lwp being reported.
603 .ne 2
605 \fB\fBCMD\fR(all)\fR
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).
614 The following two additional columns are printed when the \fB-j\fR option is
615 specified:
617 .ne 2
619 \fB\fBPGID\fR\fR
621 .RS 8n
622 The process ID of the process group leader.
626 .ne 2
628 \fB\fBSID\fR\fR
630 .RS 8n
631 The process ID of the session leader.
636 The following two additional columns are printed when the \fB-L\fR option is
637 specified:
639 .ne 2
641 \fB\fBLWP\fR\fR
643 .RS 8n
644 The lwp ID of the lwp being reported.
648 .ne 2
650 \fB\fBNLWP\fR\fR
652 .RS 8n
653 The number of lwps in the process (if \fB-f\fR is also specified).
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.
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"
668 The \fB-o\fR option allows the output format to be specified under user
669 control.
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.
685 The following names are recognized in the POSIX locale:
687 .ne 2
689 \fB\fBuser\fR\fR
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.
698 .ne 2
700 \fB\fBruser\fR\fR
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.
709 .ne 2
711 \fB\fBgroup\fR\fR
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.
720 .ne 2
722 \fB\fBrgroup\fR\fR
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.
731 .ne 2
733 \fB\fBpid\fR\fR
735 .RS 10n
736 The decimal value of the process \fBID\fR.
740 .ne 2
742 \fB\fBppid\fR\fR
744 .RS 10n
745 The decimal value of the parent process \fBID\fR.
749 .ne 2
751 \fB\fBpgid\fR\fR
753 .RS 10n
754 The decimal value of the process group \fBID.\fR
758 .ne 2
760 \fB\fBpcpu\fR\fR
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.
769 .ne 2
771 \fB\fBvsz\fR\fR
773 .RS 10n
774 The total size of the process in virtual memory, in kilobytes.
778 .ne 2
780 \fB\fBnice\fR\fR
782 .RS 10n
783 The decimal value of the system scheduling priority of the process. See
784 \fBnice\fR(1).
788 .ne 2
790 \fB\fBetime\fR\fR
792 .RS 10n
793 In the POSIX locale, the elapsed time since the process was started, in the
794 form:
796 \fB[[\fR\fIdd\fR-\fB]\fR\fIhh\fR:\fB]\fR\fImm\fR:\fIss\fR
798 where
800 .ne 2
802 \fB\fIdd\fR\fR
804 .RS 6n
805 is the number of days
809 .ne 2
811 \fB\fIhh\fR\fR
813 .RS 6n
814 is the number of hours
818 .ne 2
820 \fB\fImm\fR\fR
822 .RS 6n
823 is the number of minutes
827 .ne 2
829 \fB\fIss\fR\fR
831 .RS 6n
832 is the number of seconds
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.
840 .ne 2
842 \fB\fBtime\fR\fR
844 .RS 10n
845 In the POSIX locale, the cumulative CPU time of the process in the form:
847 \fB[\fR\fIdd\fR-\fB]\fR\fIhh\fR:\fImm\fR:\fIss\fR
849 The \fIdd\fR, \fIhh\fR, \fImm\fR, and \fIss\fR fields is as described in the
850 \fBetime\fR specifier.
854 .ne 2
856 \fB\fBtty\fR\fR
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.
864 .ne 2
866 \fB\fBcomm\fR\fR
868 .RS 10n
869 The name of the command being executed (\fBargv[0]\fR value) as a string.
873 .ne 2
875 \fB\fBargs\fR\fR
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 illumos 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.
892 The following names are recognized in the illumos implementation:
894 .ne 2
896 \fB\fBf\fR\fR
898 .RS 11n
899 Flags (hexadecimal and additive) associated with the process.
903 .ne 2
905 \fB\fBs\fR\fR
907 .RS 11n
908 The state of the process.
912 .ne 2
914 \fB\fBc\fR\fR
916 .RS 11n
917 Processor utilization for scheduling (obsolete).
921 .ne 2
923 \fB\fBuid\fR\fR
925 .RS 11n
926 The effective user \fBID\fR number of the process as a decimal integer.
930 .ne 2
932 \fB\fBruid\fR\fR
934 .RS 11n
935 The real user \fBID\fR number of the process as a decimal integer.
939 .ne 2
941 \fB\fBgid\fR\fR
943 .RS 11n
944 The effective group \fBID\fR number of the process as a decimal integer.
948 .ne 2
950 \fB\fBrgid\fR\fR
952 .RS 11n
953 The real group \fBID\fR number of the process as a decimal integer.
957 .ne 2
959 \fB\fBprojid\fR\fR
961 .RS 11n
962 The project \fBID\fR number of the process as a decimal integer.
966 .ne 2
968 \fB\fBproject\fR\fR
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.
976 .ne 2
978 \fB\fBzoneid\fR\fR
980 .RS 11n
981 The zone \fBID\fR number of the process as a decimal integer.
985 .ne 2
987 \fB\fBzone\fR\fR
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.
995 .ne 2
997 \fB\fBsid\fR\fR
999 .RS 11n
1000 The process ID of the session leader.
1004 .ne 2
1006 \fB\fBtaskid\fR\fR
1008 .RS 11n
1009 The task \fBID\fR of the process.
1013 .ne 2
1015 \fB\fBclass\fR\fR
1017 .RS 11n
1018 The scheduling class of the process.
1022 .ne 2
1024 \fB\fBpri\fR\fR
1026 .RS 11n
1027 The priority of the process. Higher numbers mean higher priority.
1031 .ne 2
1033 \fB\fBopri\fR\fR
1035 .RS 11n
1036 The obsolete priority of the process. Lower numbers mean higher priority.
1040 .ne 2
1042 \fB\fBlwp\fR\fR
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.
1050 .ne 2
1052 \fB\fBlwpname\fR\fR
1054 .RS 11n
1055 The name of the lwp, if set. Requesting this formatting option causes
1056 one line to be printed for each lwp in the process.
1060 .ne 2
1062 \fB\fBnlwp\fR\fR
1064 .RS 11n
1065 The number of lwps in the process.
1069 .ne 2
1071 \fB\fBpsr\fR\fR
1073 .RS 11n
1074 The number of the processor to which the process or lwp is bound.
1078 .ne 2
1080 \fB\fBpset\fR\fR
1082 .RS 11n
1083 The \fBID\fR of the processor set to which the process or lwp is bound.
1087 .ne 2
1089 \fB\fBaddr\fR\fR
1091 .RS 11n
1092 The memory address of the process.
1096 .ne 2
1098 \fB\fBosz\fR\fR
1100 .RS 11n
1101 The total size of the process in virtual memory, in pages.
1105 .ne 2
1107 \fB\fBwchan\fR\fR
1109 .RS 11n
1110 The address of an event for which the process is sleeping (if \(mi, the process
1111 is running).
1115 .ne 2
1117 \fB\fBstime\fR\fR
1119 .RS 11n
1120 The starting time or date of the process, printed with no blanks.
1124 .ne 2
1126 \fB\fBrss\fR\fR
1128 .RS 11n
1129 The resident set size of the process, in kilobytes. The \fBrss\fR value
1130 reported by \fBps\fR is an estimate provided by \fBproc\fR(4) that might
1131 underestimate the actual resident set size. Users who wish to get more accurate
1132 usage information for capacity planning should use \fBpmap\fR(1) \fB-x\fR
1133 instead.
1137 .ne 2
1139 \fB\fBpmem\fR\fR
1141 .RS 11n
1142 The ratio of the process's resident set size to the physical memory on the
1143 machine, expressed as a percentage.
1147 .ne 2
1149 \fB\fBfname\fR\fR
1151 .RS 11n
1152 The first 8 bytes of the base name of the process's executable file.
1156 .ne 2
1158 \fB\fBctid\fR\fR
1160 .RS 11n
1161 The contract ID of the process contract the process is a member of as a decimal
1162 integer.
1166 .ne 2
1168 \fB\fBlgrp\fR\fR
1170 .RS 11n
1171 The home lgroup of the process.
1175 .ne 2
1177 \fB\fBdmodel\fR\fR
1179 .RS 11n
1180 The data model of the process, printed in the same manner as via
1181 \fBpflags\fR(1). The currently supported data models are _ILP32 and _LP64.
1186 Only \fBcomm\fR, \fBlwpname\fR, and \fBargs\fR are allowed to contain blank
1187 characters; all others, including the illumos implementation variables, are not.
1190 The following table specifies the default header to be used in the POSIX locale
1191 corresponding to each format specifier.
1196 box;
1197 c c c c
1198 c c c c .
1199 Format  Default Format  Default
1200 Specifier       Header  Specifier       Header
1202 args    COMMAND ppid    PPID
1203 comm    COMMAND rgroup  RGROUP
1204 etime   ELAPSED ruser   RUSER
1205 group   GROUP   time    TIME
1206 nice    NI      tty     TT
1207 pcpu    %CPU    user    USER
1208 pgid    PGID    vsz     VSZ
1209 pid     PID
1214 The following table lists the illumos implementation format specifiers and the
1215 default header used with each.
1220 box;
1221 c c c c
1222 c c c c .
1223 Format  Default Format  Default
1224 Specifier       Header  Specifier       Header
1226 addr    ADDR    projid  PROJID
1227 c       C       project PROJECT
1228 class   CLS     psr     PSR
1229 f       F       rgid    RGID
1230 fname   COMMAND rss     RSS
1231 gid     GID     ruid    RUID
1232 lgrp    LGRP    s       S
1233 lwp     LWP     sid     SID
1234 lwpname LWPNAME stime   STIME
1235 nlwp    NLWP    taskid  TASKID
1236 opri    PRI     uid     UID
1237 osz     SZ      wchan   WCHAN
1238 pmem    %MEM    zone    ZONE
1239 pri     PRI     zoneid  ZONEID
1240 ctid    CTID
1243 .SH EXAMPLES
1245 \fBExample 1 \fRUsing \fBps\fR Command
1248 The command:
1251 .in +2
1253 example% \fBps -o user,pid,ppid=MOM -o args\fR
1255 .in -2
1260 writes the following in the POSIX locale:
1263 .in +2
1265  USER  PID   MOM   COMMAND
1266 helene  34    12   ps -o uid,pid,ppid=MOM -o args
1268 .in -2
1273 The contents of the \fBCOMMAND\fR field need not be the same due to possible
1274 truncation.
1276 .SH ENVIRONMENT VARIABLES
1278 See \fBenviron\fR(5) for descriptions of the following environment variables
1279 that affect the execution of \fBps\fR: \fBLANG\fR, \fBLC_ALL\fR,
1280 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, and \fBNLSPATH\fR.
1282 .ne 2
1284 \fB\fBCOLUMNS\fR\fR
1286 .RS 11n
1287 Override the system-selected horizontal screen size, used to determine the
1288 number of text columns to display.
1291 .SH EXIT STATUS
1293 The following exit values are returned:
1295 .ne 2
1297 \fB\fB0\fR\fR
1299 .RS 6n
1300 Successful completion.
1304 .ne 2
1306 \fB\fB>0\fR\fR
1308 .RS 6n
1309 An error occurred.
1312 .SH FILES
1313 .ne 2
1315 \fB\fB/dev/pts/*\fR\fR
1317 .RS 15n
1322 .ne 2
1324 \fB\fB/dev/term/*\fR\fR
1326 .RS 15n
1327 terminal (``tty'') names searcher files
1331 .ne 2
1333 \fB\fB/etc/passwd\fR\fR
1335 .RS 15n
1336 \fBUID\fR information supplier
1340 .ne 2
1342 \fB\fB/proc/*\fR\fR
1344 .RS 15n
1345 process control files
1348 .SH ATTRIBUTES
1350 See \fBattributes\fR(5) for descriptions of the following attributes:
1355 box;
1356 c | c
1357 l | l .
1358 ATTRIBUTE TYPE  ATTRIBUTE VALUE
1360 CSI     Enabled (see USAGE)
1362 Interface Stability     Committed
1364 Standard        See \fBstandards\fR(5).
1367 .SH SEE ALSO
1369 \fBkill\fR(1), \fBlgrpinfo\fR(1), \fBnice\fR(1), \fBpagesize\fR(1),
1370 \fBpmap\fR(1), \fBpriocntl\fR(1), \fBwho\fR(1), \fBgetty\fR(1M), \fBproc\fR(4),
1371 \fBttysrch\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
1372 \fBresource_controls\fR(5), \fBstandards\fR(5), \fBzones\fR(5)
1373 .SH NOTES
1375 Things can change while \fBps\fR is running. The snapshot it gives is true only
1376 for a split-second, and it might not be accurate by the time you see it. Some
1377 data printed for defunct processes is irrelevant.
1380 If no options to select processes are specified, \fBps\fR reports all processes
1381 associated with the controlling terminal. If there is no controlling terminal,
1382 there is no report other than the header.
1385 \fBps\fR \fB-ef\fR or \fBps\fR \fB-o\fR \fBstime\fR might not report the actual
1386 start of a tty login session, but rather an earlier time, when a getty was last
1387 respawned on the tty line.
1390 \fBps\fR is \fBCSI\fR-enabled except for login names (usernames).