home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume3 / sps / part3 < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  14.3 KB

  1. From: seismo!mcvax!cernvax!hslrswi!robert (Robert Ward)
  2. Subject: SPS man page
  3. Newsgroups: mod.sources
  4. Approved: jpn@panda.UUCP
  5.  
  6. Mod.sources:  Volume 3, Issue 59
  7. Submitted by: seismo!mcvax!cernvax!hslrswi!robert (Robert Ward)
  8.  
  9.  
  10. I forgot to include the man page of SPS. Sorry about that.
  11.  
  12.  
  13. ******************************************************************************
  14.     Robert Ward,
  15.     Hasler AG, Murtenstrasse 137a, CH-3008 Bern, Switzerland
  16.  
  17. Tel.:        (031) - 65 23 19
  18. Uucp:        ... {seismo,decvax,ukc, ... }!mcvax!cernvax!hslrswi!robert
  19. Bitnet:        hslrswi!robert@cernvax.bitnet
  20. Arpa:        hslrswi!robert%cernvax.bitnet@WISCVM.ARPA
  21. Edunet:        hslrswi!robert%cernvax.bitnet@UCBJADE.Berkeley.EDU
  22. ******************************************************************************
  23.  
  24. .if n .pl 66
  25. .TH SPS LOCAL
  26. .SH NAME
  27. sps \ \ \-\ \ \ show process status
  28. .SH SYNOPSIS
  29. \fBsps\ \fP \ [ \fB-defgijkoqrslvwyABDFNPSTUWZ\fP ]\ \ [
  30. \fIprocess\. |\. tty\. |\. user\. .\ .\ .\ .\ .\fP ]
  31. .SH DESCRIPTION
  32. \fISps\fP reports information concerning system processes.
  33. It shows the current state of any process by
  34. listing information such as ownership, CPU time usage, memory usage
  35. and disc activity.
  36. .PP
  37. \fISps\fP should be used in preference to \fIps\fP(1)
  38. as it is faster and the output is easier to understand.
  39. .SH OPTIONS
  40. By default, \fIsps\fP prints basic information about one's own processes.
  41. The various options described below select other processes or make
  42. \fIsps\fP more verbose.
  43. .PP
  44. Upper case options select processes to be described.
  45. Lower case options specify the format of the output.
  46. For instance, the options \fBBv\fP specify that \fIsps\fP
  47. should list "busy" processes in a verbose format.
  48. Unless there is any conflict, lower case options may be used
  49. instead of upper case options, and vice versa.
  50. .PP
  51. The following options specify the format of the listed output -
  52. .TP 8
  53. \fB-d\fP
  54. List output reflecting how each process affects the
  55. disc and paging activity of the system.
  56. .TP
  57. \fB-e\fP
  58. List the environment passed to each process.
  59. .TP
  60. \fB-f\fP
  61. Include the process-id of the parent of each process.
  62. .TP
  63. \fB-g\fP
  64. Include the process group of each process.
  65. .TP
  66. \fB-o\fP
  67. Avoid looking at the swap device (/dev/drum). This tends to make \fIsps\fP
  68. run faster, although no information concerning swapped processes
  69. can be obtained.
  70. .TP
  71. \fB-q\fP
  72. By default, \fIsps\fP
  73. lists the sum of the user plus system times under the
  74. \fITime\fP and \fIChild\fP fields.  This option forces \fIsps\fP
  75. to list only the user times.
  76. .TP
  77. \fB-r\fP
  78. Repeat the output indefinitely.
  79. If the next argument is numeric, \fIsps\fP repeats the output with that
  80. many seconds delay between each repetition.
  81. Otherwise the output is repeated with no delay.
  82. .TP
  83. \fB-l\fP
  84. .br
  85. .ns
  86. .TP
  87. \fB-v\fP
  88. List additional information in a verbose format. See below.
  89. .TP
  90. \fB-w\fP
  91. List output in a wide format.  This option forces \fIsps\fP
  92. to print all the command arguments, even if doing so extends the output
  93. beyond one line.
  94. .TP
  95. \fB-y\fP
  96. Show the status of each terminal line.
  97. .PP
  98. The following options specify which processes are to be described -
  99. .TP 8
  100. \fB-A\fP
  101. List all processes.
  102. .TP
  103. \fB-B\fP
  104. List busy processes.  A process is considered to be busy
  105. if it is immediately runnable or awaiting a fast event such as disc I/O.
  106. .TP
  107. \fB-D\fP
  108. List detached processes.
  109. .TP
  110. \fB-F\fP
  111. List foreground processes.
  112. .TP
  113. \fB-N\fP
  114. Show no processes at all. Only the summary line is printed.
  115. .TP
  116. \fB-P\fP
  117. List only processes whose identifiers are specified in the following arguments.
  118. .TP
  119. \fB-S\fP
  120. List stopped processes.
  121. .TP
  122. \fB-T\fP
  123. List only processes attached to the following specified terminals.
  124. .TP
  125. \fB-U\fP
  126. List only processes belonging to the following specified users.
  127. .TP
  128. \fB-W\fP
  129. List waiting processes.
  130. .TP
  131. \fB-Z\fP
  132. List zomby (exiting) processes.
  133. .PP
  134. The following are miscellaneous options -
  135. .TP 8
  136. \fB-i\fP
  137. Initialise \fIsps\fP.
  138. This is necessary if new users are added to the password file,
  139. or if a new version of UNIX is installed.
  140. Sps builds a new information file summarising pertinent information
  141. read from the password file (/etc/passwd), the executable kernel image
  142. (/vmunix) and the directory of tty devices (/dev).
  143. See also the \fB-j\fP and \fB-s\fP options.
  144. .TP
  145. \fB-j\fP
  146. Specify an information file other than the default (/etc/spsinfo).
  147. The next argument is taken to be the name of a suitable information file.
  148. If the \fB-i\fP flag is also specified, \fIsps\fP builds a
  149. new information file with the given name.
  150. Otherwise, \fBsps\fP reads previously created summarising information
  151. from that file.
  152. .TP
  153. \fB-k\fP
  154. Use a specific disc file rather than the default physical memory (/dev/mem)
  155. and kernel virtual memory (/dev/kmem) files. The next argument is taken
  156. to be the name of a suitable memory dump file.
  157. This flag automatically sets the \fB-o\fP flag.
  158. .TP
  159. \fB-s\fP
  160. This option is used in conjunction with the \fB-i\fP option.
  161. The next argument is taken to be the name of a suitable kernel executable
  162. file, rather than the default (/vmunix).
  163. \fISps\fP looks at the symbol table of this file to determine
  164. the virtual addresses of various kernel structures.
  165. .SH OUTPUT
  166. \fISps\fP produces output in the following fields -
  167. .TP 8
  168. \fITy\fP
  169. The terminal identifier to which the process is attached.
  170. .IP
  171. If this is followed by an underscore, the process is detached.
  172. If it is followed by a period, the process is running in the foreground.
  173. Otherwise the process is running in the background but is still
  174. attached to a terminal.
  175. .TP
  176. \fIUser\fP
  177. The symbolic name of the process' effective user-id (see \fIexec\fP(2)
  178. and \fIsetuid\fP(2)).
  179. This name is defined by the system password file (/etc/passwd)
  180. when \fIsps\fP was last initialised.
  181. Otherwise, an asterisk (*) or vertical bar (|) appearing in this
  182. column denotes that the process is an immediate relative of the
  183. preceding process.
  184. A bar is listed, rather than an asterisk, if both processes belong
  185. to the same process group.
  186. In this case, a user name is listed only if the effective user-id
  187. differs from that of the preceding process.
  188. .TP
  189. \fIProc#\fP
  190. The unique process identifier.
  191. .TP
  192. \fIPpid#\fP
  193. The process-id of the process' parent.
  194. .TP
  195. \fIPgrp#\fP
  196. The process group to which the process belongs.
  197. .TP
  198. \fICommand\fP
  199. The command arguments obtained from the process' own address space.
  200. (If the command name appears in parentheses, \fIsps\fP
  201. was unable to locate the arguments in user space and so reports
  202. the system's idea of the command name.)
  203. .PP
  204. The following additional fields are listed when \fIsps\fP
  205. is invoked with one of the \fB-l\fP or \fB-v\fP options -
  206. .TP 8
  207. \fIStatus\fP
  208. The process' current state.
  209. If this field is listed in upper-case letters, the process is currently
  210. loaded in real memory space ; otherwise it has been swapped out.
  211. The status field may contain one of the following descriptions -
  212. .RS 8
  213. .TP 16
  214. \fIrun\fP
  215. The process can be run immediately.
  216. .TP
  217. \fIstop\fP
  218. The process is stopped (see \fIsigsys\fP(2) or \fIsigvec\fP(2)).
  219. .TP
  220. \fIexit\fP
  221. The process is a zomby.
  222. .RE
  223. .IP
  224. Any other entry in the status field indicates the process is
  225. waiting for some external event to occur.
  226. This is usually for one of the reasons listed below.
  227. (If \fIsps\fP does not know why a process is waiting, it lists
  228. the hexadecimal address of the process' wait channel,
  229. with the initial 80000000 trimmed off.)
  230. A process may be waiting for one of the following reasons -
  231. .RS 8
  232. .TP 16
  233. \fIchild\fP
  234. The process is waiting for a child to terminate (see \fIwait\fP(2)).
  235. .TP
  236. \fIpause\fP
  237. Waiting for a signal to be received (see \fIpause\fP(2)).
  238. .TP
  239. \fIswap\fP
  240. Waiting for a page to be swapped in.
  241. .TP
  242. \fIrswbuf\fP
  243. Waiting for a read from the swap device
  244. \fB/dev/drum.\fP
  245. .TP
  246. \fIdiscio\fP
  247. Waiting for a disc read or write operation.
  248. .TP
  249. \fIrpipe\fP
  250. .br
  251. .ns
  252. .TP
  253. \fIwpipe\fP
  254. Waiting for a read from an empty pipe.  Alternatively, the process
  255. is waiting to write to a full pipe (see pipe\fI(2)\fP).
  256. .TP
  257. \fIrsockt\fP
  258. .br
  259. .ns
  260. .TP
  261. \fIwsockt\fP
  262. Waiting for a read from an empty socket.
  263. Alternatively, the process is waiting to write to a full socket (4.2bsd only).
  264. .TP
  265. \fIsocket\fP
  266. Waiting for a time-out event on a socket (4.2bsd only).
  267. .TP
  268. \fIselect\fP
  269. Blocked by a \fIselect\fP(2) system call (4.2bsd only).
  270. .TP
  271. \fIrmux\fP
  272. Waiting for a read from a multiplexor file (4.1bsd only).
  273. .TP
  274. \fIinode\fP
  275. Waiting for an inode to be allocated or unlocked.
  276. .TP
  277. \fIexlock\fP
  278. .br
  279. .ns
  280. .TP
  281. \fIshlock\fP
  282. Waiting for a file to become unlocked (see flock\fI(2)\fP).
  283. .TP
  284. \fIrtty??\fP
  285. .br
  286. .ns
  287. .TP
  288. \fIwtty??\fP
  289. .br
  290. .ns
  291. .TP
  292. \fIotty??\fP
  293. Waiting for a read or write to the specified terminal, or for the terminal
  294. to be switched on (see \fItty\fP(4)).
  295. Alternatively, waiting for a read or write to the
  296. specified slave pty device (see \fIpty\fP(4)).
  297. .TP
  298. \fIrpty??\fP
  299. .br
  300. .ns
  301. .TP
  302. \fIwpty??\fP
  303. Waiting for a read or write to the specified master pty device
  304. (see \fIpty\fP(4)).
  305. .TP
  306. \fIptrace\fP
  307. This is a parent process tracing its child.
  308. .TP
  309. \fIvfork\fP
  310. This is a vforking parent process waiting for its child to relinquish
  311. memory resources (see \fIvfork\fP(2)).
  312. .TP
  313. \fIfloppy\fP
  314. .br
  315. .ns
  316. .TP
  317. \fIprintr\fP
  318. .br
  319. .ns
  320. .TP
  321. \fIvarian\fP
  322. .br
  323. .ns
  324. .TP
  325. \fIr??buf\fP
  326. Waiting for the specified device to complete an I/O operation.
  327. .RE
  328. .TP 8
  329. \fIFl\fP
  330. Flags associated with the current state of the process.
  331. These flags may be any of the following -
  332. .RS 8
  333. .TP 16
  334. \fIU\fP
  335. The process is a UNIX system process.
  336. .TP
  337. \fIT\fP
  338. The process is being traced or debugged.
  339. .TP
  340. \fIV\fP
  341. The process is a child currently being vforked (see \fIvfork\fP(2)).
  342. .TP
  343. \fII\fP
  344. The process is undergoing physical I/O.
  345. .TP
  346. \fIA\fP
  347. The system has detected, or the user has warned of
  348. anomalous paging behaviour (see \fIvadvise\fP(2)).
  349. .RE
  350. .TP 8
  351. \fINice\fP
  352. The "niceness" of the process (see \fInice\fP(2)).
  353. .TP
  354. \fIVirtual\fP
  355. The virtual memory size of the process in kilobytes.
  356. The first figure indicates the sum of the data and stack segments,
  357. the second figure that of the text segment.
  358. .TP
  359. \fIResident\fP
  360. The resident memory size of the process in kilobytes, representing
  361. the real memory devoted to the process.
  362. .TP
  363. \fI%M\fP
  364. The percentage of available real memory allocated to this process.
  365. .TP
  366. \fITime\fP
  367. The total CPU time accumulated by this process.
  368. (This is the sum of the system plus user times, unless the \fB-q\fP
  369. flag is specified in which case only the user time is listed.)
  370. .TP
  371. \fIChild\fP
  372. The total CPU time accumulated by the process' children.
  373. (This is the sum of the system plus user times, unless the \fB-q\fP
  374. flag is specified.)
  375. .TP
  376. \fI%C\fP
  377. The percentage of available CPU time devoted to the process.
  378. This figure is a decaying average, computed over the past second.
  379. .PP
  380. The following fields are listed when \fIsps\fP is invoked with the
  381. \fB-d\fP option -
  382. .TP 8
  383. \fIFiles\fP
  384. The number of open files for this process.
  385. .TP
  386. \fIPageFaults\fP
  387. The number of major and minor page faults incurred by the process.
  388. .TP
  389. \fISwap\fP
  390. The number of swaps incurred by the process.
  391. .TP
  392. \fIBlockI/O\fP
  393. The number of block read or write operations performed
  394. on behalf of the process.
  395. .TP
  396. \fIKbytesecs\fP
  397. The integral of real memory usage over time.
  398. Thus, if a process uses 60 kilobytes of real memory for 3 seconds,
  399. this figure is incremented by 180.
  400. .PP
  401. The following fields are listed when \fIsps\fP is invoked with the
  402. \fB-y\fP option -
  403. .TP 8
  404. \fIDev\fP
  405. The major and minor device numbers of the terminal.
  406. .TP
  407. \fIAddr\fP
  408. The virtual address of the associated \fBstruct tty\fP in /dev/kmem.
  409. .TP
  410. \fIRawq\fP
  411. .br
  412. .ns
  413. .TP
  414. \fICanq\fP
  415. .br
  416. .ns
  417. .TP
  418. \fIOutq\fP
  419. The number of characters in the terminal I/O queues.
  420. These refer to the raw input queue, the canonical input queue
  421. and the output queue.
  422. .TP
  423. \fIPgrp\fP
  424. The process group associated with the terminal.
  425. .PP
  426. After listing the requested output, \fIsps\fP prints a summary line.
  427. This indicates the number and total virtual memory size of all processes,
  428. the number and total virtual size of busy processes,
  429. the number and real memory size of loaded processes
  430. and the number and real size of swapped processes.
  431. .SH DIAGNOSTICS
  432. \fISps\fP reports a self-explanatory message if it is given an
  433. invalid argument list.
  434. The program also complains if it cannot find necessary system information.
  435. .PP
  436. At initialisation, \fIsps\fP complains if it cannot find the addresses of
  437. requisite system structures in the kernel symbol file.
  438. This is usually the case because the system is rarely configured to support
  439. all known devices.
  440. \fISps\fP also complains if more than one user shares the same user-id
  441. in the password file (/etc/passwd).
  442. .SH EXAMPLES
  443. \fBsps vb\fP
  444. .PP
  445. \fISps\fP describes all busy processes in a verbose manner.
  446. .PP
  447. \fBsps dtg 9 h1 co\fP
  448. .PP
  449. \fISps\fP lists processes associated with terminals 9, h1 and the console.
  450. The output reflects the disc activity caused by these processes.
  451. The process group of each process is also included in the output.
  452. .PP
  453. \fBsps weu robert graham -r 2\fP
  454. .PP
  455. \fISps\fP reports processes belonging to the specified users.
  456. It lists the environment as well as all the command arguments in a wide format.
  457. The output is produced indefinitely, with a delay of two seconds between
  458. each listing.
  459. .PP
  460. \fBsps is /vmunix.new\fP
  461. .PP
  462. \fISps\fP is initialised. It reads its symbol information from the
  463. specified file.
  464. .SH FILES
  465. .ta 2.5i
  466. .nf
  467. /dev/console    Console
  468. /dev/tty??    Terminal and pty devices
  469. /dev/kmem    Kernel virtual memory
  470. /dev/mem    Physical memory
  471. /dev/drum    Paging and swap device
  472. /etc/passwd    Password file
  473. /etc/spsinfo    Information file
  474. /vmunix    Symbol file of /dev/kmem addresses
  475. /etc/termcap    To determine the output terminal width
  476. .fi
  477. .ta
  478. .SH SEE ALSO
  479. \fIiostat\fP(1), \fIkill\fP(1), \fIps\fP(1),
  480. \fIvmstat\fP(1), \fIexec\fP(2),
  481. \fIflock\fP(2), \fInice\fP(2), \fIpause\fP(2), \fIselect\fP(2), \fIsetuid\fP(2),
  482. \fIsigsys\fP(2), \fIsigvec\fP(2), \fIvadvise\fP(2), \fIvfork\fP(2),
  483. \fIvlimit\fP(2), \fIvtimes\fP(2), \fIwait\fP(2),
  484. \fIpty\fP(4),\fItty\fP(4), \fIpstat\fP(8).
  485. .SH AUTHORS
  486. Several. In particular, J. E. Kulp and J. Robert Ward.
  487. .SH BUGS
  488. Because the system is continually changing, the information reported by
  489. \fIsps\fP is only an approximation to reality.
  490. \fISps\fP renices itself to -20 in an attempt to run as
  491. fast as possible.
  492. .PP
  493. \fISps\fP recognises the sizes and addresses of internal kernel
  494. tables whenever it is invoked. However, it must be recompiled
  495. if major modifications are made to the kernel.
  496. .PP
  497. \fISps\fP does not list all the detailed information shown by \fIps\fP(1).
  498. Nor are all the options supported by \fIps\fP(1) available from \fIsps\fP.
  499. .PP
  500. \fISps\fP does not understand all the possible
  501. reasons why a process may be sleeping.
  502. .PP
  503. The number of options to \fIsps\fP is ridiculous.
  504.  
  505.