PSTAT(8) BSD System Manager's Manual PSTAT(8)NAMEpstat - display system data structures
SYNOPSISpstat [-fnsTtv] [-M core] [-N system]
DESCRIPTION
Pstat displays the open file entries, swap space utilization, vnode en-
tries, terminal state, and vnode data structures.
The following options are available:
-f Print the open file entries with the following headings:
LOC The core location of this entry.
TYPE The type of object the file entry points to.
FLG Miscellaneous state variables with the following encod-
ing:
A open for appending
I signal pgrp when data ready
R open for reading
S shared lock present
W open for writing
X exclusive lock present
CNT Number of processes that know this open file.
MSG Number of messages outstanding for this file.
DATA The location of the vnode entry or socket structure for
this file.
OFFSET The file offset (see lseek(2)).
See fstat(1) for additional information on open files.
-M Extract values associated with the name list from the specified
core instead of the default /dev/kmem.
-N Extract the name list from the specified system instead of the
default /bsd.
-n The -n option specifies that devices should be printed out by ma-
jor/minor number rather than by name.
-s Print the swap (paging) space usage information on all of the
swap areas compiled into the system, with the following headings:
Device name
The device name of the partition.
XX-blocks
The total space available in the partition in blocks (de-
termined by the BLOCKSIZE environment variable, 512 bytes
by default). This will be slightly smaller than the cor-
responding partition size, since the first few sectors of
each area are skipped (to avoid writing on a disk label
and for other internal reasons).
Type If the swap partition is currently in use, the type is
listed either as Interleaved or Sequential. The list be-
gins with swap partitions that were pre-configured into
the system. The first of these is enabled automatically
when the system starts up; others must be enabled using
swapon(8). If the partition has not been enabled, the
partition is marked as not currently available for use.
Allocations are interleaved across the pre-configured de-
vices that have been enabled, and those partitions are
marked as Interleaved. Swap partitions that were not pre-
configured can be added with swapon(8); space is allo-
cated from these partitions sequentially when space is
not available on preceding partitions. These partitions
are marked Sequential.
The number of blocks in use, the total number of blocks for the
partitions enabled, and the percentage of space in use are also
printed.
-T Prints the number of open file and vnode entries used, the cur-
rent limit on the number of open file entries, and the amount of
swap space in use and total. It is useful for checking to see
how large system tables have become when the system is under
heavy load.
-t Print information about each terminal with the following head-
ings:
RAW Number of characters in raw input queue.
CAN Number of characters in canonicalized input queue.
OUT Number of characters in the output queue.
HWT Maximum number of characters in the queue before the pro-
ducer will sleep.
LWT Number of characters in the queue at which point the pro-
duce will be awoken.
COL Calculated column position of terminal.
STATE Miscellaneous state variables with the following encod-
ing:
A process is awaiting output
B busy doing output
C carrier is on
D state for lowercase work
E within a \.../ for ECHOPRT
F outq has been flushed during DMA
K further input blocked
L next character is literal
N counting tab width, ignore FLUSHO
O open
P retyping suspended input
S output stopped
T delay timeout in progress (not currently used)
W waiting for open to complete
X open for exclusive use
Y tty in async I/O mode
Z process waiting for tty to empty
SESS Address of enclosing session.
PGID Process group for which this is controlling terminal.
DISC Line discipline; term indicates the standard terminal
discipline TTYDISC (see termios(4)). Other possibilities
include slip (sl(4)) and ppp (ppp(4)).
-v Print the active vnode entries. Each group of vnodes correspond-
ing to a particular filesystem is preceded by a two line header.
The first line consists of the following:
*** MOUNT fstype from on on fsflags
where fstype is one of ufs, nfs, mfs, or pc; from is the filesys-
tem is mounted from; on is the directory the filesystem is mount-
ed on; and fsflags is a list of optional flags applied to the
mount (see mount(8)). 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:
A VALIASED
B VBWAIT
I VISTTY
L VXLOCK
R VROOT
S VSYSTEM
T VTEXT
W VXWANT
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 ufs this is the inode
number.
IFLAG Miscellaneous filesystem specific state variables encoded
thus:
For ufs:
A access time must be corrected
C changed time must be corrected
E exclusive lock applied
L locked
M contains modifications
R has a rename in progress
S shared lock applied
U update time must be corrected
W wanted by another process (L flag is on)
Z someone waiting for a lock
For nfs:
E an earlier write failed
G lease was evicted (nqnfs)
M locally modified data exists
O write lease (nqnfs)
P I/O buffers being flushed
W waiting for I/O buffer flush to complete
X non-cacheable lease (nqnfs)
SIZ/RDEV
Number of bytes in an ordinary file, or major and minor
device of special file.
FILES
/bsd default system namelist
/dev/kmem default information source
ENVIRONMENT VARIABLES
BLOCKSIZE If the environmental variable BLOCKSIZE is set, swap block
counts will be displayed in units of that size block.
SEE ALSOfstat(1), ps(1), systat(1), stat(2), fs(5), iostat(8), swapon(8),
vmstat(8)BUGS
Does not understand NFS swap servers.
HISTORY
The pstat command appeared in 4.0BSD.
4th Berkeley Distribution May 13, 1994 3