Annotation of 43BSDReno/usr.sbin/pstat/pstat.8, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1980 Regents of the University of California.
                      2: .\" All rights reserved.  The Berkeley software License Agreement
                      3: .\" specifies the terms and conditions for redistribution.
                      4: .\"
                      5: .\"    @(#)pstat.8     6.6 (Berkeley) 6/24/90
                      6: .\"
                      7: .TH PSTAT 8 "June 24, 1990"
                      8: .UC 4
                      9: .SH NAME
                     10: pstat \- print system facts
                     11: .SH SYNOPSIS
                     12: .B pstat
                     13: .B \-aixptufT
                     14: [
                     15: .B suboptions
                     16: ] [
                     17: .B system
                     18: ] [
                     19: .B corefile
                     20: ]
                     21: .SH DESCRIPTION
                     22: .I Pstat
                     23: interprets the contents of certain system tables.
                     24: If
                     25: .I corefile
                     26: is given, the tables are sought there, otherwise
                     27: in
                     28: .I /dev/kmem.
                     29: The required namelist is taken from
                     30: .I /vmunix
                     31: unless 
                     32: .I system
                     33: is specified.
                     34: Options are
                     35: .TP \w'WCHAN\ 'u
                     36: .B \-a
                     37: Under
                     38: .BR \-p ,
                     39: describe all process slots rather than just active ones.
                     40: .TP
                     41: .B \-i
                     42: Print the inode table with the these headings:
                     43: .IP LOC
                     44: The core location of this table entry.
                     45: .PD 0
                     46: .IP FLAGS
                     47: Miscellaneous state variables encoded thus:
                     48: .RS
                     49: .IP L
                     50: locked
                     51: .IP U
                     52: update time
                     53: .RI ( fs (5))
                     54: must be corrected
                     55: .IP A
                     56: access time must be corrected
                     57: .IP W
                     58: wanted by another process (L flag is on)
                     59: .IP C
                     60: changed time must be corrected
                     61: .IP S
                     62: shared lock applied
                     63: .IP E
                     64: exclusive lock applied
                     65: .IP Z
                     66: someone waiting for a lock
                     67: .IP M
                     68: contains modifications
                     69: .IP R
                     70: has a rename in progress
                     71: .RE
                     72: .IP CNT
                     73: Number of open file table entries for this inode.
                     74: .IP DEV
                     75: Major and minor device number of file system in which
                     76: this inode resides.
                     77: .IP RDC
                     78: Reference count of shared locks on the inode.
                     79: .IP WRC
                     80: Reference count of exclusive locks on the inode (this may
                     81: be > 1 if, for example, a file descriptor is inherited across a fork).
                     82: .IP INO
                     83: I-number within the device.
                     84: .IP MODE
                     85: Mode bits, see
                     86: .IR chmod (2).
                     87: .IP NLK
                     88: Number of links to this inode.
                     89: .IP UID
                     90: User ID of owner.
                     91: .IP SIZ/DEV
                     92: Number of bytes in an ordinary file, or
                     93: major and minor device of special file.
                     94: .PD
                     95: .TP
                     96: .B \-x
                     97: Print the text table with these headings:
                     98: .IP LOC
                     99: The core location of this table entry.
                    100: .PD 0
                    101: .IP FLAGS
                    102: Miscellaneous state variables encoded thus:
                    103: .RS
                    104: .IP T
                    105: .IR ptrace (2)
                    106: in effect
                    107: .IP W
                    108: text not yet written on swap device
                    109: .IP L
                    110: loading in progress
                    111: .IP K
                    112: locked
                    113: .IP w
                    114: wanted (L flag is on)
                    115: .IP P
                    116: resulted from demand-page-from-vnode exec format (see
                    117: .IR execve (2))
                    118: .RE
                    119: .PD
                    120: .IP DADDR
                    121: Disk address in swap, measured in multiples of 512 bytes.
                    122: .IP CADDR
                    123: Head of a linked list of loaded processes using this text segment.
                    124: .IP RSS
                    125: Size of resident text, measured in multiples of 512 bytes.
                    126: .IP SIZE
                    127: Size of text segment, measured in multiples of 512 bytes.
                    128: .IP VPTR
                    129: Core location of corresponding vnode.
                    130: .IP CNT
                    131: Number of processes using this text segment.
                    132: .IP CCNT
                    133: Number of processes in core using this text segment.
                    134: .IP FORW
                    135: Forward link in free list.
                    136: .IP BACK
                    137: Backward link in free list.
                    138: .PD
                    139: .TP
                    140: .B \-p
                    141: Print process table for active processes with these headings:
                    142: .IP LOC
                    143: The core location of this table entry.
                    144: .PD 0
                    145: .IP S
                    146: Run state encoded thus:
                    147: .RS
                    148: .IP 0
                    149: no process
                    150: .IP 1
                    151: waiting for some event
                    152: .IP 3
                    153: runnable
                    154: .IP 4
                    155: being created
                    156: .IP 5
                    157: being terminated
                    158: .IP 6
                    159: stopped (by signal or  under trace)
                    160: .RE
                    161: .IP F
                    162: Miscellaneous state variables, or'ed together (hexadecimal):
                    163: .RS
                    164: .IP 0001 9n
                    165: loaded
                    166: .IP 0002
                    167: the scheduler process
                    168: .IP 0004
                    169: locked for swap out
                    170: .IP 0008
                    171: swapped out
                    172: .IP 0010
                    173: traced
                    174: .IP 0020
                    175: used in tracing
                    176: .      \".IP 000040
                    177: .      \"locked in by
                    178: .      \".IR lock (2).
                    179: .IP 0080
                    180: in page-wait
                    181: .IP 0100
                    182: prevented from swapping during
                    183: .IR fork (2)
                    184: .IP 0200
                    185: will restore old mask after taking signal
                    186: .IP 0400
                    187: exiting
                    188: .IP 0800
                    189: doing physical I/O (bio.c)
                    190: .IP 1000
                    191: process resulted from a
                    192: .IR vfork (2)
                    193: which is not yet complete
                    194: .IP 2000
                    195: another flag for
                    196: .IR vfork (2)
                    197: .IP 4000
                    198: process has no virtual memory, as it is a parent in the context of
                    199: .IR vfork (2)
                    200: .IP 8000
                    201: process is demand paging data pages from its text vnode.
                    202: .IP 10000
                    203: process using sequential VM patterns
                    204: .IP 20000
                    205: process using random VM patterns
                    206: .IP 100000
                    207: using old 4.1-compatible signal semantics
                    208: .IP 200000
                    209: process needs profiling tick
                    210: .IP 400000
                    211: process is scanning descriptors during select
                    212: .IP 1000000
                    213: process page tables have changed
                    214: .RE
                    215: .IP POIP
                    216: number of pages currently being pushed out from this process.
                    217: .IP PRI
                    218: Scheduling priority, see
                    219: .IR setpriority (2).
                    220: .IP SIG
                    221: Signals received (signals 1-32 coded in bits 0-31),
                    222: .IP UID
                    223: Real user ID.
                    224: .IP SLP
                    225: Amount of time process has been blocked.
                    226: .IP TIM
                    227: Time resident in seconds; times over 127 coded as 127.
                    228: .IP CPU
                    229: Weighted integral of CPU time, for scheduler.
                    230: .IP NI
                    231: Nice level,
                    232: see
                    233: .IR setpriority (2).
                    234: .IP PID
                    235: The process ID number.
                    236: .IP PPID
                    237: The process ID of parent process.
                    238: .IP ADDR
                    239: If in core, the page frame number of the first page of the `u-area' of
                    240: the process.
                    241: If swapped out, the position in the swap area
                    242: measured in multiples of 512 bytes.
                    243: .IP RSS
                    244: Resident set size \- the number of physical page frames allocated
                    245: to this process.
                    246: .IP SRSS
                    247: RSS at last swap (0 if never swapped).
                    248: .IP SIZE
                    249: Virtual size of process image (data+stack) in multiples of 512 bytes.
                    250: .IP WCHAN
                    251: Wait channel number of a waiting process.
                    252: .IP LINK
                    253: Link pointer in list of runnable processes.
                    254: .IP TEXTP
                    255: If text is pure, pointer to location of text table entry.
                    256: .PD
                    257: .TP
                    258: .B \-t
                    259: Print table for terminals
                    260: with these headings:
                    261: .IP RAW
                    262: Number of characters in raw input queue.
                    263: .PD 0
                    264: .IP CAN
                    265: Number of characters in canonicalized input queue.
                    266: .IP OUT
                    267: Number of characters in putput queue.
                    268: .IP MODE
                    269: See
                    270: .IR tty (4).
                    271: .IP ADDR
                    272: Physical device address.
                    273: .IP DEL
                    274: Number of delimiters (newlines) in canonicalized input queue.
                    275: .IP COL
                    276: Calculated column position of terminal.
                    277: .IP STATE
                    278: Miscellaneous state variables encoded thus:
                    279: .RS
                    280: .IP T
                    281: delay timeout in progress
                    282: .IP W
                    283: waiting for open to complete
                    284: .IP O
                    285: open
                    286: .IP F
                    287: outq has been flushed during DMA
                    288: .IP C
                    289: carrier is on
                    290: .IP B
                    291: busy doing output
                    292: .IP A
                    293: process is awaiting output
                    294: .IP X
                    295: open for exclusive use
                    296: .IP S
                    297: output stopped
                    298: .IP H
                    299: hangup on close
                    300: .RE
                    301: .IP PGRP
                    302: Process group for which this is controlling terminal.
                    303: .IP DISC
                    304: Line discipline; blank is old tty OTTYDISC or ``new tty'' for NTTYDISC
                    305: or ``net'' for NETLDISC (see
                    306: .IR bk (4)).
                    307: .PD
                    308: .TP
                    309: .B \-u
                    310: print information about a user process;
                    311: the next argument is its address as given
                    312: by
                    313: .IR ps (1).
                    314: The process must be in main memory, or the file used can
                    315: be a core image and the address 0.
                    316: Only the fields located in the first page cluster can be located
                    317: succesfully if the process is in main memory.
                    318: .TP
                    319: .B \-f
                    320: Print the open file table with these headings:
                    321: .IP LOC
                    322: The core location of this table entry.
                    323: .IP TYPE
                    324: The type of object the file table entry points to.
                    325: .PD 0
                    326: .IP FLG
                    327: Miscellaneous state variables encoded thus:
                    328: .RS
                    329: .IP R
                    330: open for reading
                    331: .IP W
                    332: open for writing
                    333: .IP A
                    334: open for appending
                    335: .IP S
                    336: shared lock present
                    337: .IP X
                    338: exclusive lock present
                    339: .IP I
                    340: signal pgrp when data ready
                    341: .RE
                    342: .IP CNT
                    343: Number of processes that know this open file.
                    344: .IP MSG
                    345: Number of messages outstanding for this file.
                    346: .IP DATA
                    347: The location of the vnode table entry or socket structure for this file.
                    348: .IP OFFSET
                    349: The file offset (see
                    350: .IR lseek (2)).
                    351: .PD
                    352: .PP
                    353: .B \-s
                    354: print information about swap space usage: the number of (1k byte) pages used
                    355: and free is given as well as the number of used pages which belong
                    356: to text images.
                    357: .PP
                    358: .B \-T
                    359: prints the number of used and free slots in the several system tables
                    360: and is useful for checking to see how full system tables have become if the
                    361: system is under heavy load.
                    362: .SH FILES
                    363: .ta \w'/dev/kmem  'u
                    364: /vmunix        namelist
                    365: .br
                    366: /dev/kmem      default source of tables
                    367: .SH SEE ALSO
                    368: iostat(1),
                    369: ps(1),
                    370: systat(1),
                    371: vmstat(1),
                    372: stat(2),
                    373: fs(5),
                    374: .br
                    375: K. Thompson,
                    376: .I UNIX Implementation
                    377: .SH BUGS
                    378: It would be very useful if the system recorded \*(lqmaximum occupancy\*(rq
                    379: on the tables reported by
                    380: .B \-T;
                    381: even more useful if these tables were dynamically allocated.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.