|
|
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.3 (Berkeley) 5/24/86 ! 6: .\" ! 7: .TH PSTAT 8 "May 24, 1986" ! 8: .UC 4 ! 9: .SH NAME ! 10: pstat \- print system facts ! 11: .SH SYNOPSIS ! 12: .B /etc/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 M ! 58: file system is mounted here ! 59: .IP W ! 60: wanted by another process (L flag is on) ! 61: .IP T ! 62: contains a text file ! 63: .IP C ! 64: changed time must be corrected ! 65: .IP S ! 66: shared lock applied ! 67: .IP E ! 68: exclusive lock applied ! 69: .IP Z ! 70: someone waiting for a lock ! 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-inode 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 IPTR ! 129: Core location of corresponding inode. ! 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 inode. ! 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 PGRP ! 235: Process number of root of process group. ! 236: .IP PID ! 237: The process ID number. ! 238: .IP PPID ! 239: The process ID of parent process. ! 240: .IP ADDR ! 241: If in core, the page frame number of the first page of the `u-area' of ! 242: the process. ! 243: If swapped out, the position in the swap area ! 244: measured in multiples of 512 bytes. ! 245: .IP RSS ! 246: Resident set size \- the number of physical page frames allocated ! 247: to this process. ! 248: .IP SRSS ! 249: RSS at last swap (0 if never swapped). ! 250: .IP SIZE ! 251: Virtual size of process image (data+stack) in multiples of 512 bytes. ! 252: .IP WCHAN ! 253: Wait channel number of a waiting process. ! 254: .IP LINK ! 255: Link pointer in list of runnable processes. ! 256: .IP TEXTP ! 257: If text is pure, pointer to location of text table entry. ! 258: .PD ! 259: .TP ! 260: .B \-t ! 261: Print table for terminals ! 262: with these headings: ! 263: .IP RAW ! 264: Number of characters in raw input queue. ! 265: .PD 0 ! 266: .IP CAN ! 267: Number of characters in canonicalized input queue. ! 268: .IP OUT ! 269: Number of characters in putput queue. ! 270: .IP MODE ! 271: See ! 272: .IR tty (4). ! 273: .IP ADDR ! 274: Physical device address. ! 275: .IP DEL ! 276: Number of delimiters (newlines) in canonicalized input queue. ! 277: .IP COL ! 278: Calculated column position of terminal. ! 279: .IP STATE ! 280: Miscellaneous state variables encoded thus: ! 281: .RS ! 282: .IP T ! 283: delay timeout in progress ! 284: .IP W ! 285: waiting for open to complete ! 286: .IP O ! 287: open ! 288: .IP F ! 289: outq has been flushed during DMA ! 290: .IP C ! 291: carrier is on ! 292: .IP B ! 293: busy doing output ! 294: .IP A ! 295: process is awaiting output ! 296: .IP X ! 297: open for exclusive use ! 298: .IP S ! 299: output stopped ! 300: .IP H ! 301: hangup on close ! 302: .RE ! 303: .IP PGRP ! 304: Process group for which this is controlling terminal. ! 305: .IP DISC ! 306: Line discipline; blank is old tty OTTYDISC or ``new tty'' for NTTYDISC ! 307: or ``net'' for NETLDISC (see ! 308: .IR bk (4)). ! 309: .PD ! 310: .TP ! 311: .B \-u ! 312: print information about a user process; ! 313: the next argument is its address as given ! 314: by ! 315: .IR ps (1). ! 316: The process must be in main memory, or the file used can ! 317: be a core image and the address 0. ! 318: Only the fields located in the first page cluster can be located ! 319: succesfully if the process is in main memory. ! 320: .TP ! 321: .B \-f ! 322: Print the open file table with these headings: ! 323: .IP LOC ! 324: The core location of this table entry. ! 325: .IP TYPE ! 326: The type of object the file table entry points to. ! 327: .PD 0 ! 328: .IP FLG ! 329: Miscellaneous state variables encoded thus: ! 330: .RS ! 331: .IP R ! 332: open for reading ! 333: .IP W ! 334: open for writing ! 335: .IP A ! 336: open for appending ! 337: .IP S ! 338: shared lock present ! 339: .IP X ! 340: exclusive lock present ! 341: .IP I ! 342: signal pgrp when data ready ! 343: .RE ! 344: .IP CNT ! 345: Number of processes that know this open file. ! 346: .IP MSG ! 347: Number of messages outstanding for this file. ! 348: .IP DATA ! 349: The location of the inode table entry or socket structure for this file. ! 350: .IP OFFSET ! 351: The file offset (see ! 352: .IR lseek (2)). ! 353: .PD ! 354: .PP ! 355: .B \-s ! 356: print information about swap space usage: the number of (1k byte) pages used ! 357: and free is given as well as the number of used pages which belong ! 358: to text images. ! 359: .PP ! 360: .B \-T ! 361: prints the number of used and free slots in the several system tables ! 362: and is useful for checking to see how full system tables have become if the ! 363: system is under heavy load. ! 364: .SH FILES ! 365: .ta \w'/dev/kmem 'u ! 366: /vmunix namelist ! 367: .br ! 368: /dev/kmem default source of tables ! 369: .SH SEE ALSO ! 370: iostat(1), ! 371: ps(1), ! 372: systat(1), ! 373: vmstat(1), ! 374: stat(2), ! 375: fs(5), ! 376: .br ! 377: K. Thompson, ! 378: .I UNIX Implementation ! 379: .SH BUGS ! 380: It would be very useful if the system recorded \*(lqmaximum occupancy\*(rq ! 381: on the tables reported by ! 382: .B \-T; ! 383: even more useful if these tables were dynamically allocated.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.