PSTAT(8) —
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 are:
−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 a 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.
RSSSize of resident text, measured in multiples of 512 bytes.
SIZESize of text segment, measured in multiples of 2048 bytes.
IPTRCore location of corresponding inode.
CNTNumber of processes using this text segment.
CCNTNumber of processes in core using this text segment.
FORWForward link in free list.
BACKBackward link in free list.
−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 (by signal or under trace)
FMiscellaneous state variables, or’ed together (hexadecimal):
0001loaded
0002the scheduler process
0004locked for swap out
0008swapped out
0010traced
0020used in tracing
0080in page-wait
0100prevented from swapping during fork(2)
0200will restore old mask after taking signal
0400exiting
0800doing physical I/O (bio.c)
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.
10000process using sequential VM patterns
20000process using random VM patterns
100000using old 4.1-compatible signal semantics
200000process needs profiling tick
400000process is scanning descriptors during select
1000000process page tables have changed
POIPnumber of pages currently being pushed out from this process.
PRIScheduling priority, see setpriority(2).
SIGSignals 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.
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 2048 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.
−t Print table for terminals with these headings:
RAWNumber of characters in raw input queue.
CANNumber of characters in canonical input queue.
OUTNumber of characters in output queue.
MODESee tty(4).
ADDRPhysical device address.
DELNumber of delimiters (newlines) in canonical input queue.
COLCalculated column position of terminal.
STATEMiscellaneous state variables encoded thus:
Tdelay timeout in progress
Wwaiting for open to complete
Oopen
Foutq has been flushed during DMA
Ccarrier is on
Bbusy doing output
Aprocess is awaiting output
Xopen for exclusive use
Soutput stopped
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. Only the fields located in the first page cluster can be located successfully if the process is in main memory.
−f Print the open file table with these headings:
LOCThe core location of this table entry.
TYPEThe type of object to which the file table entry points.
FLGMiscellaneous state variables encoded thus:
Ropen for reading
Wopen for writing
Aopen for appending
Sshared lock present
Xexclusive lock present
Isignal pgrp when data ready
CNTNumber of processes that know this open file.
MSGNumber of messages outstanding for this file.
DATAThe location of the inode table entry or socket structure for this file.
OFFSETThe file offset (see lseek(2)).
−s print information about swap space usage: the number of (1kb) pages used and free is given, as well as the number of used pages belonging 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
iostat(1), ps(1), systat(1), vmstat(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.
PRPQs 5799-WZQ/5799-PFF: IBM/4.3 — July 1987