summaryrefslogtreecommitdiff
path: root/sys/man/1/ps
blob: c83e699b13f7b430ab2027f12c77df7e42475d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.TH PS 1
.SH NAME
ps, psu, pstree \- process status
.SH SYNOPSIS
.B ps
[
.B -apnr
]
.PP
.B psu
[
.B -apnr
]
[
.I user
]
.PP
.B pstree
.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
.B -n
flag causes
.I ps
to print, after the process id, the note group to which the process belongs.
.PP
The
.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.
.PP
.I Pstree
prints the processes as a tree in a two colum layout where
the first colum being the process id and second column
the program name and arguments indented and prefixed with
line drawing runes to reflect the nesting in the hierarchy.
.SH FILES
.B /proc/*/status
.SH SOURCE
.B /sys/src/cmd/ps.c
.br
.B /rc/bin/psu
.br
.B /sys/src/cmd/pstree.c
.SH "SEE ALSO"
.IR acid (1),
.IR db (1),
.IR kill (1), 
.IR ns (1),
.IR proc (3)