2011-03-30 13:49:47 +00:00
|
|
|
.TH PS 1
|
|
|
|
.SH NAME
|
2012-07-05 18:39:34 +00:00
|
|
|
ps, psu, pstree \- process status
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B ps
|
|
|
|
[
|
2012-08-05 13:50:42 +00:00
|
|
|
.B -apnr
|
2011-03-30 13:49:47 +00:00
|
|
|
]
|
|
|
|
.PP
|
|
|
|
.B psu
|
|
|
|
[
|
2012-08-05 13:50:42 +00:00
|
|
|
.B -apnr
|
2011-03-30 13:49:47 +00:00
|
|
|
]
|
|
|
|
[
|
|
|
|
.I user
|
|
|
|
]
|
2012-07-05 18:39:34 +00:00
|
|
|
.PP
|
|
|
|
.B pstree
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.I Ps
|
|
|
|
prints information about processes.
|
|
|
|
.I Psu
|
|
|
|
prints only information about processes started by
|
|
|
|
.I user
|
|
|
|
(default
|
|
|
|
.BR $user ).
|
|
|
|
.PP
|
|
|
|
For each process reported,
|
|
|
|
the user,
|
|
|
|
process id,
|
|
|
|
user time,
|
|
|
|
system time,
|
|
|
|
size,
|
|
|
|
state,
|
|
|
|
and command name are printed.
|
|
|
|
State is one of the following:
|
|
|
|
.TP \w'\fLno\ \fIresource\ \ \ 'u
|
|
|
|
.B Moribund
|
|
|
|
Process has exited and is about to have its
|
|
|
|
resources reclaimed.
|
|
|
|
.TP
|
|
|
|
.B Ready
|
|
|
|
on the queue of processes ready to be run.
|
|
|
|
.TP
|
|
|
|
.B Scheding
|
|
|
|
about to be run.
|
|
|
|
.TP
|
|
|
|
.B Running
|
|
|
|
running.
|
|
|
|
.TP
|
|
|
|
.B Queueing
|
|
|
|
waiting on a queue for a resource.
|
|
|
|
.TP
|
|
|
|
.B Wakeme
|
|
|
|
waiting for I/O or some other kernel event to wake it up.
|
|
|
|
.TP
|
|
|
|
.B Broken
|
|
|
|
dead of unnatural causes; lingering
|
|
|
|
so that it can be examined.
|
|
|
|
.TP
|
|
|
|
.B Stopped
|
|
|
|
stopped.
|
|
|
|
.TP
|
|
|
|
.B Stopwait
|
|
|
|
waiting for another process to stop.
|
|
|
|
.TP
|
|
|
|
.B Fault
|
|
|
|
servicing a page fault.
|
|
|
|
.TP
|
|
|
|
.B Idle
|
|
|
|
waiting for something to do (kernel processes only).
|
|
|
|
.TP
|
|
|
|
.B New
|
|
|
|
being created.
|
|
|
|
.TP
|
|
|
|
.B Pageout
|
|
|
|
paging out some other process.
|
|
|
|
.TP
|
|
|
|
.I Syscall
|
|
|
|
performing the named system call.
|
|
|
|
.TP
|
|
|
|
.BI no " resource
|
|
|
|
waiting for more of a critical
|
|
|
|
.IR resource .
|
|
|
|
.PD
|
|
|
|
.PP
|
|
|
|
The
|
2012-08-05 13:50:42 +00:00
|
|
|
.B -n
|
|
|
|
flag causes
|
|
|
|
.I ps
|
|
|
|
to print, after the process id, the note group to which the process belongs.
|
|
|
|
.PP
|
|
|
|
The
|
2011-03-30 13:49:47 +00:00
|
|
|
.B -r
|
|
|
|
flag causes
|
|
|
|
.I ps
|
|
|
|
to print, before the user time, the elapsed real time for the process.
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.B -p
|
|
|
|
flag causes
|
|
|
|
.I ps
|
|
|
|
to print, after the system time, the baseline and current priorities of each process.
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.B -a
|
|
|
|
flag causes
|
|
|
|
.I ps
|
|
|
|
to print the arguments for the process. Newlines in arguments will be translated to spaces for display.
|
2012-07-05 18:39:34 +00:00
|
|
|
.PP
|
|
|
|
.I Pstree
|
2021-11-01 20:49:43 +00:00
|
|
|
prints the processes as a tree in a two-column layout where
|
|
|
|
the first column being the process id and second column
|
2012-11-07 23:06:54 +00:00
|
|
|
the program name and arguments indented and prefixed with
|
|
|
|
line drawing runes to reflect the nesting in the hierarchy.
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH FILES
|
|
|
|
.B /proc/*/status
|
|
|
|
.SH SOURCE
|
|
|
|
.B /sys/src/cmd/ps.c
|
|
|
|
.br
|
|
|
|
.B /rc/bin/psu
|
2012-07-05 18:39:34 +00:00
|
|
|
.br
|
|
|
|
.B /sys/src/cmd/pstree.c
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.IR acid (1),
|
|
|
|
.IR db (1),
|
|
|
|
.IR kill (1),
|
|
|
|
.IR ns (1),
|
|
|
|
.IR proc (3)
|
2013-12-27 21:22:05 +00:00
|
|
|
.SH HISTORY
|
|
|
|
.I Pstree
|
|
|
|
first appeared in 9front (June, 2011).
|