a /dev/kmem . The required namelist is taken from
a /netbsd unless .Ar system is specified.
p The following options are available: l -tag -width Ds t Fl T Prints the number of used and free slots in the several system tables and is useful for checking to see how large system tables have become if the system is under heavy load. t Fl f Print the open file table with these headings: l -tag -width indent t LOC The core location of this table entry. t TYPE The type of object the file table entry points to. t FLG Miscellaneous state variables encoded thus:
p l -tag -width indent -compact t R open for reading t W open for writing t A open for appending t S shared lock present t X exclusive lock present t I signal pgrp when data ready .El t CNT Number of processes that know this open file. t MSG Number of messages outstanding for this file. t DATA The location of the vnode table entry or socket structure for this file. t OFFSET The file offset (see .Xr lseek 2 ) . .El t Fl k Use 1K-byte blocks. t Fl n Print devices by major/minor number rather than by name. t Fl s Print information about swap space usage on all the swap areas compiled into the kernel. The first column is the device name of the partition. The next column is the total space available in the partition. The .Ar Used column indicates the total blocks used so far; the .Ar Available column indicates how much space is remaining on each partition. The .Ar Capacity reports the percentage of space used.
p If more than one partition is configured into the system, totals for all of the statistics will be reported in the final line of the report. t Fl t Print table for terminals with these headings: l -tag -width indent t RAW Number of characters in raw input queue. t CAN Number of characters in canonicalized input queue. t OUT Number of characters in output queue. t MODE See .Xr tty 4 . t ADDR Physical device address. t DEL Number of delimiters (newlines) in canonicalized input queue. t COL Calculated column position of terminal. t STATE Miscellaneous state variables encoded thus:
p l -tag -width indent -compact t T delay timeout in progress t W waiting for open to complete t O open t F outq has been flushed during DMA t C carrier is on t B busy doing output t A process is awaiting output t X open for exclusive use t S output stopped t H hangup on close .El t PGRP Process group for which this is controlling terminal. t DISC Line discipline; .Ql term for TTYDISC (see .Xr termios 4 ) , .Ql tab for TABLDISC (see .Xr tb 4 ) , .Ql slip for SLIPDISC (see .Xr sl 4 ) , .Ql ppp for PPPDISC (see .Xr ppp 4 ) , .Ql strip for STRIPDISC (see .Xr strip 4 ) . .El t Fl v Print the active vnodes. Each group of vnodes corresponding to a particular filesystem is preceded by a two line header. The first line consists of the following:
p .Df I .No *** MOUNT Em fstype from on .Em on fsflags .De
p where .Em fstype is one of .Em ufs , nfs , mfs , or pc ; .Em from is the filesystem is mounted from; .Em on is the directory the filesystem is mounted on; and .Em fsflags is a list of optional flags applied to the mount (see .Xr mount 8 ) . .The 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: l -tag -width indent t ADDR Location of this vnode. t TYP File type. t VFLAG A list of letters representing vnode flags:
p l -tag -width indent -compact t R - VROOT t T - VTEXT t S - VSYSTEM t I - VISTTY t L - VXLOCK t W - VXWANT t B - VBWAIT t A - VALIASED .El
p t USE The number of references to this vnode. t HOLD The number of I/O buffers held by this vnode. t FILEID The vnode fileid. In the case of .Em ufs this is the inode number. t IFLAG Miscellaneous filesystem specific state variables encoded thus: l -tag -width indent t "For ufs:" l -tag -width indent -compact t L locked t U update time
q Xr fs 5 must be corrected t A access time must be corrected t W wanted by another process (L flag is on) t C changed time must be corrected t S shared lock applied t E exclusive lock applied t Z someone waiting for a lock t M contains modifications t R has a rename in progress .El t "For nfs:" l -tag -width indent -compact t W waiting for I/O buffer flush to complete t P I/O buffers being flushed t M locally modified data exists t E an earlier write failed t X non-cacheable lease (nqnfs) t O write lease (nqnfs) t G lease was evicted (nqnfs) .El .El t SIZ/RDEV Number of bytes in an ordinary file, or major and minor device of special file. .El .El .Sh ENVIRONMENT VARIABLES l -tag -width BLOCKSIZE t Ev BLOCKSIZE If the environment variable .Ev BLOCKSIZE is set, and the .Fl k option is not specified, the block counts will be displayed in units of that size block. .El .Sh FILES l -tag -width /dev/kmemxxx -compact t Pa /netbsd namelist t Pa /dev/kmem default source of tables .El .Sh SEE ALSO .Xr ps 1 , .Xr systat 1 , .Xr stat 2 , .Xr fs 5 , .Xr iostat 8 , .Xr vmstat 8 .Rs .Rt Tn UNIX Rt Implementation , .Ra K. Thompson .Re .Sh BUGS Swap statistics are reported for all swap partitions compiled into the kernel, regardless of whether those partitions are being used.
p Does not understand NFS swap servers. .Sh HISTORY The .Nm pstat command appeared in 4.0BSD.