pstat(8)
Name
pstat − print system facts
Syntax
/etc/pstat −aixptufTk [ suboptions ] [ system ] [ corefile ]
Description
The pstat command interprets the contents of certain system tables. When specifying a namelist and corefile with the pstat command, it is necessary to use the −k option.
Options
-aUnder −p, describe all process slots rather than just active ones.
-fPrint 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
SShared lock
XExclusive use
IAsychronous I/O notification
BBlock if inuse bit 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, see lseek(,), or the core address of the associated socket structure.
-iPrint the gnode table with the these headings:
LOCThe core location of this table entry.
FLAGSMiscellaneous state variables encoded thus:
LLocked
UUpdate time, fs(,), 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
IInuse flag is set (shared line semaphore)
CNTNumber of open file table entries for this gnode.
DEVMajor and minor device number of 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(.).
NLKNumber of links to this gnode.
UIDUser ID of owner.
SIZ/DEVNumber of bytes in an ordinary file, or major and minor device of special file.
-kPrevents the process created from becoming too large, thereby causing performance problems. If -k is given, then either system or corefile is indicated. If corefile is given, the tables are sought there. Otherwise they are sought in /dev/kmem. The required namelist is taken from /vmunix unless system is specified.
-pPrints the 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):
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 plock()
00000080Waiting for page-in to complete
00000100Protected from swapout while tranferring resources to another process
00000200Used by sigpause()
00000400Exiting
00000800Protected from swapout while doing physical I/O
00001000Process resulted from a vfork() which is not yet complete
00002000Parent has received resources returned by vfork() child
00004000Process has no virtual memory, as it is a parent in the context of vfork()
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 select()
00800000A login process
04000000System V file lock applied
08000000Fix-up of unaligned accesses is attempted (RISC only)
10000000Process has done an execve()
20000000The idle process (RISC only)
POIPNumber of pages currently being pushed out from this process.
PRIScheduling priority, see setpriority(.).
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(.).
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 memory, the page frame number of the page table entries 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 real interval timer, setitimer() measured in clock ticks (10 milliseconds).
TTYPAddress of controlling terminal.
DMAPAddress of data segment dmap structure.
SMAPAddress of stack segment dmap structure.
-sPrint the following information about the (1k byte) pages used for 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 number of pages available, which indicate the amount of space available for swapping.
-tPrint table for terminals with these headings:
RAWNumber of characters in raw input queue.
CANNumber of characters in canonicalized input queue.
OUTNumber of characters in output 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:
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)
IInuse flag is set (shared line semaphore)
DOpen nodelay
GIgnore carrier
NNon-blocking I/O
ZAsychronous I/O notification
LTerminal line is in the process of closing
QOutput suspended for flow control
PGRPProcess group for which this is controlling terminal.
DISCLine discipline; blank is old tty OTTYDISC, ntty for NTTYDISC, or termio for TERMIODISC.
-TPrints the number of used and free slots in the several system tables and is useful for checking to see how full the system tables have become if the system is under a heavy load.
-uPrint information about a user process. The next argument is its 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.
-xPrint the text table with these headings:
LOCThe core location of this table entry.
FLAGSMiscellaneous state variables encoded thus:
TThe ptrace() command in effect.
WText not yet written on swap device.
LLoading in progress.
KLocked.
wWanted (L flag is on).
FText structure on Freelist
PResulted from demand-page-from-gnode exec format. For further information, see execve(.).
lLocked from being paged or swapped. For further information, see plock(.).
BAll attached processes being killed due to server write of a.out file.
DADDRAddress of text dmap structure in core.
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 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.
Restrictions
Information on processes can change while pstat is running. The picture it gives is a snapshot taken at a given time.
Files
/vmunix Namelist
/dev/kmem Default source of tables
/dev/mem Used for the −u option