PSTAT(1M) — Unix Programmer’s Manual
NAME
pstat − print system facts
SYNOPSIS
pstat [ −aixptuf ] [ suboptions ] [ file ]
DESCRIPTION
Pstat interprets the contents of certain system tables. If file is given, the tables are sought there, otherwise in /dev/kmem. The required namelist is taken from /vmunix. Options are
−a Under −p, describe all process slots rather than just active ones.
−i Print the inode table with the these headings:
LOCThe core location of this table entry.
FLAGSMiscellaneous state variables encoded thus:
Llocked
Uupdate time filsys(5)) must be corrected
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
CNTNumber of open file table entries for this inode.
DEVMajor and minor device number of file system in which this inode resides.
INOI-number within the device.
MODEMode bits, see chmod(2).
NLKNumber of links to this inode.
UIDUser ID of owner.
SIZ/DEVNumber of bytes in an ordinary file, or major and minor device of special file.
−x Print the text table with these headings:
LOCThe core location of this table entry.
FLAGSMiscellaneous state variables encoded thus:
Tptrace(2) in effect
Wtext not yet written on swap device
Lloading in progress
Klocked
wwanted (L flag is on)
Presulted from demand-page-from-inode exec format (see exec(2))
DADDRDisk address in swap, measured in multiples of 512 bytes.
CADDRHead of a linked list of loaded processes using this text segment.
SIZESize of text segment, measured in multiples of 512 bytes.
IPTRCore location of corresponding inode.
CNTNumber of processes using this text segment.
CCNTNumber of processes in core using this text segment.
−p Print process table for active processes with these headings:
LOCThe core location of this table entry.
SRun state encoded thus:
0no process
1waiting for some event
3runnable
4being created
5being terminated
6stopped under trace
FMiscellaneous state variables, or-ed together (hexadecimal):
0001loaded
0002the scheduler process
0004locked for swap out
0008swapped out
0010traced
0020used in tracing
0040locked in by lock(2).
0080in page-wait
0100prevented from swapping during fork(2)
0200gathering pages for raw i/o
0400exiting
1000process resulted from a vfork(2) which is not yet complete
2000another flag for vfork(2)
4000process has no virtual memory, as it is a parent in the context of vfork(2)
8000process is demand paging data pages from its text inode.
POIPnumber of pages currently being pushed out from this process.
PRIScheduling priority, see nice(2).
SIGNALSignals received (signals 1-16 coded in bits 0-15),
UIDReal user ID.
SLPAmount of time process has been blocked.
TIMTime resident in seconds; times over 127 coded as 127.
CPUWeighted integral of CPU time, for scheduler.
NINice level, see nice(2).
PGRPProcess number of root of process group (the opener of the controlling terminal).
PIDThe process ID number.
PPIDThe process ID of parent process.
ADDRIf in core, the page frame number of the first page of the ‘u-area’ of the process. If swapped out, the position in the swap area measured in multiples of 512 bytes.
RSSResident set size − the number of physical page frames allocated to this process.
SRSSRSS at last swap (0 if never swapped).
SIZEVirtual size of process image (data+stack) in multiples of 512 bytes.
WCHANWait channel number of a waiting process.
LINKLink pointer in list of runnable processes.
TEXTPIf text is pure, pointer to location of text table entry.
CLKTCountdown for alarm(2) measured in seconds.
−t Print table for terminals with these headings:
RAWNumber of characters in raw input queue.
CANNumber of characters in canonicalized input queue.
OUTNumber of characters in putput queue.
MODESee tty(4).
ADDRPhysical device address.
DELNumber of delimiters (newlines) in canonicalized input queue.
COLCalculated column position of terminal.
STATEMiscellaneous state variables encoded thus:
Wwaiting for open to complete
Oopen
Shas special (output) start routine
Ccarrier is on
Bbusy doing output
Aprocess is awaiting output
Xopen for exclusive use
Hhangup on close
PGRPProcess group for which this is controlling terminal.
−u print information about a user process; the next argument is its address as given by ps(1). The process must be in main memory, or the file used can be a core image and the address 0.
−f Print the open file table with these headings:
LOCThe core location of this table entry.
FLGMiscellaneous state variables encoded thus:
Ropen for reading
Wopen for writing
Ppipe
CNTNumber of processes that know this open file.
INOThe location of the inode table entry for this file.
OFFSThe file offset, see lseek(2).
FILES
/vmunixnamelist
/dev/kmemdefault source of tables
SEE ALSO
ps(1), stat(2), filsys(5)
K. Thompson, UNIX Implementation
O. Babaoglu and W. Joy Data Structures added in the Berkeley Virtual Memory Extensions to the UNIX System
3rd Berkeley Distribution