psdisplay process status on Windows NT/2000 and POSIX compliant systems |
Command |
ps
[-Aacdefjl]
[-G idlist]
[-g grouplist]
[-n name]
[-o format] ...
[-p proclist]
[-s idlist]
[-t termlist]
[-U|u userlist]
ps displays information about processes, provided that you
have appropriate privileges to obtain information about the requested processes.
ps accepts several options. When a description says that
ps lists all processes, it means all the processes
on the system, provided that you have appropriate privileges.
-Adisplays information on all accessible processes. You can specify
-A, -a, and -e
in any combination, however, -a overrides both
-A and -e.
-adisplays information on all processes associated with terminals. You
can specify -A, -a, and
-e in any combination, however, -a
overrides both -A and -e.
-cdisplays more detailed information about processes for the
-f and -l options. Accepted but
not currently implemented.
-ddisplays information for all processes except group leaders.
-edisplays information on all accessible processes. You can specify
-A, -a, and -e
in any combination, however, -a overrides both
-A and -e.
-fdisplays information as if the user specified
-o ruser=UID -o pid,ppid,pcpu=C -o stime,tty=TTY -o atime,args
-G idlistdisplays information on processes with process group numbers in idlist. Separate numbers in idlist with either blanks or commas.
-g grouplistdisplays information on processes with real group ID numbers in grouplist. Separate numbers in grouplist with either blanks or commas.
-jdisplays information as if the user specified
-o_pid,sid,pgid=PGRP_-o_tty=TTY_-o_atime,comm
-ldisplays information as if the user specified
-o_flags,state,ruid=UID_-o_pid,ppid,pcpu=C -o pri,nice,addr,vsz=SZ -o wchan,tty=TTY -o atime,comm=CMD
-n namespecifies the name of the executable containing the kernel symbol table.
-o formatdisplays information according to the given format specifications. For further information, see Format Specifications.
-p proclistdisplays information for processes with process ID numbers in proclist. Separate numbers in proclist with either blanks or commas.
-s idlistdisplays information for processes with session ID numbers in idlist. Separate numbers in idlist with either blanks or commas.
-t termlistdisplays information for processes with terminals in termlist.
You denote terminals in termlist with either the file name of the
device (for example, tty04), or if the file name begins with
tty, you can simply specify the characters following
tty. For example, tty04 and 04 both
denote the same terminal. Terminals in termlist are separated by
either blanks or commas.
-U userlist-u userlistdisplays information for processes with user IDs in userlist. Items in userlist can be user ID numbers or login names, and are separated by either blanks or commas.
-o is a list of names
separated with blanks or commas. At the beginning of the output display,
ps displays column headings to tell you what you are seeing.
For example, if you specify ruser (indicating that you want to see
real user names), ps normally puts the heading
RUSER at the top of the column that shows real user names.
If you do not specify the -o option,
ps displays the information as though you specified
The following list shows the names that-o pid,tty=TTY -o atime,comm=CMD
ps recognizes.
At the end of each description, we put the default column heading inside square
brackets. The following names are POSIX-compliant.
argsdisplays the command that is executing, with all its arguments.
[COMMAND]
commdisplays the name of the command that is executing. This string is
padded on the right if necessary. [COMMAND]
etimedisplays the amount of real time that has elapsed since the process
began execution. ps shows the time in 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, and ss is the number of seconds.
[ELAPSED]
groupdisplays the effective group ID of the process, as a group name if
possible and as a decimal group ID if not. [GROUP]
nicedisplays the nice value (urgency) of the process as a decimal value.
[NI]
pcpudisplays a percentage value giving the ratio of CPU time used to CPU
time available. [%CPU]
pgiddisplays the process group ID as a decimal value. [PGID]
piddisplays the process ID as a decimal value. [PID]
ppiddisplays the parent process ID as a decimal value. [PPID]
rgroupdisplays the real group ID of the process, as a group name if possible
and as a decimal group ID if not. [RGROUP]
ruserdisplays the real userid of the process, as a username if possible and
as a decimal user ID otherwise. [RUSER]
timedisplays the amount of CPU time that the process has used since it
began execution. ps displays this time in form similar
to that used by etime. [TIME]
ttydisplays the name of the controlling terminal (if any).
[TT]
userdisplays the effective userid of the process, as a username if possible
and as a decimal user ID otherwise. [USER]
vszdisplays the amount of (virtual) memory that the process is using, as
a decimal number of kilobytes. [VSZ]
ps.
addrdisplays the address of the process. [ADDR]
atimedisplays the abbreviated CPU time of the process.
[TIME]
flagsdisplays the process flags. [F]
giddisplays the effective group ID of the process. [EGID]
pridisplays the process priority. [PRI]
rgiddisplays the real group ID of the process. [GID]
rssdisplays the resident set size of the process. This is the amount of physical memory actually used by the process.
ruiddisplays the real user ID of the process. [UID]
siddisplays the session ID of the process. [SID]
statedisplays the process state. [S]
stimedisplays the start time of the process. [STIME]
uiddisplays the effective user ID of the process. [EUID]
wchandisplays the channel upon which the process is waiting.
[WCHAN]
xpiddisplays the process ID in hexadecimal.
after the name in the format list. For example,=heading
displays the command and the real user name. The heading for the command column is the defaultps -o args,ruser=WHO
COMMAND but the heading for the user name column is
WHO. If you specify = with no heading,
ps displays that column without a heading. If all columns
have no heading, ps displays no heading line.
0Successful completion.
1Failure due to any of the following:
2Usage error, including any of the following:
-o-c, -d, -e,
-f, -g, -l,
-n, and -u options are x/OPEN
extensions to the POSIX standard. The -j and
-s options are extensions to both the x/OPEN and
POSIX standards.