pstat - display system data structures
pstat [-fknsTtv] [-M core] [-N system]
pstat displays open file entry, swap space utilization, terminal state,
and vnode data structure information. If corefile is given,
is sought there, otherwise in the running kernel via
required namelist is taken from the running kernel unless
system is specified.
The options are as follows:
-f Print the open file table with these headings:
LOC The core location of this table entry.
TYPE The type of object the file table entry
FLG Miscellaneous state variables encoded thus:
R open for reading
W open for writing
A open for appending
L exclusive or shared lock present
I signal pgrp when data ready
CNT Number of processes that know this open
MSG Number of messages outstanding for this
DATA The location of the vnode table entry or
for this file.
OFFSET The file offset (see lseek(2)).
-k Use 1K-byte blocks.
Extract values associated with the name list from
core instead of the running kernel.
Extract the name list from the specified system instead of the
-n Print devices by major/minor number rather than by
-s Print information about swap space usage on all the
compiled into the kernel. The first column is the
device name of
the partition. The next column is the total space
the partition. The Used column indicates the total
so far; the Available column indicates how much
space is remaining
on each partition. The Capacity reports the
If more than one partition is configured into the
for all of the statistics will be reported in the
final line of
-T Prints the number of used and free slots for open
files, used vnodes,
and swap space. It is useful for checking to
see how large
system tables become if the system is under heavy
-t Print table for terminals with these headings:
LINE Physical device name.
RAW Number of characters in raw input queue.
CAN Number of characters in canonicalized input
OUT Number of characters in output queue.
HWT High water mark for output.
LWT Low water mark for output.
COL Calculated column position of terminal.
STATE Miscellaneous state variables encoded thus:
W waiting for open to complete
C carrier is on
T delay timeout in progress
F outq has been flushed during DMA
B busy doing output
A process is awaiting output
X open for exclusive use
S output stopped
K further input blocked
Y tty in async I/O mode
D next character is escaped lowercase
E printing erase sequence
L next character is literal
P retyping suspended input
N counting tab width, ignoring output
SESS Enclosing session.
PGID Process group for which this is controlling
DISC Line discipline; `term' for TTYDISC (see
`tab' for TABLDISC (see tb(4)), `slip' for
sl(4)), `ppp' for PPPDISC (see ppp(4)),
STRIPDISC (see strip(4)).
-v Print the active vnodes. Each group of vnodes corresponding to a
particular filesystem is preceded by a two line
first line consists of the following:
*** MOUNT fstype from on on fsflags
where fstype is one of adosfs, afs, cd9660, ext2fs,
kernfs, lfs, lofs, mfs, msdos, nfs, null, portal,
union; from is the partition the filesystem is
mounted from; on
is the directory the filesystem is mounted on; and
fsflags is a
list of optional flags applied to the mount (see
second line is a header for the individual fields,
the first part
of which are fixed, and the second part are filesystem type specific.
The headers common to all vnodes are:
ADDR Location of this vnode.
TYP File type.
VFLAG A list of letters representing vnode flags:
R VROOT root of its file system.
T VTEXT pure text prototype.
S VSYSTEM vnode being used by kernel.
I VISTTY vnode represents a tty.
L VXLOCK locked to change underlying
W VXWANT process is waiting for vnode.
B VBWAIT waiting for output to complete.
A VALIASED vnode has an alias.
D VDIROP lfs vnode involved in directory op.
F VONFREELIST vnode is on a free list.
l VLOCKSWORK FS supports locking discipline.
s VONSYNCLIST vnode is on syncer worklist.
USE The number of references to this vnode.
HOLD The number of I/O buffers held by this vnode.
FILEID The vnode fileid. In the case of ffs this
is the inode
IFLAG Miscellaneous filesystem specific state
A access time must be corrected
C changed time must be corrected
U update time (fs(5)) must be
R has a rename in progress
M contains modifications
S shared lock applied
E exclusive lock applied
W waiting for I/O buffer flush
P I/O buffers being flushed
M locally modified data exists
E an earlier write failed
X non-cacheable lease (nqnfs)
O write lease (nqnfs)
G lease was evicted (nqnfs)
A special file accessed
U special file updated
C special file times changed
Number of bytes in an ordinary file, or major and minor
device of special file.
BLOCKSIZE If the environment variable BLOCKSIZE is set, and
the -k option
is not specified, the block counts will be
units of that size block.
fstat(1), procmap(1), ps(1), systat(1), stat(2), fs(5), iostat(8),
K. Thompson, UNIX Implementation.
The pstat command appeared in 4.0BSD.
Swap statistics are reported for all swap partitions compiled into the
kernel, regardless of whether those partitions are being
Does not understand NFS swap servers.
OpenBSD 3.6 April 19, 1994
[ Back ]