Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

iostat(1)

ps(1)

vmstat(1)

stat(2)

fs(5)

PSTAT(8)  —  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

−aUnder −p, describe all process slots rather than just active ones. 

−iPrint the inode table including the associated vnode entries with these headings:

LOCThe core location of this table entry. 

IFLAGMiscellaneous inode state variables encoded thus:

Ainode access time must be corrected

Cinode has been changed

Linode is locked

Rinode is being referenced

Tinode contains a pure text prototype

Uupdate time (fs(5)) must be corrected

Wwanted by another process (L flag is on)

IDEVICEMajor and minor device number of file system in which this inode resides. 

INOI-number within the device. 

MODEMode bits in octal, see chmod(2).

NLKNumber of links to this inode. 

UIDUser ID of owner. 

SIZE/DEVNumber of bytes in an ordinary file, or major and minor device of special file. 

VFLAGMiscellaneous vnode state variables encoded thus:

Rroot of its file system

Sshared lock applied

Eexclusive lock applied

Tvnode is a pure text prototype

Zprocess is waiting for a shared or exclusive lock

CNTNumber of open file table entries for this vnode. 

SHCReference count of shared locks on the vnode. 

EXCReference count of exclusive locks on the vnode (this may be > 1 if, for example, a file descriptor is inherited across a fork). 

TYPEVnode file type, either VNON (no type), VREG (regular), VDIR (directory), VBLK (block device), VCHR (character device), VLNK (symbolic link), VSOC (socket), or VBAD (bad). 

−xPrint the text table with these headings:

LOCThe core location of this table entry. 

FLAGSMiscellaneous state variables encoded thus:

Presulted from demand-page-from-inode exec format (see execve(2))

Tptrace(2) in effect

Wtext not yet written on swap device

Lloading in progress

Klocked

wwanted (L flag is on)

DADDRDisk address in swap, measured in multiples of 512 bytes. 

CADDRHead of a linked list of loaded processes using this text segment. 

RSSResident set size of text segment, measured in pagesize units (2048 for a Sun-2; 8192 for a Sun-3). 

SIZESize of text segment, measured in pagesize units. 

VPTRCore location of corresponding vnode. 

CNTNumber of processes using this text segment. 

CCNTNumber of processes in core using this text segment. 

−pPrint process table for active processes with these headings:

LOCThe core location of this table entry. 

SRun state encoded thus:

0no process

1awaiting an event

2(abandoned state)

3runnable

4being created

5being terminated

6stopped (by signal or under trace)

FMiscellaneous state variables, or’ed together (hexadecimal):

0000001loaded

0000002a system process (scheduler or page-out daemon)

0000004locked for swap out

0000008swapped out during process creation

0000010traced

0000020used in tracing

0000040user settable lock in core

0000080in page-wait

0000100prevented from swapping during fork(2)

0000200will restore old mask after taking signal

0000400exiting

0000800doing physical I/O

0001000process resulted from a vfork(2) which is not yet complete

0002000another flag for vfork(2)

0004000process has no virtual memory, as it is a parent in the context of vfork(2)

0008000process is demand paging data pages from its text inode

0010000process has advised of sequential VM behavior with vadvise(2)

0020000process has advised of random VM behavior with vadvise(2)

0100000using old 4.1-compatible signal semantics

0200000process needs a profiling tick

0400000process is scanning descriptors during select

1000000page tables for this process have changed (tlb is dirty)

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 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. 

−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 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:

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)).

−uprint information about a user process; the next argument is its address as given by ps(1). The process must be in main memory.

−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 present

Xexclusive lock present

Isignal pgrp when data ready

CNTNumber of processes that know this open file. 

MSGNumber of references from message queue. 

DATAThe location of the vnode table entry or socket for this file. 

OFFSETThe file offset (see lseek(2)).

−sprint information about swap space usage:

avail:The total number of (kilobyte) blocks in the swap area. 

used:The number of blocks in use. 

(text:)The number of blocks containing program text. 

free:The number of free blocks. 

wasted:
The number of blocks allocated, but not currently in use. (Additional text blocks are allocated to a process by a fixed number of blocks, the number data blocks is doubled for each successive allocation.)

missing:
Blocks that are neither free, nor allocated at the moment.  A nonzero value may indicate that swapping occurred while pstat was running. 

−Tprints 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), 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. 

Sun Release 3.2  —  Last change: 4 June 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026