NAME
pstat - print system facts

SYNOPSIS
/usr/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.

-p Print process table for active processes with these headings:

LOC The core location of this table entry.
S Run state encoded thus:
0 no process
1 waiting for some event
3 runnable
4 being created
5 being terminated
6 stopped (by signal or under trace)
F Miscellaneous state variables, or’ed together (hexadecimal):
0001 loaded
0002 the scheduler process
0010 traced
0020 used in tracing
0200 will restore old mask after taking signal
0400 exiting
0800 doing physical I/O (bio.c)
100000 using old 4.1-compatible signal semantics
200000 process needs profiling tick
400000 process is scanning descriptors during select
1000000 process page tables have changed
PRI Scheduling priority.
SIG Signals received (signals 1-32 coded in bits 0-31),
UID Real user ID.
SLP Amount of time process has been blocked.
TIM Time resident in seconds; times over 127 coded as 127.
CPU Weighted integral of CPU time, for scheduler.
NI Nice level.
PGRP Process number of root of process group.
PID The process ID number.
PPID The process ID of parent process.
LINK Link pointer in list of runnable processes.

-t Print table for terminals with these headings:

RAW Number of characters in raw input queue.
CAN Number of characters in canonicalized input queue.
OUT Number of characters in putput queue.
MODE See tty(4).
ADDR Physical device address.
DEL Number of delimiters (newlines) in canonicalized input queue.
COL Calculated column position of terminal.
STATE Miscellaneous state variables encoded thus:
T delay timeout in progress
W waiting for open to complete
O open
F outq has been flushed during DMA
C carrier is on
B busy doing output
A process is awaiting output
X open for exclusive use
S output stopped
H hangup on close
PGRP Process group for which this is controlling terminal.
DISC Line discipline; blank is old tty OTTYDISC or "new tty" for
NTTYDISC or "net" for NETLDISC.

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

LOC The core location of this table entry.

TYPE The type of object the file table entry points to.
FLG Miscellaneous state variables encoded thus:
R open for reading
W open for writing
A open for appending
S shared lock present
X exclusive lock present
I signal pgrp when data ready
CNT Number of processes that know this open file.
MSG Number of messages outstanding for this file.
DATA The location of the inode table entry or socket structure for
this file.
OFFSET
The file offset (see lseek(2)).

-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
/vmunix namelist
/dev/kmem default source of tables

SEE ALSO
iostat(1), ps(1), systat(1), vm_stat(1)*, stat(2),
K. Thompson, "UNIX Implementation" (see MachTen Programmer’s Guide)

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.

__________
* Not currently supported under MachTen