.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)pstat.8 6.3 (Berkeley) 5/24/86
.TH PSTAT 8 "May 24, 1986"
pstat \- print system facts
interprets the contents of certain system tables.
is given, the tables are sought there, otherwise
The required namelist is taken from
describe all process slots rather than just active ones.
Print the inode table with the these headings:
The core location of this table entry.
Miscellaneous state variables encoded thus:
access time must be corrected
file system is mounted here
wanted by another process (L flag is on)
changed time must be corrected
someone waiting for a lock
Number of open file table entries for this inode.
Major and minor device number of file system in which
Reference count of shared locks on the inode.
Reference count of exclusive locks on the inode (this may
be > 1 if, for example, a file descriptor is inherited across a fork).
I-number within the device.
Number of links to this inode.
Number of bytes in an ordinary file, or
major and minor device of special file.
Print the text table with these headings:
The core location of this table entry.
Miscellaneous state variables encoded thus:
text not yet written on swap device
resulted from demand-page-from-inode exec format (see
Disk address in swap, measured in multiples of 512 bytes.
Head of a linked list of loaded processes using this text segment.
Size of resident text, measured in multiples of 512 bytes.
Size of text segment, measured in multiples of 512 bytes.
Core location of corresponding inode.
Number of processes using this text segment.
Number of processes in core using this text segment.
Forward link in free list.
Backward link in free list.
Print process table for active processes with these headings:
The core location of this table entry.
stopped (by signal or under trace)
Miscellaneous state variables, or'ed together (hexadecimal):
prevented from swapping during
will restore old mask after taking signal
doing physical I/O (bio.c)
which is not yet complete
process has no virtual memory, as it is a parent in the context of
process is demand paging data pages from its text inode.
process using sequential VM patterns
process using random VM patterns
using old 4.1-compatible signal semantics
process needs profiling tick
process is scanning descriptors during select
process page tables have changed
number of pages currently being pushed out from this process.
Signals received (signals 1-32 coded in bits 0-31),
Amount of time process has been blocked.
Time resident in seconds; times over 127 coded as 127.
Weighted integral of CPU time, for scheduler.
Process number of root of process group.
The process ID of parent process.
If in core, the page frame number of the first page of the `u-area' of
If swapped out, the position in the swap area
measured in multiples of 512 bytes.
Resident set size \- the number of physical page frames allocated
RSS at last swap (0 if never swapped).
Virtual size of process image (data+stack) in multiples of 512 bytes.
Wait channel number of a waiting process.
Link pointer in list of runnable processes.
If text is pure, pointer to location of text table entry.
Print table for terminals
Number of characters in raw input queue.
Number of characters in canonicalized input queue.
Number of characters in putput queue.
Number of delimiters (newlines) in canonicalized input queue.
Calculated column position of terminal.
Miscellaneous state variables encoded thus:
delay timeout in progress
waiting for open to complete
outq has been flushed during DMA
process is awaiting output
Process group for which this is controlling terminal.
Line discipline; blank is old tty OTTYDISC or ``new tty'' for NTTYDISC
or ``net'' for NETLDISC (see
print information about a user process;
the next argument is its address as given
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
succesfully if the process is in main memory.
Print the open file table with these headings:
The core location of this table entry.
The type of object the file table entry points to.
Miscellaneous state variables encoded thus:
signal pgrp when data ready
Number of processes that know this open file.
Number of messages outstanding for this file.
The location of the inode table entry or socket structure for this file.
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
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.
/dev/kmem default source of tables
It would be very useful if the system recorded \*(lqmaximum occupancy\*(rq
on the tables reported by
even more useful if these tables were dynamically allocated.