Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, February 10, 2021
 
 

ps(1)

Name

ps - report process status

Synopsis

ps [–aAcdefHjlLPwWyZ] [–C cmdlist] [–g pgrplist|grouplist]
     [–h|–lgroup lgrplist] [–n namelist] [–o|–format format]…
     [–O format]… [–p|–pid proclist] [–pgid pgrplist]
     [–ppid proclist] [–s|–sid sidlist] [–t|–tty termlist]
     [–u|–user uidlist] [–U|–User uidlist]
     [–group gidlist] [–G|–Group gidlist] [–z zonelist]
     [–columns|–cols|–width columns] [–lines|–rows lines]
     [–headers] [–no-headers|–no-heading] [–human-readable]
     [--scale[=item1,,item2,...]] [–?|–help]
ps [–aceglnrSuUvwx] [
-t term] [num]

Description

The ps command prints information about active processes. Without options, ps prints information about processes that have the same effective user ID and the same controlling terminal as the invoker, and the output contains only the process ID, terminal identifier, cumulative execution time, and the command name. Otherwise, the information that is displayed is controlled by the options.

A number of options are provided to select the processes to list. If any of these options are specified, the processes listed are determined by the inclusive OR of processes selected by the specified options. When the –A or –e option is specified, other options to select processes by more selective criteria have no effect, and are unnecessary.

Some options accept lists as arguments. Items in a list can be either separated by commas or else enclosed in quotes and separated by commas or spaces. Repeated options are allowed. Each option adds additional items to the list. Values for lgrplist, proclist, pgrplist, and sidlist must be numeric.

Options

The following options are supported:

–a

List information about all processes most frequently requested: all those except session leaders and processes not associated with a terminal.

–A

List information for all processes.

–c

Print information in a format that reflects scheduler properties as described in priocntl(1) man page. The –c option affects the output of the –f and –l options, as described below.

–C cmdlist

List information for processes for which the name of the command is listed in cmdlist. Only reports processes for which the full base name of the command matches the given string. It does not perform substring matches or include path names. For more complex matching operations, see pgrep(1) and Example 4 below.

–d

List information about all processes except session leaders.

–e

List information about every process now running. Identical to –A, above, but less portable as only –A is specified by the POSIX standard.

–f

Generate a full listing. See DISPLAY FORMATS below.

–g pgrplist|grouplist

The –g option provides a hybrid of the –pgid and –group options, using heuristics to determine whether the argument refers to process groups or user groups. If all argument values are numeric, the behavior is that of –pgid, providing the traditional Solaris behavior of matching by process groups. If any argument value contains an alphabetic character, –g instead provides the behavior of the –group option, for compatibility with the behavior of ps on other platforms. Multiple instances of –g are allowed. The determination of which behavior to provide is made independently for each instance of the –g, and is applied to all values provided for that instance.

–group=gidlist

List information for processes whose effective group ID numbers are given by gidlist.

–G gidlist, –Group=gidlist

List information for processes whose real group ID numbers are given by gidlist.

–h lgrplist, –lgroup=lgrplist

List information for processes homed to the specified lgrplist. Nothing is listed for any invalid group specified in lgrplist.

–H

Print the home lgroup of the process under an additional column header, LGRP. This column can also be enabled by specifying the lgrp name with the –o or –O options.

–j

Print session ID and process group ID. These columns can also be enabled by specifying the pgid and sid names with the –o or –O options.

–l

Generate a long listing. See DISPLAY FORMATS below.

–L

Print information about each light weight process (lwp) in each selected process. See DISPLAY FORMATS below.

–n namelist

This option is accepted for compatibility, but is ignored.

–o format, –format=format

Format displayed information according to the format specification given by format. See DISPLAY FORMATS. Multiple –o or –format options can be specified; the format specification is interpreted as the space-character-separated concatenation of all the format option-arguments.

–O format

Identify additional fields to be added, removed, or modified from the default output. The format argument is the same as that accepted by the –o option. See DISPLAY FORMATS. Prepend the format specifier with a - character to remove that field rather than add it. In the case of a field already already present in the output format, the new header and width take precedence.

–p proclist, –pid=proclist

List information for processes whose process ID numbers are given by proclist.

–pgid=pgrplist

List information for processes with the group leader ID number(s) given by pgrplist. A group leader is a process whose process ID number is identical to its process group ID number.

–ppid=proclist

List information for processes with the parent process ID number(s) given by proclist.

–P

Print the number of the processor to which the process or lwp is bound, if any, under an additional column header, PSR. This column can also be enabled by specifying the psr name with the –o or –O options.

–s sidlist, –sid=sidlist

List information for processes whose session ID numbers are specified by sidlist.

–t term, –tty=term

List information for processes associated with term. Terminal identifiers are specified as a device file name, and an identifier. For example, term/a, or pts/0.

–u uidlist, –user=uidlist

List information for processes with the effective user ID number or login name given by uidlist.

–U uidlist, –User=uidlist

List information for processes with the real user ID numbers or login names given by uidlist.

–w

The –w option overrides output line length. Specify –w once to truncate lines at 132 characters of output. Specify –w two or more times to allow unlimited line length without truncation. See DISPLAY WIDTH.

–W

Reset the display column width to the default, overriding any preceding –w, –columns, –cols, or –width options. See DISPLAY WIDTH.

–y

Alter the long listing format displayed by the –l option to omit the obsolete F and ADDR columns, to include an RSS column to report the resident set size of the process in kilobytes, and to modify the SZ column to display in units of kilobytes rather than pages. See DISPLAY FORMATS.

–z zonelist

List information for processes in the specified zones. Zones can be specified either by name or ID. This option is only useful when executed in the global zone.

–Z

Print the name of the zone with which the process is associated under an additional column header, ZONE. The ZONE column width is limited to 8 characters. Use ps –eZ for a quick way to see information about every process now running along with the associated zone name. Use

ps -o zone,uid,pid,ppid,time,comm,...

to see zone names wider than 8 characters.

–columns=columns, –cols=columns, –width=columns

Specify the number of columns, overriding the COLUMNS environment variable. See DISPLAY WIDTH.

–headers

Display per-page headers. Page size is determined as follows, listed in order of priority.

  1. The last specified value of either a –lines or –rows option on the command line.

  2. The LINES environment variable.

  3. If output or input is a tty, the tty height.

–no-headers, –no-heading

Omit the column headers from the output.

–lines=lines, –rows=lines

Specify the number of rows per page of output, overriding the LINES environment variable. See the –headers option for details.

–human-readable

Print memory sizes scaled to a human readable format, instead of as raw numbers of pages or kilobytes. The –human-readable option is equivalent to using the –scale=max,1024 option.

–scale[=item1,item2,...]

Print memory sizes scaled to a human readable format, instead of as raw numbers of pages or kilobytes. For example, 14K, 234M, 2.7G, or 3.0T. Scaling is done by repetitively dividing the number of bytes by 1024, unless otherwise specified.

–scale specified without arguments enables default scaled output, and is equivalent to –scale=max,1024.

–scale can be specified with the following arguments.

binary

Scaling is done by repetitively dividing by a scale factor of 1024. The use of binary scaling is indicated by the addition of an 'i' modifer to the suffix (Ki, Mi, Gi, ...).

max

Values are scaled to the largest unit for which the result retains a non-zero integer part. Up to 2 decimal places of fractional output may be shown.

min

Values are scaled to the smallest unit capable of showing the full value within the allotted space of 5 columns, and displayed without the use of fractional output.

minwide

Values are scaled to the smallest unit capable of showing the full value within the allotted space of 8 columns, and displayed without the use of fractional output.

1000

Scaling is done by repetitively dividing by a scale factor of 1000.

1024

Scaling is done by repetitively dividing by a scale factor of 1024.

–?, –help

Print the usage synopsis and exit without doing anything else.

UCB options

Previous versions of Oracle Solaris provided an alternative ps command, /usr/ucb/ps, derived from BSD Unix. The UCB version of ps is no longer part of Oracle Solaris. Instead, the standard ps command provides an emulation of UCB ps behavior when the following UCB options are specified. The UCB options are not prefixed with a hyphen () character, distinguishing them from the standard options described previously. Standard and UCB options cannot be mixed in a single ps invocation.

–a

Includes information about processes owned by others.

–c

Displays the command name rather than the command arguments.

–e

Displays the environment as well as the arguments to the command.

–g

Displays all processes. Without this option, ps only prints interesting processes. Processes are deemed to be uninteresting if they are process group leaders. This normally eliminates top-level command interpreters and processes waiting for users to login on free terminals.

–l

Displays a long listing, with fields F, PPID, CP, PRI, NI, SZ, RSS, and WCHAN as described below.

–n

Produces numerical output for some fields. In a user listing, the USER field is replaced by a UID field.

–r

Restricts output to running and runnable processes.

–S

Displays accumulated CPU time used by this process and all of its reaped children.

–t term

List information for processes associated with the terminal, term. Terminal identifiers may be specified in one of two forms: the device's file name (for example, tty04 or term/14) or, if the device's file name starts with tty, just the digit identifier (for example, 04).

–u

Displays user-oriented output. This includes fields USER, %CPU, %MEM, SZ, RSS, and START as described below.

–U

Obsolete. This option no longer has any effect. It causes ps to exit without printing the process listing.

–v

Displays a version of the output containing virtual memory. This includes fields SIZE, %CPU, %MEM, and RSS described below.

–w

Uses a wide output format, that is, 132 columns rather than 80. If the option letter is repeated, that is, –ww, this option uses arbitrarily wide output. This information is used to decide how much of long commands to print.

–x

Includes processes with no controlling terminal.

num

A process number may be given, in which case the output is restricted to that process. This option must be supplied last.

DISPLAY FORMATS

Under the –L option, or when lwp-specific columns are specified for the –o option, one line is printed for each lwp in the process and the time-reporting fields STIME and LTIME show the values for the lwp, not the process. A traditional single-threaded process contains only one lwp.

A process that has exited and has a parent, but has not yet been waited for by the parent, is marked <defunct>.

–o format

The –o option allows the output format to be specified under user control.

The format specification must be a list of names presented as a single argument, blank- or comma-separated. Each variable has a default width and header. The default width can be overridden by adding a colon followed by a number but it will be ignored if it is smaller than the minimum width of that column. If a double colon is used instead and it is applied to the last column, the field will be truncated to that width. The default header can be overridden by appending an equals sign and the new text of the header. The rest of the characters in the argument is used as the header text. The fields specified are written in the order specified on the command line, and should be arranged in columns in the output. The field widths are selected by the system to be at least as wide as the header text (default or overridden value). If the header text is null, such as –o user=, the field width is at least as wide as the default header text. If all header text fields are null, no header line is written.

The following names are defined by the POSIX standard:

user

The effective user ID of the process. This is the textual user ID, if it can be obtained and the field width permits, or a decimal representation otherwise.

ruser

The real user ID of the process. This is the textual user ID, if it can be obtained and the field width permits, or a decimal representation otherwise.

group

The effective group ID of the process. This is the textual group ID, if it can be obtained and the field width permits, or a decimal representation otherwise.

rgroup

The real group ID of the process. This is the textual group ID, if it can be obtained and the field width permits, or a decimal representation otherwise.

pid

The decimal value of the process ID.

ppid

The decimal value of the process ID of the parent process.

pgid

The decimal value of the process ID of the process group leader.

pcpu

The ratio of CPU time used recently to CPU time available in the same period, expressed as a percentage. The meaning of “recently” in this context is unspecified. The CPU time available is determined in an unspecified manner.

vsz

The total size of the process in virtual memory, in kilobytes.

nice

Nice value, used in priority computation. Only processes in certain scheduling classes have a nice value. See the nice(1) man page.

etime

The elapsed time since the process was started. In the POSIX locale, has the form:

[[dd-] hh:]mm:ss

where

dd

is the number of days

hh

is the number of hours

mm

is the number of minutes

ss

is the number of seconds

The dd field is a decimal integer. The hh, mm and ss fields are two-digit decimal integers padded on the left with zeros.

time

The cumulative CPU time of the process or LWP. In the POSIX locale, has the form:

[dd-]hh:mm:ss

The dd, hh, mm, and ss fields are as described in the etime specifier.

tty

The name of the controlling terminal of the process (if any) in the same format used by the who(1) command. ? is printed for processes with no controlling terminal.

comm

The name of the command being executed (argv[0] value) as a string.

args

The command with all its arguments as a string. The Oracle Solaris implementation does not limit the length of the string, but may truncate the displayed string as described in DISPLAY WIDTH. The string is the version of the argument list as it was passed to the command when it started. Applications cannot depend on being able to modify their argument list and having that modification be reflected in the output of ps.

The following names are additionally recognized in the Oracle Solaris implementation:

f

Flags (hexadecimal and additive) associated with the process. These flags are available for historical purposes; no meaning should be currently ascribed to them.

s

The state of the process:

O

Process is running on a processor.

S

Sleeping: process is waiting for an event to complete.

R

Runnable: process is on run queue.

T

Process is stopped, either by a job control signal or because it is being traced.

W

Waiting: process is waiting for CPU usage to drop to the CPU-caps enforced limits.

Z

Zombie state: process terminated and parent not waiting.

c

Processor utilization for scheduling (obsolete).

uid

The effective user ID number of the process as a decimal integer.

ruid

The real user ID number of the process as a decimal integer.

suid

The saved user ID number of the process as a decimal integer. "?" will be displayed for any process for which ps does not have privileges to open /proc/pid/cred.

suser

The saved user ID of the process. This is the textual user ID, if it can be obtained and the field width permits, or a decimal representation otherwise. "?" will be displayed for any process for which ps does not have privileges to open /proc/pid/cred.

gid

The effective group ID number of the process as a decimal integer.

rgid

The real group ID number of the process as a decimal integer.

sgid

The saved group ID number of the process as a decimal integer. "?" will be displayed for any process for which ps does not have privileges to open /proc/pid/cred.

sgroup

The saved group ID of the process. This is the textual group ID, if it can be obtained and the field width permits, or a decimal representation otherwise. "?" will be displayed for any process for which ps does not have privileges to open /proc/pid/cred.

projid

The project ID number of the process as a decimal integer.

project

The project ID of the process as a textual value if that value can be obtained; otherwise, as a decimal integer.

zoneid

The zone ID number of the process as a decimal integer.

zone

The zone ID of the process as a textual value if that value can be obtained; otherwise, as a decimal integer.

sid

The decimal value of the process ID of the session leader.

taskid

The task ID of the process.

class

The scheduling class of the process. See the USAGE section of the priocntl(1) man page for information on scheduling classes.

pri

The priority of the process for the scheduler used in Solaris 2.0 and later releases. Higher numbers mean higher priority.

opri

The obsolete priority of the process displayed as used in the SunOS 4.x scheduler. Lower numbers mean higher priority.

lwp

The decimal value of the lwp ID. Requesting this formatting option causes one line to be printed for each lwp in the process.

lname

The thread name of the lwp ID. Requesting this formatting option causes one line to be printed for each lwp in the process.

nlwp

The number of lwps in the process.

psr

The number of the processor to which the process or lwp is bound.

pset

The ID of the processor set to which the process or lwp is bound.

addr

The memory address of the process. If not running with all privileges, 0 will be printed.

osz

The total size of the process in virtual memory, including all mapped files and devices, in pages. See pagesize(1).

wchan

The address of an event for which the process is sleeping (if −, the process is running). Only visible when running with all privileges, otherwise it is 0. To determine if a process is sleeping, check the S column.

etimes

The elapsed time since the process was started, in seconds.

times

The cumulative CPU time of the process, in seconds.

stime

The starting time or date of the process. If less than 24 hours ago, the time is printed as the hour, minute, and second. If at least 24 hours ago, the date is printed as month and day. If specified as –o stime, printed with no blanks. If enabled via the –f option, dates will have a space between the month and day.

dmodel

The data model of the process, _LP64 or _ILP32.

rss

The resident set size of the process, in kilobytes. The rss value reported by ps is an estimate provided by proc(5) that might underestimate the actual resident set size. Users who wish to get more accurate usage information for capacity planning should use pmap(1) –x instead.

rssprivate

The resident set size of the process, in kilobytes, of the private, non-shared mappings.

rssshared

The resident set size of the process, in kilobytes, of the non-private, shared mappings. The sum of rssshared and rssprivate equals rss.

pmem

The ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage.

fname

The base name of the process's executable file.

ctid

The contract ID of the process contract the process is a member of as a decimal integer.

lgrp

The home lgroup of the process.

env

The initial environment of the process.

fmri

The SMF FMRI corresponding to the contract id.

label

If Solaris Trusted Extensions is in use, the label for the process, otherwise the clearance for the process. See labels(7) and clearance(7) for more information.

Only comm, args, lname, env, and label are allowed to contain blank characters; all others, including the Oracle Solaris implementation formats, are not. Columns in the output formats specified by options other than –o may contain blank characters. Use –o when parsing output to avoid this.

The Oracle Solaris implementation also accepts the following aliases to the above specified format specifiers:

Alias
Format Specifier
%cpu
pcpu
%mem
pmem
clearance
label
cls
class
cmd
args
command
args
cputime
time
cputimes
times
egid
gid
egroup
group
euser
user
flag
f
flags
f
lgroup
lgrp
ni
nice
pgrp
pgid
policy
class
rssize
rss
rsz
rss
sess
sid
session
sid
svgid
sgid
svuid
suid
tname
tty
tt
tty
ucmd
comm
ucomm
comm

The following table specifies the default header to be used in the POSIX locale corresponding to each format specifier defined by the POSIX standard.

Format Specifier
Default Header
args
COMMAND
comm
COMMAND
etime
ELAPSED
group
GROUP
nice
NI
pcpu
%CPU
pgid
PGID
pid
PID
ppid
PPID
rgroup
RGROUP
ruser
RUSER
time
TIME
tty
TT
user
USER
vsz
VSZ

The following table lists the Oracle Solaris implementation format specifiers and the default header used with each.

Format Specifier
Default Header
addr
ADDR
c
C
class
CLS
ctid
CTID
dmodel
DMODEL
env
ENVIRONMENT
etimes
ELAPSED
f
F
fmri
FMRI
fname
COMMAND
gid
GID
label
LABEL
lgrp
LGRP
lname
LNAME
lwp
LWP
nlwp
NLWP
opri
PRI
osz
SZ
pmem
%MEM
pri
PRI
project
PROJECT
projid
PROJID
psr
PSR
rgid
RGID
rss
RSS
ruid
RUID
s
S
sid
SID
sgid
SGID
sgroup
SGROUP
suid
SUID
suser
SUSER
stime
STIME
taskid
TASKID
times
TIME
uid
UID
wchan
WCHAN
zone
ZONE
zoneid
ZONEID

The default headers are not currently localized in the Oracle Solaris implementation, but may be in other implementations, including future updates to Oracle Solaris. The header strings shown here will always be used in the C or POSIX locales, regardless of any localization in other locales.

Historical Output Formats

Prior to the addition of the –o option, the ps command accepted a number of options to specify which columns to print. Those options are still supported, but can also be mapped to equivalent –o formats as follows. Column widths may differ from the listed formats.

The historical options print slightly different time formats than the listed format operands. The historical format for time only displays minutes and seconds in hh:mm format, while the time operand will display days, hours, minutes, and seconds if necessary. For processes that are at least 24 hours old, the historical format for stime has a space between the month and day, while the stime operand prints an underscore (_) between the month and day.

default

pid,tty,time,fname=CMD

If per-lwp display is enabled, the title of the time column is changed to LTIME.

–f

Add user,ppid,c,opri,nice,stime. Replace fname=CMD with args=CMD.

–l

Add f,s,uid,ppid,c,opri,nice,addr,osz,wchan.

If output is to a tty and the ps command is run without sufficient privileges to retrieve kernel addresses, omit addr and wchan.

If both –f and –l are specified, omit uid and include user.

–c

Add class,pri.

Modify –f to remove c.

Modify –l to remove c,opri,nice.

–H

Add lgrp.

–j

Add pgid,sid

–L

Add lwp,lname and enable per-lwp display. If –f is also specified, also add nwlp.

–P

Add psr.

–y

Modify –l to remove f and addr, replace osz with vsz, and add rss.

–Z

Add zone:8.

DISPLAY WIDTH

By default, lines are limited to the columns setting. If any of the –columns, –cols, or –width options are used, the columns setting is the value from the last one of those options on the command line. If none of those options are provided, the value of the COLUMNS environment variable is used for the columns setting. If neither of the options or environment variable are specified, then if the output is a tty, the terminal width is used for the columns setting, otherwise the value of LINE_MAX is used.

When the –w option is specified exactly once, lines are limited to 132 characters of output.

When the –w option is specified two or more times, lines are unlimited in length. Applications and scripts which pipe the output of ps to another command should use care with this option, as some programs may be limited to handling only LINE_MAX characters per line.

Examples

Example 1 Using ps –o Option to specify fields

The command:

example% ps -o user,pid,ppid=MOM -o args

writes the following in the POSIX locale:

 USER  PID   MOM   COMMAND
helene  34    12   ps -o uid,pid,ppid=MOM -o args
Example 2 Using ps –O Option to add or modify fields

The command:

example% ps -u $USER -O tty:10,pcpu

writes the following in the POSIX locale:

  PID TTY            TIME %CPU CMD
 8273 kz/term/1      0:00 0.0 ps
  850 console        0:00 0.0 tcsh
 7799 kz/term/1      0:00 0.0 tcsh
Example 3 Using ps –O Option to suppress fields

The command:

example% ps -u $USER -O -tty

writes the following in the POSIX locale:

  PID      TIME CMD
 8273      0:00 ps
  850      0:00 tcsh
 7799      0:00 tcsh
Example 4 Using ps to display processes selected by pgrep

The pgrep command allows more options for selecting processes than ps, but is much more limited in the information it displays about each process. Combining them allows using the strengths of each command.

This command displays processes whose names match a regular expression, instead of the simple string match provided by ps –C.

example% ps -p `pgrep -d, 'gnome-.*-server'`
  PID TT          TIME CMD
 1665 ?           0:03 gnome-shell-calendar-server
 1989 ?          15:46 gnome-terminal-server

Environment Variables

See environ(7) man page for descriptions of the following environment variables that affect the execution of ps: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, LC_TIME, NLSPATH, and TZ.

COLUMNS

Override the system-selected horizontal screen size, used to determine the number of text columns to display. See the description of the –w option for details.

LINES

Override the system-selected vertical size, used to determine the number of text rows per page of output. See the description of the –headers option for details.

Exit Status

The following exit values are returned:

0

Successful completion

>0

An error occurred

Files

/dev/pts/*

list of terminal devices

/dev/term/*

terminal (“tty”) names searcher files

/proc/*

process control files

Attributes

See attributes(7) for descriptions of the following attributes:

/usr/bin/ps

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os
CSI
Enabled (see NOTES)
Interface Stability
Committed
Standard
POSIX.1-2008, SUSv4, XPG7

/usr/ucb/ps

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
legacy/compatibility/ucb
Interface Stability
Obsolete
Standard
None

See Also

kill(1), lgrpinfo(1), nice(1), pagesize(1), pgrep(1), pmap(1), priocntl(1), proc(1), ptree(1), who(1), proc(5), ttysrch(5), attributes(7), environ(7), resource-controls(7), standards(7), zones(7), getty(8), prstat(8)

Notes

Things can change while ps is running. The snapshot it gives is true only for a split-second, and it might not be accurate by the time you see it. Some data printed for defunct processes is irrelevant.

If no options to select processes are specified, ps reports all processes associated with the controlling terminal. If there is no controlling terminal, there is no report other than the header.

ps –f or ps –o stime might not report the actual start of a tty login session, but rather an earlier time, when a getty was last respawned on the tty line.

On prior releases the ADDR and WCHAN fields might have contained the kernel memory address of the process and/or event it was waiting on. These fields are now always 0 unless requested by a process running with all privileges. The values can still be obtained using the ::ps and ::thread dcmds within mdb.

ps is CSI-enabled except for login names (usernames).

When run in the global zone, user and group name resolutions are done using the global zone's name services. Processes running in a non-global zone that are displayed by ps, have user and group names that match with those found in the global zone's name services, but they may differ from the name services configured in non-global zones.

While use of the –o option can allow for reliable parsing of ps output by scripts, programs can have more efficient access to the information reported via proc(5) interfaces. The following table shows which procfs interfaces are used to provide each ps output field.

PS FIELD
PROC FILE
PROC FIELD
addr
psinfo
pr_addr or pr_lwp.pr_addr (–L)
args
cmdline
 
c
psinfo
pr_lwp.pr_cpu
class
psinfo
pr_lwp.pr_clname
comm
cmdline
 
ctid
psinfo
pr_contract
dmodel
psinfo
pr_dmodel
env
environ
 
etime, etimes
psinfo
pr_start or pr_lwp.pr_start (–L)
f
psinfo
pr_flag
fmri
psinfo
pr_contract
fname
psinfo
pr_fname
gid, group
psinfo
pr_egid
label
psinfo
pr_zoneid (Trusted Extensions)
label
clearance
(without Trusted Extensions)
lgrp
psinfo
pr_lwp.pr_lgrp
lname
psinfo
psinfo->pr_lwp.pr_name
lwp
psinfo
pr_lwp.pr_lwpid
nice
psinfo
pr_lwp.pr_nice or pr_lwp.pr_clname
nlwp
psinfo
pr_nlwp + pr_nzomb
opri
psinfo
pr_lwp.pr_oldpri
osz
psinfo
pr_size
pcpu
psinfo
pr_pctcpu or pr_lwp.pr_pctcpu (–L)
pgid
psinfo
pr_pgid
pid
psinfo
pr_pid
pmem
psinfo
pr_pctmem
ppid
psinfo
pr_ppid
pri
psinfo
pr_lwp.pr_pri
project, projid
psinfo
pr_projid
pset
psinfo
pr_lwp.pr_bindpset
psr
psinfo
pr_lwp.pr_bindpro
rgid, rgroup
psinfo
pr_gid
rss
psinfo
pr_rssize
rssprivate
psinfo
pr_rssizepriv
rssshared
psinfo
pr_rssize - pr_rssizepriv
ruid, ruser
psinfo
pr_uid
s
psinfo
pr_lwp.pr_sname
sgid, sgroup
cred
pr_sgid
sid
psinfo
pr_sid
stime
psinfo
pr_start or pr_lwp.pr_start (–L)
suid, suser
cred
pr_suid
taskid
psinfo
pr_taskid
time, times
psinfo
pr_time or pr_lwp.pr_time (–L)
tty
psinfo
pr_ttydev
uid
psinfo
pr_uid
user
psinfo
pr_euid
vsz
psinfo
pr_size
wchan
psinfo
pr_lwp.pr_wchan
zone, zoneid
psinfo
pr_zoneid

History

In Solaris 2.0 through 10, a separate /usr/ucb/ps command was provided to support the UCB options. In Solaris 11.0, support for the UCB options was added to /usr/bin/ps, and /usr/ucb/ps was replaced with a link to /usr/bin/ps.

Command name and arguments output was limited to 80 characters until the introduction of /proc/pid/cmdline in Oracle Solaris 11.3.5.

Support for the following options was first added in the listed Oracle Solaris release:

OPTION
RELEASE
–C, –w, –cols, –columns, –format, –Group, –group, –headers, –human-readable, –lgroup, –lines, –no-headers, –no-heading, –pgid, –pid, –ppid, –rows, –sid, –tty, –User, –user, –width, Heuristics for –g
11.4.27
–W
11.4.12
–O
11.4.0
–Z, –z
10 3/05
–L, –P, –y
2.6
–A, –G, –U, –o
2.5
–a, –c, –d, –e, –f, –g, –j, –l, –n, –p, –r, –s, –t, –u
2.0

Support for the following format specifiers was first added in the listed Oracle Solaris release:

NAME
RELEASE
%cpu, %mem, clearance, cls, cmd, command, cputime, cputimes, egid, egroup, etimes, euser, flag, flags, label, ni, pgrp, policy, rssize, rsz, sess, session, sgid, sgroup, suid, suser, svgid, svuid, times, tname, tt, ucmd, ucomm
11.4.27
fmri
11.4.12
rssprivate, rssshared
11.3.24
env
11.3.5
lname
11.3.0
lgrp
11.0.0
ctid, zone, zoneid
10 3/05
pset, project, projid, taskid
9 5/02
lwp, nwlp, psr
2.6
All others
2.5