|
|
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: .\" @(#)ps.1 6.5 (Berkeley) 3/10/88 ! 6: .\" ! 7: .TH PS 1 "March 10, 1988" ! 8: .UC 4 ! 9: .SH NAME ! 10: ps \- process status ! 11: .SH SYNOPSIS ! 12: .B ps ! 13: [ ! 14: .B acegklnstuvwxU# ! 15: ] ! 16: .SH DESCRIPTION ! 17: .I Ps ! 18: prints information about processes. ! 19: Normally, only your processes are candidates to be printed by ! 20: .I ps; ! 21: specifying ! 22: .B a ! 23: causes other users' processes to be candidates to be printed; ! 24: specifying ! 25: .B x ! 26: includes processes without control terminals in the candidate pool. ! 27: .PP ! 28: All output formats include, for each process, the process id PID, ! 29: control terminal of the process TT, cpu time used by the process TIME ! 30: (this includes both user and system time), the state STAT of the process, ! 31: and an indication of the COMMAND which is running. ! 32: The state is given by a sequence of letters, e.g. ``RWNA''. ! 33: The first letter indicates the runnability of the process: ! 34: R for runnable processes, ! 35: T for stopped processes, ! 36: P for processes in page wait, ! 37: D for those in disk (or other short term) waits, ! 38: S for those sleeping for less than about 20 seconds, ! 39: and I for idle (sleeping longer than about 20 seconds) ! 40: processes. ! 41: Additional characters after these, if any, ! 42: indicate additional state information. ! 43: The letter W indicates that a process is swapped out, ! 44: showing W if it is, or a blank if it is loaded (in-core). ! 45: A process which has specified a soft limit on memory requirements ! 46: and which is exceeding that limit shows >; such a process is (necessarily) ! 47: not swapped. ! 48: An additional letter may indicate whether a process is running with altered ! 49: CPU scheduling priority (nice); if the process priority is reduced, ! 50: an N is shown, if the process priority has been artificially raised then ! 51: a `<' is shown. ! 52: The final optional letter ! 53: indicates any special treatment of the process for virtual ! 54: memory replacement; the letters correspond to options to the ! 55: .IR vadvise (2) ! 56: call; currently the possibilities are A standing for VA_ANOM and ! 57: S for VA_SEQL. ! 58: An A typically represents a ! 59: .IR lisp (1) ! 60: in garbage collection, and S is typical of large image processing programs ! 61: which are using virtual memory to sequentially address voluminous data. ! 62: .PP ! 63: Here are the options: ! 64: .TP 5 ! 65: .B a ! 66: asks for information about all processes with terminals (ordinarily ! 67: only one's own processes are displayed). ! 68: .TP 5 ! 69: .B c ! 70: prints the command name, as stored internally in the system for purposes ! 71: of accounting, rather than the command arguments, which are kept ! 72: in the process' address space. This is more reliable, if less informative, ! 73: since the process is free to destroy the latter information. ! 74: .TP 5 ! 75: .B e ! 76: Asks for the environment to be printed as well as the arguments to the command. ! 77: .TP 5 ! 78: .B g ! 79: Asks for all processes. ! 80: Without this option, ! 81: .I ps ! 82: only prints ``interesting'' processes. ! 83: Processes are deemed to be uninteresting if they are process group leaders. ! 84: This normally eliminates top-level command interpreters and processes ! 85: waiting for users to login on free terminals. ! 86: .TP 5 ! 87: .B k ! 88: causes the file ! 89: .I /vmcore ! 90: is used in place of ! 91: .IR /dev/kmem " and " /dev/mem. ! 92: This is used for ! 93: postmortem system debugging. ! 94: .TP 5 ! 95: .B l ! 96: asks for a long listing, with fields PPID, CP, PRI, NI, ADDR, SIZE, RSS and ! 97: WCHAN as described below. ! 98: .TP 5 ! 99: .B n ! 100: Asks for numerical output. ! 101: In a long listing, the WCHAN field is printed numerically rather than ! 102: symbolically, or, in a user listing, the USER field is replaced by a ! 103: UID field. ! 104: .TP 5 ! 105: .B s ! 106: Adds the size SSIZ of the kernel stack of each process (for use by system ! 107: maintainers) to the basic output format. ! 108: .TP 5 ! 109: \fBt\fIx\fR ! 110: restricts output to processes whose controlling tty is \fIx\fR ! 111: (which should be specified as printed by ! 112: .I ps, ! 113: e.g. ! 114: .I t3 ! 115: for tty3, ! 116: .I tco ! 117: for console, ! 118: .I td0 ! 119: for ttyd0, ! 120: .I t? ! 121: for processes with no tty, ! 122: .I t ! 123: for processes at the current tty, ! 124: etc). ! 125: This option must be the last one given. ! 126: .TP 5 ! 127: .B u ! 128: A user oriented output is produced. ! 129: This includes fields USER, %CPU, NICE, SIZE, and RSS as described below. ! 130: .TP 5 ! 131: .B v ! 132: A version of the output containing virtual memory statistics is output. ! 133: This includes fields RE, SL, PAGEIN, SIZE, RSS, LIM, TSIZ, TRS, %CPU ! 134: and %MEM, described below. ! 135: .TP 5 ! 136: .B w ! 137: Use a wide output format (132 columns rather than 80); if repeated, ! 138: e.g. ww, use arbitrarily wide output. ! 139: This information is used to decide how much of long commands to print. ! 140: .TP 5 ! 141: .B x ! 142: asks even about processes with no terminal. ! 143: .TP ! 144: .B U ! 145: causes ps to update a private database where it keeps system ! 146: information. Thus ``ps U'' should be included in the /etc/rc file. ! 147: .TP 5 ! 148: .B # ! 149: A process number may be given, ! 150: (indicated here by #), ! 151: in which case the output ! 152: is restricted to that process. ! 153: This option must also be last. ! 154: .PP ! 155: A second argument is taken ! 156: to be the file containing the system's ! 157: namelist. Otherwise, /vmunix is used. ! 158: A third argument tells ! 159: .I ps ! 160: where to look for ! 161: .I core ! 162: if the ! 163: .B k ! 164: option is given, instead of /vmcore. ! 165: If a fourth argument is given, it ! 166: is taken to be the name of a swap file to use instead of ! 167: the default /dev/drum. ! 168: .PP ! 169: Fields which are not common to all output formats: ! 170: .PD 0 ! 171: .IP USER 10 ! 172: name of the owner of the process ! 173: .IP %CPU 10 ! 174: cpu utilization of the process; this is a decaying average over up to ! 175: a minute of previous (real) time. Since the time base over which this ! 176: is computed varies (since processes may be very young) it is possible ! 177: for the sum of all %CPU fields to exceed 100%. ! 178: .IP NICE 10 ! 179: (or NI) process scheduling increment (see ! 180: .IR setpriority (2)) ! 181: .IP SIZE 10 ! 182: virtual size of the process (in 1024 byte units) ! 183: .IP RSS 10 ! 184: real memory (resident set) size of the process (in 1024 byte units) ! 185: .IP LIM 10 ! 186: soft limit on memory used, specified via a call to ! 187: .IR setrlimit (2); ! 188: if no limit has been specified then shown as \fIxx\fR ! 189: .IP TSIZ 10 ! 190: size of text (shared program) image ! 191: .IP TRS 10 ! 192: size of resident (real memory) set of text ! 193: .IP %MEM 10 ! 194: percentage of real memory used by this process. ! 195: .IP RE 10 ! 196: residency time of the process (seconds in core) ! 197: .IP SL 10 ! 198: sleep time of the process (seconds blocked) ! 199: .IP PAGEIN 10 ! 200: number of disk i/o's resulting from references by the process ! 201: to pages not loaded in core. ! 202: .IP UID 10 ! 203: numerical user-id of process owner ! 204: .IP PPID 10 ! 205: numerical id of parent of process ! 206: .IP CP 10 ! 207: short-term cpu utilization factor (used in scheduling) ! 208: .IP PRI 10 ! 209: process priority (non-positive when in non-interruptible wait) ! 210: .IP ADDR 10 ! 211: swap address of the process ! 212: .IP WCHAN 10 ! 213: event on which process is waiting (an address in the system). ! 214: A symbol is chosen that classifies the address, unless numerical ! 215: output is requested (see the ! 216: .B n ! 217: flag). ! 218: In this case, the initial part of the address is ! 219: trimmed off and is printed hexadecimally, e.g., 0x80004000 prints as 4000. ! 220: .sp ! 221: .IP F 10 ! 222: flags associated with process as in ! 223: .RI < sys/proc.h >: ! 224: .br ! 225: .PP ! 226: .sp ! 227: .nf ! 228: .ta 6n 18n 26n ! 229: SLOAD 000001 in core ! 230: SSYS 000002 swapper or pager process ! 231: SLOCK 000004 process being swapped out ! 232: SSWAP 000008 save area flag ! 233: STRC 000010 process is being traced ! 234: SWTED 000020 another tracing flag ! 235: SULOCK 000040 user settable lock in core ! 236: SPAGE 000080 process in page wait state ! 237: SKEEP 000100 another flag to prevent swap out ! 238: SDLYU 000200 delayed unlock of pages ! 239: SWEXIT 000400 working on exiting ! 240: SPHYSIO 000800 doing physical i/o (bio.c) ! 241: SVFORK 001000 process resulted from vfork() ! 242: SVFDONE 002000 another vfork flag ! 243: SNOVM 004000 no vm, parent in a vfork() ! 244: SPAGI 008000 init data space on demand from inode ! 245: SANOM 010000 system detected anomalous vm behavior ! 246: SUANOM 020000 user warned of anomalous vm behavior ! 247: STIMO 040000 timing out during sleep ! 248: SDETACH 080000 detached inherited by init ! 249: SOUSIG 100000 using old signal mechanism ! 250: .fi ! 251: .PD ! 252: .PP ! 253: A process that has exited and has a parent that has not ! 254: yet waited for the process is marked <defunct>; a process ! 255: which is blocked trying to exit is marked <exiting>; ! 256: .I Ps ! 257: makes an educated guess as to the file name ! 258: and arguments given when the process was created ! 259: by examining memory or the swap area. ! 260: The method is inherently somewhat unreliable and in any event ! 261: a process is entitled to destroy this information, ! 262: so the names cannot be counted on too much. ! 263: .SH FILES ! 264: .ta \w'/etc/psdatabase 'u ! 265: /vmunix system namelist ! 266: .br ! 267: /dev/kmem kernel memory ! 268: .br ! 269: /dev/drum swap device ! 270: .br ! 271: /vmcore core file ! 272: .br ! 273: /dev searched to find swap device and tty names ! 274: .br ! 275: /etc/psdatabase system namelist, device, and wait channel information ! 276: .SH "SEE ALSO" ! 277: kill(1), w(1) ! 278: .SH BUGS ! 279: Things can change while ! 280: .I ps ! 281: is running; the picture it gives is only a close ! 282: approximation to reality.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.