BLOCKSIZE
If the environment variable BLOCKSIZE is set, and the -k option is not specified, the block counts will be displayed in units of that size block.
Display system data structures
pstat [-fknsTtv]
[-M
core]
[-N
system]
[-d
format
symbol ...]
pstat displays open file entry, swap space utilization, terminal state, and vnode data structure information. If core is given, the information is sought there, otherwise in the running kernel via /dev/kmem. The required namelist is taken from the running kernel unless system is specified.
The options are as follows:
-d format symbol ...Print the values of symbol using the specified format. format is a printf(3)-style format, without the leading percent or precision specifiers, such as s, p, or llx. Symbol names are read from the remaining command line arguments. Addresses may also be specified in hex.
The -d option requires the ability to open /dev/kmem which may be restricted based upon the value of the kern.allowkmem sysctl(8).
-f
Print the open file table with these headings:
The core location of this table entry.
The type of object the file table entry points to.
Miscellaneous state variables encoded thus:
open for reading
open for writing
open for appending
exclusive or shared lock present
signal pgrp when data ready
Number of processes that know this open file.
Number of messages outstanding for this file.
The location of the vnode table entry or socket structure for this file.
The file offset (see lseek(2)). This information is only visible to the user or superuser.
-k
Use 1K-byte blocks.
-M core
Extract values associated with the name list from the specified core instead of the running kernel.
-N system
Extract the name list from the specified system instead of the running kernel.
-n
Print devices by major/minor number rather than by name.
-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 Used column indicates the total blocks used so far; the Available column indicates how much space is remaining on each partition. The Capacity reports the percentage of space used.
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
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 load.
-t
Print table for terminals with these headings:
Physical device name.
Number of characters in raw input queue.
Number of characters in canonicalized input queue.
Number of characters in output queue.
High water mark for output.
Low water mark for output.
Calculated column position of terminal.
Miscellaneous state variables encoded thus:
waiting for open to complete
open
carrier is on
delay timeout in progress
outq has been flushed during DMA
busy doing output
process is awaiting output
open for exclusive use
output stopped
further input blocked
tty in async I/O mode
next character is escaped lowercase special
printing erase sequence
next character is literal
retyping suspended input
counting tab width, ignoring output flush
Enclosing session.
Process group for which this is controlling terminal.
Line discipline: ‘term’ for TTYDISC (see termios(4)), ‘ppp’ for PPPDISC (see ppp(4)) and ‘nmea’ for NMEADISC (see nmea(4)).
-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:
*** MOUNT fstype from on on fsflags
where fstype is one of the file systems supported by the kernel; 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 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:
Location of this vnode.
File type.
A list of letters representing vnode flags:
VROOT root of its file system.
VTEXT pure text prototype.
VSYSTEM vnode being used by kernel.
VISTTY vnode represents a tty.
VXLOCK locked to change underlying type.
VXWANT process is waiting for vnode.
VBWAIT waiting for output to complete.
VALIASED vnode has an alias.
VONFREELIST vnode is on a free list.
VLOCKSWORK FS supports locking discipline.
VONSYNCLIST vnode is on syncer worklist.
The number of references to this vnode.
The number of I/O buffers held by this vnode.
The vnode fileid. In the case of ffs this is the inode number.
Miscellaneous filesystem specific state variables encoded thus:
access time must be corrected
changed time must be corrected
modification time must be corrected
has a rename in progress
contains modifications
contains lazy modifications
shared lock applied
exclusive lock applied
waiting for I/O buffer flush to complete
I/O buffers being flushed
locally modified data exists
an earlier write failed
non-cacheable lease (nqnfs)
write lease (nqnfs)
lease was evicted (nqnfs)
special file accessed
special file updated
special file times changed
Number of bytes in an ordinary file, or major and minor device of special file.
The -v option requires the ability to open /dev/kmem which may be restricted based upon the value of the kern.allowkmem sysctl(8).
BLOCKSIZE
If the environment variable BLOCKSIZE is set, and the -k option is not specified, the block counts will be displayed in units of that size block.
61 releases since OpenBSD 2.1; the text changed 36 times.
-M since OpenBSD 3.5;
-N since OpenBSD 3.5.
-d until OpenBSD 5.9.