add confSORT_QUEUE_BY_HOST and confBROKEN_SMTP_PEERS
[unix-history] / usr / src / usr.sbin / pstat / pstat.8
CommitLineData
de40fd0b 1.\" Copyright (c) 1980, 1991, 1993, 1994
06b591cb 2.\" The Regents of the University of California. All rights reserved.
3a8113b3 3.\"
be91a597 4.\" %sccs.include.redist.man%
3a8113b3 5.\"
8114d14f 6.\" @(#)pstat.8 8.5 (Berkeley) %G%
be91a597
KM
7.\"
8.Dd
9.Dt PSTAT 8
10.Os BSD 4
11.Sh NAME
12.Nm pstat
13.Nd display system data structures
14.Sh SYNOPSIS
15.Nm pstat
907a6559
KM
16.Op Fl Tfnstv
17.Op Fl M Ar core
18.Op Fl N Ar system
be91a597
KM
19.Sh DESCRIPTION
20.Nm Pstat
907a6559
KM
21displays open file entry, swap space utilization,
22terminal state, and vnode data structures.
3a8113b3 23If
be91a597 24.Ar corefile
2e9b3e06 25is given, the information is sought there, otherwise
3a8113b3 26in
be91a597 27.Pa /dev/kmem .
3a8113b3 28The required namelist is taken from
be91a597 29.Pa /vmunix
be3c220c 30unless
be91a597 31.Ar system
be3c220c 32is specified.
907a6559
KM
33The
34.Fl n
35option specifies that devices should be printed out by major/minor
36number rather than by name.
37.Pp
3a8113b3 38Options are
907a6559
KM
39.Bl -tag -width indent
40.It Fl T
be91a597 41Prints the number of used and free slots in the several system tables
907a6559
KM
42and is useful for checking to see how large system tables have become
43if the system is under heavy load.
44.It Fl f
be91a597 45Print the open file table with these headings:
907a6559
KM
46.Bl -tag -width indent
47.It LOC
3a8113b3 48The core location of this table entry.
907a6559 49.It TYPE
be91a597 50The type of object the file table entry points to.
907a6559 51.It FLG
3a8113b3 52Miscellaneous state variables encoded thus:
907a6559
KM
53.Bl -tag -width indent
54.It R
be91a597 55open for reading
907a6559 56.It W
be91a597 57open for writing
907a6559 58.It A
be91a597 59open for appending
907a6559 60.It S
be91a597 61shared lock present
907a6559 62.It X
be91a597 63exclusive lock present
907a6559 64.It I
be91a597 65signal pgrp when data ready
907a6559
KM
66.El
67.It CNT
be91a597 68Number of processes that know this open file.
907a6559 69.It MSG
be91a597 70Number of messages outstanding for this file.
907a6559 71.It DATA
be91a597 72The location of the vnode table entry or socket structure for this file.
907a6559 73.It OFFSET
be91a597
KM
74The file offset (see
75.Xr lseek 2 ) .
907a6559
KM
76.El
77.It Fl s
78Print information about swap space usage on all the
79swap areas compiled into the kernel.
80The first column is the device name of the partition. The next column is
81the total space available in the partition. The
82.Ar Used
83column indicates the total blocks used so far; the
84.Ar Available
85column indicates how much space is remaining on each partition.
86The
87.Ar Capacity
88reports the percentage of space used.
89.Pp
90If more than one partition is configured into the system, totals for all
91of the statistics will be reported in the final line of the report.
92.It Fl t
3a8113b3
KM
93Print table for terminals
94with these headings:
907a6559
KM
95.Bl -tag -width indent
96.It RAW
3a8113b3 97Number of characters in raw input queue.
907a6559 98.It CAN
3a8113b3 99Number of characters in canonicalized input queue.
907a6559 100.It OUT
3a8113b3 101Number of characters in putput queue.
907a6559 102.It MODE
3a8113b3 103See
be91a597 104.Xr tty 4 .
907a6559 105.It ADDR
3a8113b3 106Physical device address.
907a6559 107.It DEL
3a8113b3 108Number of delimiters (newlines) in canonicalized input queue.
907a6559 109.It COL
3a8113b3 110Calculated column position of terminal.
907a6559 111.It STATE
3a8113b3 112Miscellaneous state variables encoded thus:
907a6559
KM
113.Bl -tag -width indent
114.It T
53536069 115delay timeout in progress
907a6559 116.It W
3a8113b3 117waiting for open to complete
907a6559 118.It O
3a8113b3 119open
907a6559 120.It F
53536069 121outq has been flushed during DMA
907a6559 122.It C
3a8113b3 123carrier is on
907a6559 124.It B
3a8113b3 125busy doing output
907a6559 126.It A
3a8113b3 127process is awaiting output
907a6559 128.It X
3a8113b3 129open for exclusive use
907a6559 130.It S
53536069 131output stopped
907a6559 132.It H
3a8113b3 133hangup on close
907a6559
KM
134.El
135.It PGRP
3a8113b3 136Process group for which this is controlling terminal.
907a6559 137.It DISC
be91a597
KM
138Line discipline; blank is old tty
139OTTYDISC
140or
141.Ql new tty
142for
143NTTYDISC
144or
145.Ql net
146for
147NETLDISC
148(see
149.Xr bk 4 ) .
907a6559
KM
150.El
151.It Fl v
de40fd0b 152Print the active vnodes. Each group of vnodes corresponding
be91a597
KM
153to a particular filesystem is preceded by a two line header. The
154first line consists of the following:
155.Pp
156.Df I
157.No *** MOUNT Em fstype from
158on
159.Em on fsflags
160.De
161.Pp
162where
163.Em fstype
164is one of
165.Em ufs , nfs , mfs , or pc ;
166.Em from
167is the filesystem is mounted from;
168.Em on
169is the directory
170the filesystem is mounted on; and
171.Em fsflags
172is a list
173of optional flags applied to the mount (see
174.Xr mount 8 ) .
175.The second line is a header for the individual fields ,
176the first part of which are fixed, and the second part are filesystem
177type specific. The headers common to all vnodes are:
907a6559
KM
178.Bl -tag -width indent
179.It ADDR
be91a597 180Location of this vnode.
907a6559 181.It TYP
be91a597 182File type.
907a6559 183.It VFLAG
be91a597 184.Pp
907a6559
KM
185A list of letters representing vnode flags:
186.Bl -tag -width indent
187.It R
be91a597 188\- VROOT
907a6559 189.It T
be91a597 190\- VTEXT
907a6559 191.It L
be91a597 192\- VXLOCK
907a6559 193.It W
be91a597 194\- VXWANT
907a6559 195.It E
be91a597 196\- VEXLOCK
907a6559 197.It S
be91a597 198\- VSHLOCK
907a6559 199.It T
be91a597 200\- VLWAIT
907a6559 201.It A
be91a597 202\- VALIASED
907a6559 203.It B
be91a597 204\- VBWAIT
907a6559 205.El
be91a597 206.Pp
355acd0f
JSP
207.It USE
208The number of references to this vnode.
209.It HOLD
210The number of I/O buffers held by this vnode.
211.It FILEID
212The vnode fileid.
213In the case of
214.Em ufs
215this is the inode number.
216.It IFLAG
217Miscellaneous filesystem specific state variables encoded thus:
218.Bl -tag -width indent
219.It "For ufs:"
220.Pp
907a6559
KM
221.Bl -tag -width indent
222.It L
be91a597 223locked
907a6559 224.It U
be91a597
KM
225update time
226.Pq Xr fs 5
227must be corrected
907a6559 228.It A
be91a597 229access time must be corrected
907a6559 230.It W
be91a597 231wanted by another process (L flag is on)
907a6559 232.It C
be91a597 233changed time must be corrected
907a6559 234.It S
be91a597 235shared lock applied
907a6559 236.It E
be91a597 237exclusive lock applied
907a6559 238.It Z
be91a597 239someone waiting for a lock
907a6559 240.It M
be91a597 241contains modifications
907a6559 242.It R
be91a597 243has a rename in progress
907a6559 244.El
355acd0f
JSP
245.It "For nfs:"
246.Bl -tag -width indent
247.It W
248waiting for I/O buffer flush to complete
249.It P
250I/O buffers being flushed
251.It M
252locally modified data exists
253.It E
254an earlier write failed
255.It X
390cbc21 256non-cacheable lease (nqnfs)
355acd0f
JSP
257.It O
258write lease (nqnfs)
259.It G
260lease was evicted (nqnfs)
261.El
262.El
263.It SIZ/RDEV
be91a597
KM
264Number of bytes in an ordinary file, or
265major and minor device of special file.
907a6559
KM
266.El
267.El
be91a597 268.Sh FILES
907a6559
KM
269.Bl -tag -width /dev/kmemxxx -compact
270.It Pa /vmunix
be91a597 271namelist
907a6559 272.It Pa /dev/kmem
be91a597 273default source of tables
907a6559 274.El
be91a597
KM
275.Sh SEE ALSO
276.Xr iostat 1 ,
277.Xr ps 1 ,
278.Xr systat 1 ,
279.Xr vmstat 1 ,
280.Xr stat 2 ,
281.Xr fs 5 ,
282.Rs
283.Rt Tn UNIX Rt Implementation ,
284.Ra K. Thompson
285.Re
286.Sh BUGS
907a6559
KM
287Swap statistics are reported for all swap partitions compiled into the kernel,
288regardless of whether those partitions are being used.
289.Pp
290Does not understand NFS swap servers.
be91a597
KM
291.Sh HISTORY
292The
907a6559 293.Nm pstat
be91a597 294command appeared in 4.0BSD.