pstat(C) 06 January 1993 pstat(C) Name pstat - report system information Syntax pstat [ -aipf ] [ -P pid ] [ -n namelist ] [ -s swapfile ] [ file ] Description The pstat command interprets the contents of certain system tables. pstat searches for these tables in /dev/mem and /dev/kmem. If file is specified, the tables are taken from the specified file rather than /dev/mem. The required namelist is taken from /unix. If no options are specified, pstat prints information for all three tables: the inode table, the process table, and the file table. pstat has the following options: -a Describe all process slots rather than just active ones. (Used in conjunction with the -p option.) -f Print the open file table with these headings: LOC The core location of this table entry. FLAGS Miscellaneous state variables: R open for reading W open for writing A open for append N no delay (non-blocking) S synchronized write operation 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(S). -i Print the inode table with these headings: LOC The core location of this table entry. FLAGS Miscellaneous state variables: L locked U update time must be corrected A access time must be corrected M file system is mounted here W wanted by another process (L flag is on) T contains a text (executable image) file 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 I-number within the device. FS Filesystem type. 1 indicates UNIX. MODE Mode bits, see chmod(S). NLK Number of links to this inode. UID User ID of owner. SIZE/DEV Number of bytes in an ordinary file, or major and minor de- vice of special file. -n namelist Use the file namelist as an alternate namelist in place of /unix. -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 sleeping; waiting for an event to complete 2 runnable; on the run queue 3 zombie; terminated and parent not waiting 4 traced; stopped by debugger 5 idle; being created 6 running; on the processor 7 SXBRK; waiting for more pages of memory F Miscellaneous state variables, ORed together: 0x00000001 System (resident) process always resident in primary memory. 0x00000002 Process is being traced. 0x00000004 Traced process (using ptrace(S)) has been given to parent by wait(S). Don't return this process to parent again until it runs first. 0x00000008 Process sleeping at priority 25 or less and can- not be awakened by a signal. 0x00000010 Process loaded in primary memory. 0x00000020 Process locked in primary memory and cannot be swapped. 0x00000040 Set when signal goes remote (not used). 0x00000080 Process in Stream poll(S) or doing select(S). 0x00000100 Process is being stopped. 0x00000200 Signal or syscall tracing. 0x00000400 Do not run; performing I/O. 0x00000800 Stop on exec(S). 0x00001000 Process is open. 0x00002000 u-area in primary memory. 0x00004000 Set process running on last close. 0x00008000 Process asleep, stop not allowed. 0x00010000 Process is exiting via ptrace(S). 0x00020000 Process is stopped within a call to sleep(K). 0x00040000 u-area is being swapped in or out. 0x00080000 Waiting for u-area swap to complete. 0x00100000 Restore old mask after taking signal. 0x00200000 Child of a fork(S), but no exec(S) yet. 0x00400000 Child being traced after fork(S). 0x00800000 Process may only be traced by the super user. 0x01000000 Process is exiting. PRI Scheduling priority, see nice(C). SIG Signals received (signals 1-32 coded in bits 0-31). UID Real user ID. TIM Time resident in seconds; times over 127 appear as 127. CPU Weighted integral of CPU time used by the scheduler. NI Nice level, see nice(C). PGRP Process number of process group leader. PID The process ID number. PPID The process ID of parent process. ADDR1 ADDR2 The page frame numbers of the first two pages of the u-area of the process. If the u-area of the process is in primary memory, these numbers can be translated into the physical addresses of the pages. If the u-area is swapped out, the numbers correspond to the addresses of the pages in the swap area measured in multiples of 4 kilobytes. WCHAN Wait channel number of a waiting process. LINK Link pointer in list of runnable processes. INODP Pointer to location of shared inode. CLKT Countdown for alarm(S) measured in seconds. -P pid Print information about a user process drawn from its user area (defined in /usr/include/sys/user.h). pid is the ID of the process. It may be obtained using the ps(C) com- mand. -s swapfile Use swapfile as the swapfile. Authorization The behavior of this utility is affected by assignment of the mem author- ization. If you do not have this authorization, the output will be re- stricted to data pertaining to your activities only. Refer to the ``Using a secure system'' chapter of the User's Guide for more details. Files /unix default namelist /dev/mem default source of tables /dev/swap default swap device See also alarm(S), chmod(S), filesystem(FP), lseek(S), nice(C), ps(C), stat(S) System Administrator's Guide Standards conformance pstat is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.