pstat(1M) pstat(1M)NAME pstat - print system facts SYNOPSIS pstat [-p [-a]] [-b] [-i] [-m] [-nnamelist] [-rrate] [-t] [-uaddress] [-v [file] DESCRIPTION pstat interprets the contents of certain system tables. If file is given, the tables are sought there, otherwise in /dev/kmem. Unless the -n flag option is used, the required namelist is taken from /unix. FLAG OPTIONS The following flag options are interpreted by pstat: -a Under -p, describe all process slots rather than just ac- tive ones. -b Print the system I/O buffer header information with the following headings: LOC The core location of the buffer header FLAGS Miscellaneous state variables encoded thus: R The buffer is to be read. W The buffer is to be written. D The I/O is done. E An error occurred during the I/O operation of the buffer. B The buffer is busy. P The buffer is being used for physical (raw) I/O. M The buffer has map space allocated (not all machines). W A process wants to access the buffer and is waiting for it. A The buffer has aged. Y The buffer is doing an asynchronous operation (the process that started the I/O does not wait for it to complete). L The buffer contents have changed, and they need to April, 1990 1
pstat(1M) pstat(1M)be written out before the buffer can be reallocat- ed. O The open routine has been called for this device. S The buffer is ``stale.'' DEVICE The major and minor device numbers for the dev- ice to which the buffer is queued (or contains information from) ADDR The core address of the data in the buffer BLKNO The block number of the block on DEVICE. -f Print the open file table with these headings: LOC The core location of this table entry FLG Miscellaneous state variables encoded thus: R Open for reading W Open for writing P Pipe CNT Number of processes that know this open file INO The location of the inode table entry for this file OFFS The file offset (see lseek(2)) -i Print the inode table with these headings: LOC The core location of this table entry FLAGS Miscellaneous state variables encoded thus: L Locked. U The update time fs(4) must be corrected. A The access time must be corrected. M The file system is mounted here. W Wanted by another process (L flag is on). T Contains a text file. 2 April, 1990
pstat(1M) pstat(1M)C Changed time must be corrected. CNT Number of open file table entries for this inode DEVICE Major and minor device number of file system in which this inode resides INO Inumber within the device MODE Mode bits (see chmod(2)) NLK Number of links to this inode UID User ID of owner SIZ/DEV Number of bytes in an ordinary file, or major and minor device of device-file LOCK Address of the locklist structure for this inode -m Print information about core memory allocation and a dump of the memory free map with these headings: LOC The core address of the map entry ADDR The ``click'' address of the area this entry refers to SIZE The size of this area in ``clicks'' -nnamelist Specify a namelist (system code file) other than the de- fault of /unix. -p Print the 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 2 Runnable 3 Being terminated 4 Stopped under trace April, 1990 3
pstat(1M) pstat(1M)5 Being created 6 Running 7 Being xswapped F Flags (octal and additive) associated with the process: 0 Swapped 1 System process 2 Being traced by another process 4 Another tracing flag 10 Process cannot be woken by a signal 20 In core 40 Locked in memory PRI Scheduling priority (see nice(2)) SIGNAL Signals received (signals 1-16 coded in bits 0- 15) UID Real user ID TIM Time resident in seconds; times over 127 coded as 127 CPU Weighted integral of CPU time, for scheduler NI Nice level (see nice (2)) PGRP Process number of root of process group (the opener of the controlling terminal) PID The process ID number PPID The process ID of parent process ADDR If in core, the physical address of the page tables in the proc structure for the "u-area" of the process; if swapped out, the position in the swap area measured in multiples of 512 bytes SIZE Size of process image in multiples of logical page size 4 April, 1990
pstat(1M) pstat(1M)WCHAN Wait channel number of a waiting process LINK Link pointer in list of runnable processes CLKT Countdown for alarm(2) measured in seconds -r Make the execution of pstat repeat at a rate defined by the next parameter. -t Print the table for terminals with these headings: LOC Core location of this table entry RAW Number of characters in raw input queue CAN Number of characters in canonicalized input queue OUT Number of characters in output queue PROC Core location of the proc routine IFLAG Input modes (see termio(7)) OFLAG Output modes (see termio(7)) CFLAG Control modes (see termio(7)) LFLAG Line discipline modes (see termio(7)) STATE Internal state: TIMEOUT 00000001 Delay timeout in progress. WOPEN 00000002 Waiting for open to complete. ISOPEN 00000004 Device is open. TBLOCK 00000010 CARR_ON 00000020 Software copy of carrier-present. BUSY 00000040 Output in progress. OASLP 00000100 Wake-up when output done. IASLP 00000200 Wake-up when input done. TTSTOP 00000400 Output stopped by CONTROL-S. EXTPROC 00001000 External processing. TACT 00002000 CLESC 00004000 Last char escape. RTO 00010000 TTIOW 00020000 TTXON 00040000 TTXOFF 00100000 April, 1990 5
pstat(1M) pstat(1M)TS_RCOLL 00200000 Collision in read select. TS_WCOLL 00400000 Collision in write select. TS_NBIO 01000000 Tty in non-blocking mode. TS_ASYNC 02000000 Tty in async I/O mode. TS_STOP 04000000 Block background output. PGRP Process group for which this is controlling ter- minal LN Line discipline DEL Number of delimiters (newlines) in canonicalized input queue COL Calculated column position of terminal ROW Calculated row position of terminal IX Index to the table of core locations -u Print information about a user process. The next argu- ment 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. -v Cause a number of the other flag options to give a more verbose output. Often this means that they list table entries that are not currently active or in use. EXAMPLE pstat -i displays all the active inodes in a table format with head- ings. FILES /bin/pstat /unix Namelist /dev/kmem Default source of tables SEE ALSO ps(1), stat(2), fs(4). A/UX Local System Administration. 6 April, 1990