pstat(1M) pstat(1M)NAME pstat - prints system facts SYNOPSIS pstat [-a] [-b] [-f] [-i] [-m] [-nnamelist] [-p] [-rrate] [-t] [-uaddress] [-v] [file] ARGUMENTS -a (-p mode only) Reports on all process slots, rather than just the active ones -b Prints the system I/O buffer header information with the following headings: LOC Indicates the core location of the buffer header. FLAGS Contains 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 (is not supported on all computers). 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 be written out before the buffer can be reallocated. O The open routine has been called for this January 1992 1
pstat(1M) pstat(1M)device. S The buffer is ``stale.'' DEVICE Contains the major and minor device numbers for the device to which the buffer is queued (or that the buffer contains information from). ADDR Contains the core address of the data in the buffer. BLKNO Specifies the block number of the block specified under DEVICE. -f Prints the open file table with these headings: LOC Contains the core location of this table entry. FLG Contains miscellaneous state variables, encoded thus: R Open for reading. W Open for writing. P Pipe. CNT Contains the number of processes that know this open file. INO Contains the location of the inode table entry for this file. OFFS Contains the file offset (see lseek(2)). file Specifies the file from which the tables are sought. If this argument is not specified, /dev/kmem is the default. -i Prints the inode table with these headings: LOC Contains the core location of this table entry. FLAGS Contains miscellaneous state variables, encoded thus: L Locked. U The update time fs(4) must be corrected. 2 January 1992
pstat(1M) pstat(1M)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. C Changed time must be corrected. CNT Contains the number of open file-table entries for this inode. DEVICE Contains the major and minor device number of file system in which this inode resides. INO Contains the inumber within the device. MODE Contains the mode bits (see chmod(2)). NLK Contains the number of links to this inode. UID Contains the user ID of owner. SIZ/DEV Contains the number of bytes in an ordinary file, or major and minor device of device file. LOCK Contains the address of the locklist structure for this inode. -m Prints the total amount of memory in kilobytes, followed by the amount of free memory in kilobytes. -nnamelist Specifies a system code file (namelist) other than the default /unix. -p Prints 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. January 1992 3
pstat(1M) pstat(1M)3 Being terminated. 4 Stopped under trace. 5 Being created. 6 Running. 7 Being swapped. F Contains the 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 awakened by a signal. 20 In core. 40 Locked in memory. PRI Contains the scheduling priority (see nice(2)). SIGNAL Contains the signals received (signals 1 to 16 coded in bits 0 to 15). UID Contains the real user ID. TIM Contains the time resident in seconds; times over 127 coded as 127. CPU Contains the weighted integral of CPU time, for scheduler. NI Contains the nice level (see nice(2)). PGRP Contains the process number of root of process group (the opener of the controlling terminal). PID Contains the process ID number. PPID Contains the process ID of parent process. ADDR If in core, contains the physical address of the page tables in the proc structure for the ``u- 4 January 1992
pstat(1M) pstat(1M)area'' of the process; if swapped out, the position in the swap area is measured in multiples of 512 bytes. SIZE Contains the size of process image in multiples of the logical page size. WCHAN Contains the wait channel number of a waiting process. LINK Contains the link pointer in list of runnable processes. CLKT Contains the countdown for alarm(2) measured in seconds. -rrate Makes the execution of pstat repeat at a rate defined by the next parameter. -t Prints the table for terminals, with these headings: LOC Contains the core location of this table entry. RAW Contains the number of characters in raw input queue. CAN Contains the number of characters in canonicalized input queue. OUT Contains the number of characters in output queue. PROC Contains the core location of the proc routine. IFLAG Contains the input modes (see termio(7)). OFLAG Contains the output modes (see termio(7)). CFLAG Contains the control modes (see termio(7)). LFLAG Contains the line discipline modes (see termio(7)). STATE Contains the internal state, as shown here: TIMEOUT 00000001 Delay timeout in progress. January 1992 5
pstat(1M) pstat(1M)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 TS_RCOLL 00200000 Collision in read select. TS_WCOLL 00400000 Collision in write select. TS_NBIO 01000000 Tty in nonblocking mode. TS_ASYNC 02000000 Tty in async I/O mode. TS_STOP 04000000 Block background output. PGRP Contains the process group for which this is the controlling terminal. LN Contains the line discipline. DEL Contains the number of delimiters (newlines) in canonicalized input queue. COL Contains the calculated column position of terminal. ROW Contains the calculated row position of terminal. IX Contains the index to the table of core locations. -uaddress Prints information about a user process. The next argument is its address of the process as given by ps(1). The process can be in main memory, or the file used can be a core image and the address 0. -v Causes a number of the other options to generate more verbose output. Often this means that they list table entries that are not currently active or in use. DESCRIPTION pstat interprets the contents of certain system tables. EXAMPLES The following command displays all of the active inodes in a table format with headings 6 January 1992
pstat(1M) pstat(1M)pstat -i FILES /bin/pstat Executable file /dev/kmem File containing default source of tables /unix Name-list file SEE ALSO ps(1) in A/UX Command Reference stat(2), fs(4) in A/UX Programmer's Reference A/UX Local System Administration January 1992 7