BSD 3 development
[unix-history] / usr / man / man1 / pstat.1m
CommitLineData
713bd1bd
BJ
1.TH PSTAT 1M
2.UC
3.SH NAME
4pstat \- print system facts
5.SH SYNOPSIS
6.B pstat
7[
8.B \-aixptuf
9] [ suboptions ]
10[ file ]
11.SH DESCRIPTION
12.I Pstat
13interprets the contents of certain system tables.
14If
15.I file
16is given, the tables are sought there, otherwise
17in
18.I /dev/kmem.
19The required namelist is taken from
20.I /vmunix.
21Options are
22.TP \w'WCHAN\ 'u
23.B \-a
24Under
25.BR \-p ,
26describe all process slots rather than just active ones.
27.TP
28.B \-i
29Print the inode table with the these headings:
30.IP LOC
31The core location of this table entry.
32.PD 0
33.IP FLAGS
34Miscellaneous state variables encoded thus:
35.RS
36.IP L
37locked
38.IP U
39update time
40.IR filsys (5))
41must be corrected
42.IP A
43access time must be corrected
44.IP M
45file system is mounted here
46.IP W
47wanted by another process (L flag is on)
48.IP T
49contains a text file
50.IP C
51changed time must be corrected
52.RE
53.IP CNT
54Number of open file table entries for this inode.
55.IP DEV
56Major and minor device number of file system in which
57this inode resides.
58.IP INO
59I-number within the device.
60.IP MODE
61Mode bits, see
62.IR chmod (2).
63.IP NLK
64Number of links to this inode.
65.IP UID
66User ID of owner.
67.IP SIZ/DEV
68Number of bytes in an ordinary file, or
69major and minor device of special file.
70.PD
71.TP
72.B \-x
73Print the text table with these headings:
74.IP LOC
75The core location of this table entry.
76.PD 0
77.IP FLAGS
78Miscellaneous state variables encoded thus:
79.RS
80.IP T
81.IR ptrace (2)
82in effect
83.IP W
84text not yet written on swap device
85.IP L
86loading in progress
87.IP K
88locked
89.IP w
90wanted (L flag is on)
91.IP P
92resulted from demand-page-from-inode exec format (see
93.IR exec (2))
94.RE
95.PD
96.IP DADDR
97Disk address in swap, measured in multiples of 512 bytes.
98.IP CADDR
99Head of a linked list of loaded processes using this text segment.
100.IP SIZE
101Size of text segment, measured in multiples of 512 bytes.
102.IP IPTR
103Core location of corresponding inode.
104.IP CNT
105Number of processes using this text segment.
106.IP CCNT
107Number of processes in core using this text segment.
108.PD
109.TP
110.B \-p
111Print process table for active processes with these headings:
112.IP LOC
113The core location of this table entry.
114.PD 0
115.IP S
116Run state encoded thus:
117.RS
118.IP 0
119no process
120.IP 1
121waiting for some event
122.IP 3
123runnable
124.IP 4
125being created
126.IP 5
127being terminated
128.IP 6
129stopped under trace
130.RE
131.IP F
132Miscellaneous state variables, or-ed together (hexadecimal):
133.RS
134.IP 0001
135loaded
136.IP 0002
137the scheduler process
138.IP 0004
139locked for swap out
140.IP 0008
141swapped out
142.IP 0010
143traced
144.IP 0020
145used in tracing
146.IP 0040
147locked in by
148.IR lock (2).
149.IP 0080
150in page-wait
151.IP 0100
152prevented from swapping during
153.IR fork (2)
154.IP 0200
155gathering pages for raw i/o
156.IP 0400
157exiting
158.IP 1000
159process resulted from a
160.IR vfork (2)
161which is not yet complete
162.IP 2000
163another flag for
164.IR vfork (2)
165.IP 4000
166process has no virtual memory, as it is a parent in the context of
167.IR vfork (2)
168.IP 8000
169process is demand paging data pages from its text inode.
170.RE
171.IP POIP
172number of pages currently being pushed out from this process.
173.IP PRI
174Scheduling priority, see
175.IR nice (2).
176.IP SIGNAL
177Signals received (signals 1-16 coded in bits 0-15),
178.IP UID
179Real user ID.
180.IP SLP
181Amount of time process has been blocked.
182.IP TIM
183Time resident in seconds; times over 127 coded as 127.
184.IP CPU
185Weighted integral of CPU time, for scheduler.
186.IP NI
187Nice level,
188see
189.IR nice (2).
190.IP PGRP
191Process number of root of process group
192(the opener of the controlling terminal).
193.IP PID
194The process ID number.
195.IP PPID
196The process ID of parent process.
197.IP ADDR
198If in core, the page frame number of the first page of the `u-area' of
199the process.
200If swapped out, the position in the swap area
201measured in multiples of 512 bytes.
202.IP RSS
203Resident set size \- the number of physical page frames allocated
204to this process.
205.IP SRSS
206RSS at last swap (0 if never swapped).
207.IP SIZE
208Virtual size of process image (data+stack) in multiples of 512 bytes.
209.IP WCHAN
210Wait channel number of a waiting process.
211.IP LINK
212Link pointer in list of runnable processes.
213.IP TEXTP
214If text is pure, pointer to location of text table entry.
215.IP CLKT
216Countdown for
217.IR alarm (2)
218measured in seconds.
219.PD
220.TP
221.B \-t
222Print table for terminals
223with these headings:
224.IP RAW
225Number of characters in raw input queue.
226.PD 0
227.IP CAN
228Number of characters in canonicalized input queue.
229.IP OUT
230Number of characters in putput queue.
231.IP MODE
232See
233.IR tty (4).
234.IP ADDR
235Physical device address.
236.IP DEL
237Number of delimiters (newlines) in canonicalized input queue.
238.IP COL
239Calculated column position of terminal.
240.IP STATE
241Miscellaneous state variables encoded thus:
242.RS
243.IP W
244waiting for open to complete
245.IP O
246open
247.IP S
248has special (output) start routine
249.IP C
250carrier is on
251.IP B
252busy doing output
253.IP A
254process is awaiting output
255.IP X
256open for exclusive use
257.IP H
258hangup on close
259.RE
260.IP PGRP
261Process group for which this is controlling terminal.
262.PD
263.TP
264.B \-u
265print information about a user process;
266the next argument is its address as given
267by
268.IR ps (1).
269The process must be in main memory, or the file used can
270be a core image and the address 0.
271.TP
272.B \-f
273Print the open file table with these headings:
274.IP LOC
275The core location of this table entry.
276.PD 0
277.IP FLG
278Miscellaneous state variables encoded thus:
279.RS
280.IP R
281open for reading
282.IP W
283open for writing
284.IP P
285pipe
286.RE
287.IP CNT
288Number of processes that know this open file.
289.IP INO
290The location of the inode table entry for this file.
291.IP OFFS
292The file offset, see
293.IR lseek (2).
294.PD
295.PP
296.SH FILES
297.ta \w'/dev/kmem 'u
298/vmunix namelist
299.br
300/dev/kmem default source of tables
301.SH SEE ALSO
302ps(1), stat(2), filsys(5)
303.br
304K. Thompson,
305.I UNIX Implementation
306.br
307O. Babaoglu and W. Joy
308.I "Data Structures added in the Berkeley Virtual Memory Extensions to the UNIX System"