purge vnode type when unneeded and returned to the free list so that
[unix-history] / usr / src / usr.sbin / pstat / pstat.8
CommitLineData
3a8113b3
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
0ecf4440 5.\" @(#)pstat.8 6.3 (Berkeley) %G%
3a8113b3 6.\"
be5ac2e5 7.TH PSTAT 8 ""
3a8113b3
KM
8.UC 4
9.SH NAME
10pstat \- print system facts
11.SH SYNOPSIS
12.B /etc/pstat
3a8113b3 13.B \-aixptufT
be3c220c
KM
14[
15.B suboptions
16] [
17.B system
18] [
19.B corefile
20]
3a8113b3
KM
21.SH DESCRIPTION
22.I Pstat
23interprets the contents of certain system tables.
24If
be3c220c 25.I corefile
3a8113b3
KM
26is given, the tables are sought there, otherwise
27in
28.I /dev/kmem.
29The required namelist is taken from
be3c220c
KM
30.I /vmunix
31unless
32.I system
33is specified.
3a8113b3
KM
34Options are
35.TP \w'WCHAN\ 'u
36.B \-a
37Under
38.BR \-p ,
39describe all process slots rather than just active ones.
40.TP
41.B \-i
42Print the inode table with the these headings:
43.IP LOC
44The core location of this table entry.
45.PD 0
46.IP FLAGS
47Miscellaneous state variables encoded thus:
48.RS
49.IP L
50locked
51.IP U
52update time
be3c220c 53.RI ( fs (5))
3a8113b3
KM
54must be corrected
55.IP A
56access time must be corrected
57.IP M
58file system is mounted here
59.IP W
60wanted by another process (L flag is on)
61.IP T
62contains a text file
63.IP C
64changed time must be corrected
be3c220c
KM
65.IP S
66shared lock applied
67.IP E
68exclusive lock applied
69.IP Z
0ecf4440 70someone waiting for a lock
3a8113b3
KM
71.RE
72.IP CNT
73Number of open file table entries for this inode.
74.IP DEV
75Major and minor device number of file system in which
76this inode resides.
be3c220c
KM
77.IP RDC
78Reference count of shared locks on the inode.
79.IP WRC
80Reference count of exclusive locks on the inode (this may
81be > 1 if, for example, a file descriptor is inherited across a fork).
3a8113b3
KM
82.IP INO
83I-number within the device.
84.IP MODE
85Mode bits, see
86.IR chmod (2).
87.IP NLK
88Number of links to this inode.
89.IP UID
90User ID of owner.
91.IP SIZ/DEV
92Number of bytes in an ordinary file, or
93major and minor device of special file.
94.PD
95.TP
96.B \-x
97Print the text table with these headings:
98.IP LOC
99The core location of this table entry.
100.PD 0
101.IP FLAGS
102Miscellaneous state variables encoded thus:
103.RS
104.IP T
105.IR ptrace (2)
106in effect
107.IP W
108text not yet written on swap device
109.IP L
110loading in progress
111.IP K
112locked
113.IP w
114wanted (L flag is on)
115.IP P
116resulted from demand-page-from-inode exec format (see
be3c220c 117.IR execve (2))
3a8113b3
KM
118.RE
119.PD
120.IP DADDR
121Disk address in swap, measured in multiples of 512 bytes.
122.IP CADDR
123Head of a linked list of loaded processes using this text segment.
53536069
JL
124.IP RSS
125Size of resident text, measured in multiples of 512 bytes.
3a8113b3
KM
126.IP SIZE
127Size of text segment, measured in multiples of 512 bytes.
128.IP IPTR
129Core location of corresponding inode.
130.IP CNT
131Number of processes using this text segment.
132.IP CCNT
133Number of processes in core using this text segment.
53536069
JL
134.IP FORW
135Forward link in free list.
136.IP BACK
137Backward link in free list.
3a8113b3
KM
138.PD
139.TP
140.B \-p
141Print process table for active processes with these headings:
142.IP LOC
143The core location of this table entry.
144.PD 0
145.IP S
146Run state encoded thus:
147.RS
148.IP 0
149no process
150.IP 1
151waiting for some event
152.IP 3
153runnable
154.IP 4
155being created
156.IP 5
157being terminated
158.IP 6
0ecf4440 159stopped (by signal or under trace)
3a8113b3
KM
160.RE
161.IP F
0ecf4440 162Miscellaneous state variables, or'ed together (hexadecimal):
3a8113b3 163.RS
53536069 164.IP 0001 9n
3a8113b3 165loaded
53536069 166.IP 0002
3a8113b3 167the scheduler process
53536069 168.IP 0004
3a8113b3 169locked for swap out
53536069 170.IP 0008
3a8113b3 171swapped out
53536069 172.IP 0010
3a8113b3 173traced
53536069 174.IP 0020
3a8113b3 175used in tracing
be3c220c
KM
176. \".IP 000040
177. \"locked in by
178. \".IR lock (2).
53536069 179.IP 0080
3a8113b3 180in page-wait
53536069 181.IP 0100
3a8113b3
KM
182prevented from swapping during
183.IR fork (2)
53536069
JL
184.IP 0200
185will restore old mask after taking signal
186.IP 0400
3a8113b3 187exiting
53536069 188.IP 0800
0ecf4440 189doing physical I/O (bio.c)
53536069 190.IP 1000
3a8113b3
KM
191process resulted from a
192.IR vfork (2)
193which is not yet complete
53536069 194.IP 2000
3a8113b3
KM
195another flag for
196.IR vfork (2)
53536069 197.IP 4000
3a8113b3
KM
198process has no virtual memory, as it is a parent in the context of
199.IR vfork (2)
53536069 200.IP 8000
3a8113b3 201process is demand paging data pages from its text inode.
0ecf4440
MK
202.IP 10000
203process using sequential VM patterns
204.IP 20000
205process using random VM patterns
206.IP 100000
207using old 4.1-compatible signal semantics
208.IP 200000
209process needs profiling tick
210.IP 400000
211process is scanning descriptors during select
212.IP 1000000
213process page tables have changed
3a8113b3
KM
214.RE
215.IP POIP
216number of pages currently being pushed out from this process.
217.IP PRI
218Scheduling priority, see
be3c220c 219.IR setpriority (2).
53536069 220.IP SIG
3a8113b3
KM
221Signals received (signals 1-32 coded in bits 0-31),
222.IP UID
223Real user ID.
224.IP SLP
225Amount of time process has been blocked.
226.IP TIM
227Time resident in seconds; times over 127 coded as 127.
228.IP CPU
229Weighted integral of CPU time, for scheduler.
230.IP NI
231Nice level,
232see
be3c220c 233.IR setpriority (2).
3a8113b3 234.IP PGRP
0ecf4440 235Process number of root of process group.
3a8113b3
KM
236.IP PID
237The process ID number.
238.IP PPID
239The process ID of parent process.
240.IP ADDR
241If in core, the page frame number of the first page of the `u-area' of
242the process.
243If swapped out, the position in the swap area
244measured in multiples of 512 bytes.
245.IP RSS
246Resident set size \- the number of physical page frames allocated
247to this process.
248.IP SRSS
249RSS at last swap (0 if never swapped).
250.IP SIZE
251Virtual size of process image (data+stack) in multiples of 512 bytes.
252.IP WCHAN
253Wait channel number of a waiting process.
254.IP LINK
255Link pointer in list of runnable processes.
256.IP TEXTP
257If text is pure, pointer to location of text table entry.
3a8113b3
KM
258.PD
259.TP
260.B \-t
261Print table for terminals
262with these headings:
263.IP RAW
264Number of characters in raw input queue.
265.PD 0
266.IP CAN
267Number of characters in canonicalized input queue.
268.IP OUT
269Number of characters in putput queue.
270.IP MODE
271See
272.IR tty (4).
273.IP ADDR
274Physical device address.
275.IP DEL
276Number of delimiters (newlines) in canonicalized input queue.
277.IP COL
278Calculated column position of terminal.
279.IP STATE
280Miscellaneous state variables encoded thus:
281.RS
53536069
JL
282.IP T
283delay timeout in progress
3a8113b3
KM
284.IP W
285waiting for open to complete
286.IP O
287open
53536069
JL
288.IP F
289outq has been flushed during DMA
3a8113b3
KM
290.IP C
291carrier is on
292.IP B
293busy doing output
294.IP A
295process is awaiting output
296.IP X
297open for exclusive use
53536069
JL
298.IP S
299output stopped
3a8113b3
KM
300.IP H
301hangup on close
302.RE
303.IP PGRP
304Process group for which this is controlling terminal.
305.IP DISC
306Line discipline; blank is old tty OTTYDISC or ``new tty'' for NTTYDISC
307or ``net'' for NETLDISC (see
308.IR bk (4)).
309.PD
310.TP
311.B \-u
312print information about a user process;
313the next argument is its address as given
314by
315.IR ps (1).
316The process must be in main memory, or the file used can
317be a core image and the address 0.
0ecf4440
MK
318Only the fields located in the first page cluster can be located
319succesfully if the process is in main memory.
3a8113b3
KM
320.TP
321.B \-f
322Print the open file table with these headings:
323.IP LOC
324The core location of this table entry.
be3c220c
KM
325.IP TYPE
326The type of object the file table entry points to.
3a8113b3
KM
327.PD 0
328.IP FLG
329Miscellaneous state variables encoded thus:
330.RS
331.IP R
332open for reading
333.IP W
334open for writing
be3c220c
KM
335.IP A
336open for appending
53536069
JL
337.IP S
338shared lock present
339.IP X
340exclusive lock present
341.IP I
342signal pgrp when data ready
3a8113b3
KM
343.RE
344.IP CNT
345Number of processes that know this open file.
53536069
JL
346.IP MSG
347Number of messages outstanding for this file.
348.IP DATA
349The location of the inode table entry or socket structure for this file.
350.IP OFFSET
be3c220c 351The file offset (see
53536069 352.IR lseek (2)).
3a8113b3
KM
353.PD
354.PP
355.B \-s
356print information about swap space usage: the number of (1k byte) pages used
357and free is given as well as the number of used pages which belong
358to text images.
359.PP
360.B \-T
361prints the number of used and free slots in the several system tables
362and is useful for checking to see how full system tables have become if the
363system is under heavy load.
3a8113b3
KM
364.SH FILES
365.ta \w'/dev/kmem 'u
366/vmunix namelist
367.br
368/dev/kmem default source of tables
369.SH SEE ALSO
0ecf4440 370iostat(1),
be3c220c 371ps(1),
0ecf4440
MK
372systat(1),
373vmstat(1),
be3c220c 374stat(2),
0ecf4440 375fs(5),
3a8113b3
KM
376.br
377K. Thompson,
378.I UNIX Implementation
379.SH BUGS
380It would be very useful if the system recorded \*(lqmaximum occupancy\*(rq
381on the tables reported by
382.B \-T;
383even more useful if these tables were dynamically allocated.