PSTAT(8) — System Manager’s Manual — Maintenance Commands
NAME
pstat − print system facts
SYNOPSIS
/etc/pstat −aixptufT [ suboptions ] [ system ] [ corefile ]
DESCRIPTION
Pstat interprets the contents of certain system tables. If corefile is given, the tables are sought there, otherwise in /dev/kmem. The required namelist is taken from /vmunix unless system is specified.
OPTIONS
−a Under −p, describe all process slots rather than just active ones.
−i Print the inode table with these headings:
LOCThe core location of this table entry.
FLAGSMiscellaneous state variables encoded thus:
Llocked
Uupdate time (fs(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
Sshared lock applied
Eexclusive lock applied
Zsomeone waiting for an exclusive lock
CNTNumber of open file table entries for this inode.
DEVMajor and minor device number of file system in which this inode resides.
RDCReference count of shared locks on the inode.
WRCReference count of exclusive locks on the inode (this may be > 1 if, for example, a file descriptor is inherited across a fork).
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 execve(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):
000001loaded
000002the scheduler process
000004locked for swap out
000008swapped out
000010traced
000020used in tracing
000040locked in by lock(2).
000080in page-wait
000100prevented from swapping during fork(2)
000200gathering pages for raw i/o
000400exiting
001000process resulted from a vfork(2) which is not yet complete
002000another flag for vfork(2)
004000process has no virtual memory, as it is a parent in the context of vfork(2)
008000process is demand paging data pages from its text inode.
010000process has advised of anomalous behavior with vadvise(2).
020000process has advised of sequential behavior with vadvise(2).
040000process is in a sleep which will timeout.
080000a parent of this process has exited and this process is now considered detached.
100000process used some new signal primitives, i.e. sigset(3); more system calls will restart.
200000process is owed a profiling tick.
POIPnumber of pages currently being pushed out from this process.
PRIScheduling priority, see setpriority(2).
SIGNALSignals received (signals 1-32 coded in bits 0-31),
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 setpriority(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.
DISCLine discipline; blank is old tty OTTYDISC or “new tty” for NTTYDISC or “net” for NETLDISC (see bk(4)).
−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.
TYPEThe type of object the file table entry points to.
FLGMiscellaneous state variables encoded thus:
Ropen for reading
Wopen for writing
Aopen for appending
CNTNumber of processes that know this open file.
INOThe location of the inode table entry for this file.
OFFS/SOCK
The file offset (see lseek(2)), or the core address of the associated socket structure.
−s print information about swap space usage: the number of (1k byte) pages used and free is given as well as the number of used pages which belong to text images.
−T prints the number of used and free slots in the several system tables and is useful for checking to see how full system tables have become if the system is under heavy load.
FILES
/vmunixnamelist
/dev/kmemdefault source of tables
SEE ALSO
ps(1), stat(2), fs(5)
K. Thompson, UNIX Implementation
BUGS
It would be very useful if the system recorded “maximum occupancy” on the tables reported by −T; even more useful if these tables were dynamically allocated.
Sun System Release 0.3 — 27 March 1983