pstat(8)
Name
pstat − print system facts
Syntax
/etc/pstat [−options ] [ system ] [ corefile ]
Description
The pstat command interprets the contents of certain system tables. The contents of system tables can change while pstat is running, so the information it gives is a snapshot taken at a given time. If you specify the system argument, pstat gets the namelist from the named system’s kernel. If you omit the system argument, pstat uses the namelist in /vmunix. If you specify the corefile argument, pstat uses the tables in the core file. Otherwise, pstat uses the tables in /dev/kmem. When you use the −k option, be sure to specify the system or corefile argument.
Options
-aWhen used with the −p option, displays all process slots, rather than just active ones.
-fDisplays the open file table with the following headings:
LOCThe core location of this table entry.
TYPEThe type of object the file table entry points to.
FLGMiscellaneous state variables, encoded as follows:
ROpen for reading
WOpen for writing
AOpen for appending
SShared lock
XExclusive use
IAsynchronous input and output notification
BBlock-if-in-use flag is set (shared line semaphore)
CNTNumber of processes that know this open file.
GNOThe location of the gnode table entry for this file.
OFFS/SOCK
The file offset or the core address of the associated socket structure. (See lseek() for information on file offsets.)
-iDisplays the gnode table with the following headings:
LOCThe core location of this table entry.
FLAGSMiscellaneous state variables, encoded as follows:
LLocked.
UUpdate time for the file system must be corrected. See fs() for more information.
AAccess time must be corrected.
MFile system is mounted here.
WWanted by another process (L flag is on).
TContains a text file.
CChanged time must be corrected.
SShared lock applied.
EExclusive lock applied.
ZSomeone waiting for an exclusive lock.
IIn-use flag is set (shared line semaphore).
CNTNumber of open file table entries for this gnode.
DEVMajor and minor device number of the file system in which this gnode resides.
RDCReference count of shared locks on the gnode.
WRCReference count of exclusive locks on the gnode. (This count can be >1 if, for example, a file descriptor is inherited across a fork.)
GNOI-number within the device.
MODEMode bits. (See chmod() for information about mode bits.)
NLKNumber of links to this gnode.
UIDUser identification (ID) of owner.
SIZ/DEVNumber of bytes in an ordinary file or major and minor device of a special file.
-kIndicates that a system corefile is to be examined. Be sure to specify the corefile argument.
-pDisplays the process table for active processes with these headings:
LOCThe core location of this table entry.
SRun state, encoded as follows:
0No process
1Waiting for some event
3Able to be run
4Being created
5Being terminated
6Stopped under trace
FMiscellaneous state variables, combined with a Boolean OR operation (hexadecimal):
00000001Process is resident in memory.
00000002System process: swapper, pager, idle (RISC only), trusted path daemon.
00000004Process is being swapped out.
00000008Process requested swapout for page table growth.
00000010Traced.
00000020Used in tracing.
00000040Locked in by a plock call.
00000080Waiting for page-in to complete.
00000100Protected from swapout while transferring resources to another process.
00000200Used by a sigpause call.
00000400Exiting.
00000800Protected from swapout while doing physical input and output.
00001000Process resulted from a vfork call, which is not yet complete.
00002000Parent has received resources returned by a child created with the vfork call.
00004000Process has no virtual memory because it is a parent in the context of the vfork call.
00008000Process is demand-paging data pages from its text gnode.
00010000Process has advised of sequential memory access.
00020000Process has advised of random memory access.
00080000Process has indicated intent to execute data or stack (RISC only).
00100000POSIX environment: no SIGCLD generated when children stop.
00200000Process is owed a profiling tick.
00400000Used by a select call.
00800000A login process.
04000000System V file lock applied.
08000000Repair of unaligned accesses has been attempted (RISC only).
10000000Process has called the execve system routine.
20000000The idle process (RISC only).
POIPNumber of pages currently being pushed out from this process.
PRIScheduling priority. (See getpriority() for information on priorities.)
SIGNALSignals received (signals 1-32 coded in bits 0-31).
UIDReal user ID.
SLPAmount of time the process has been blocked.
TIMTime resident in seconds; values greater than 127 are coded as 127.
CPUWeighted integral of CPU time, for scheduler.
NINice level. (See getpriority() for information about nice levels.)
PGRPProcess number of the root of the process group (the opener of the controlling terminal).
PIDThe process ID number.
PPIDThe process ID of the parent process.
ADDRIf the process is in memory, identifies the user area page frame number of the page table entries. If the process is swapped out, identifies the position in the swap area measured in multiples of 512 bytes.
RSSResident set size minus the number of physical page frames allocated to this process.
SRSSRSS at last swap (0 if never swapped).
SIZEVirtual size of process image (data plus stack) in multiples of 512 bytes.
WCHANWait channel number of a waiting process.
LINKLink pointer in list of processes that can be run.
TEXTPIf text is pure, pointer to location of text table entry.
CLKTCountdown for real interval timer, measured in clock ticks (10 milliseconds). See getitimer() for information about the real interval timer.)
TTYPAddress of controlling the terminal.
DMAPAddress of data segment dmap structure.
SMAPAddress of stack segment dmap structure.
-sDisplays the swap space configured, then the following information about swap space:
•The number of pages reserved, but not necessarily allocated, by the system for currently executing processes.
•The number of pages used (physically allocated), including the number used for text images.
•The number of pages free, wasted, or missing. Free pages are pages that have not been allocated. Missing pages are usually allocated to argdev. Wasted pages indicate the amount of space lost because the swap space is fragmented.
•The swap space available, in terms of 32KB buffers and 1KB buffers. This is the amount of space that is available for swapping.
-tDisplays the table for terminals with the following headings:
RAWNumber of characters in the raw input queue
CANNumber of characters in the canonic input queue
OUTNumber of characters in the output queue
MODETerminal mode, as described in tty()
ADDRPhysical device address
DELNumber of delimiters (newlines) in the canonic input queue
COLCalculated column position of the terminal
STATEMiscellaneous state variables, encoded as follows:
TLine is timed out
WWaiting for open to complete
OOpen
CCarrier is on
BBusy doing output
AProcess is awaiting output
XOpen for exclusive use
HHangup on close
SOutput is stopped (ttstop)
IIn-use flag is set (shared line semaphore)
DOpen nodelay
GIgnore carrier
NNonblocking input and output
ZAsychronous input and output notification
LTerminal line is in the process of closing
QOutput suspended for flow control
PGRPProcess group for which this is the controlling terminal
DISCLine discipline; blank is old tty OTTYDISC, ntty for NTTYDISC, or termio for TERMIODISC
-TDisplays the number of used and free slots in the system tables. This option is useful for determining how full the system tables have become if the system is under a heavy load.
-upidDisplays information about a user process. The next argument is the process address, as given by ps(.). The process must be in main memory, or the file used can be a core image and the address 0.
-vDisplays a listing of all vector processes on the system. This option is valid only for processors that have the VAX vector hardware. No vector headings are produced if the -T option is specified or there are no vector processes to report.
The following list describes the headings in the display:
LOCThe core location of this table entry
PPGRPThe process number of the root of the process group (the opener of the controlling terminal)
PIDThe process ID number
PPIDThe process ID of the parent process
VSTATOne of the following vector process statuses:
WAITNew vector process, which is waiting for a vector processor to be allocated to it.
LOADProcess context is present in both vector and scalar processors.
SAVED
Process vector context is saved in memory.
LIMBO
A vector processor has been allocated to the process, but the vector context of the process has not yet been loaded.
VERRS
Number of vector processor errors incurred by this process
REFSNumber of times this process was refused scheduling into a vector processor
CHPCXT
Number of times the scaler context has been saved and restored, while the vector context remains resident in the vector processor
EPXCXT
Number of times both the scalar and vector contexts have been saved and restored
-xDisplays the text table with the following headings:
LOCThe core location of this table entry
FLAGSMiscellaneous state variables encoded as follows:
TA process called the ptrace() system call.
WText has not yet been written on the swap device.
LLoading is in progress.
KLocked.
wWanted. (L flag is on.)
FText structure is on the freelist.
PResulted from demand-page-from-gnode execution format. For further information, see execve(.).
lLocked from being paged or swapped. For further information, see plock(.).
BAll attached processes are being killed due to server write of an a.out file.
DADDRAddress of the text dmap structure in core
CADDRHead of a linked list of loaded processes using this text segment
SIZESize of the text segment, measured in multiples of 512 bytes
IPTRCore location of the corresponding gnode
CNTNumber of processes using this text segment
CCNTNumber of processes in core using this text segment
LCNTNumber of process locking this text segment
POIPNumber of pages currently being pushed out in this text segment
CMAPThe address of the last CMAP entry freed
Files
/dev/mem User process information
/dev/kmem Kernel memory
/vmunix System namelist
See Also
ps(1), chmod(2), execve(2), getitimer(2), getpriority(2), lseek(2), plock(2), ptrace(2), stat(2), fs(5)