home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume27 / top-3.2 / part01 next >
SHell self-extracting ARchive  |  1993-08-08  |  57.4 KB

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: part01

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 75 6e 69 78 0a 46 72 |.sources|.unix.Fr|
|00000020| 6f 6d 3a 20 70 68 69 6c | 40 65 65 63 73 2e 6e 77 |om: phil|@eecs.nw|
|00000030| 75 2e 65 64 75 20 28 57 | 69 6c 6c 69 61 6d 20 4c |u.edu (W|illiam L|
|00000040| 65 46 65 62 76 72 65 29 | 0a 53 75 62 6a 65 63 74 |eFebvre)|.Subject|
|00000050| 3a 20 76 32 37 69 30 30 | 31 3a 20 74 6f 70 20 2d |: v27i00|1: top -|
|00000060| 20 61 20 74 6f 70 20 70 | 72 6f 63 65 73 73 20 64 | a top p|rocess d|
|00000070| 69 73 70 6c 61 79 2c 20 | 76 65 72 73 69 6f 6e 20 |isplay, |version |
|00000080| 33 2e 32 2c 20 50 61 72 | 74 30 31 2f 31 33 0a 4d |3.2, Par|t01/13.M|
|00000090| 65 73 73 61 67 65 2d 69 | 64 3a 20 3c 31 2e 37 34 |essage-i|d: <1.74|
|000000a0| 34 38 34 33 31 33 36 2e | 34 37 34 34 40 67 77 2e |4843136.|4744@gw.|
|000000b0| 68 6f 6d 65 2e 76 69 78 | 2e 63 6f 6d 3e 0a 53 65 |home.vix|.com>.Se|
|000000c0| 6e 64 65 72 3a 20 75 6e | 69 78 2d 73 6f 75 72 63 |nder: un|ix-sourc|
|000000d0| 65 73 2d 6d 6f 64 65 72 | 61 74 6f 72 40 67 77 2e |es-moder|ator@gw.|
|000000e0| 68 6f 6d 65 2e 76 69 78 | 2e 63 6f 6d 0a 41 70 70 |home.vix|.com.App|
|000000f0| 72 6f 76 65 64 3a 20 76 | 69 78 69 65 40 67 77 2e |roved: v|ixie@gw.|
|00000100| 68 6f 6d 65 2e 76 69 78 | 2e 63 6f 6d 0a 0a 53 75 |home.vix|.com..Su|
|00000110| 62 6d 69 74 74 65 64 2d | 42 79 3a 20 70 68 69 6c |bmitted-|By: phil|
|00000120| 40 65 65 63 73 2e 6e 77 | 75 2e 65 64 75 20 28 57 |@eecs.nw|u.edu (W|
|00000130| 69 6c 6c 69 61 6d 20 4c | 65 46 65 62 76 72 65 29 |illiam L|eFebvre)|
|00000140| 0a 50 6f 73 74 69 6e 67 | 2d 4e 75 6d 62 65 72 3a |.Posting|-Number:|
|00000150| 20 56 6f 6c 75 6d 65 20 | 32 37 2c 20 49 73 73 75 | Volume |27, Issu|
|00000160| 65 20 31 0a 41 72 63 68 | 69 76 65 2d 4e 61 6d 65 |e 1.Arch|ive-Name|
|00000170| 3a 20 74 6f 70 2d 33 2e | 32 2f 70 61 72 74 30 31 |: top-3.|2/part01|
|00000180| 0a 0a 5b 20 74 68 69 73 | 20 69 73 20 74 68 65 20 |..[ this| is the |
|00000190| 6c 61 74 65 73 74 20 76 | 65 72 73 69 6f 6e 20 6f |latest v|ersion o|
|000001a0| 66 20 22 74 6f 70 22 2c | 20 77 68 69 63 68 20 70 |f "top",| which p|
|000001b0| 72 6f 64 75 63 65 73 20 | 61 20 72 65 61 6c 20 74 |roduces |a real t|
|000001c0| 69 6d 65 2c 20 63 6f 6e | 74 69 6e 75 6f 75 73 6c |ime, con|tinuousl|
|000001d0| 79 0a 20 20 75 70 64 61 | 74 69 6e 67 20 64 69 73 |y. upda|ting dis|
|000001e0| 70 6c 61 79 20 74 68 61 | 74 20 6c 6f 6f 6b 73 20 |play tha|t looks |
|000001f0| 6d 6f 72 65 20 6f 72 20 | 6c 65 73 73 20 6c 69 6b |more or |less lik|
|00000200| 65 20 74 68 69 73 3a 0a | 0a 09 6c 6f 61 64 20 61 |e this:.|..load a|
|00000210| 76 65 72 61 67 65 73 3a | 20 20 20 30 2e 33 31 2c |verages:| 0.31,|
|00000220| 20 20 30 2e 32 35 2c 20 | 20 30 2e 31 36 20 20 20 | 0.25, | 0.16 |
|00000230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000240| 20 20 20 20 20 20 20 20 | 20 31 33 3a 34 30 3a 35 | | 13:40:5|
|00000250| 32 0a 09 36 35 20 70 72 | 6f 63 65 73 73 65 73 3a |2..65 pr|ocesses:|
|00000260| 20 20 36 30 20 73 6c 65 | 65 70 69 6e 67 2c 20 31 | 60 sle|eping, 1|
|00000270| 20 72 75 6e 6e 69 6e 67 | 2c 20 34 20 73 74 6f 70 | running|, 4 stop|
|00000280| 70 65 64 0a 09 43 70 75 | 20 73 74 61 74 65 73 3a |ped..Cpu| states:|
|00000290| 20 31 33 2e 38 25 20 75 | 73 65 72 2c 20 20 31 2e | 13.8% u|ser, 1.|
|000002a0| 39 25 20 6e 69 63 65 2c | 20 20 38 2e 31 25 20 73 |9% nice,| 8.1% s|
|000002b0| 79 73 74 65 6d 2c 20 37 | 36 2e 30 25 20 69 64 6c |ystem, 7|6.0% idl|
|000002c0| 65 0a 09 4d 65 6d 6f 72 | 79 3a 20 52 65 61 6c 3a |e..Memor|y: Real:|
|000002d0| 20 32 31 34 33 32 4b 2f | 32 35 38 34 30 4b 20 56 | 21432K/|25840K V|
|000002e0| 69 72 74 3a 20 46 72 65 | 65 3a 20 31 30 34 34 4b |irt: Fre|e: 1044K|
|000002f0| 0a 0a 09 20 20 50 49 44 | 20 55 53 45 52 4e 41 4d |... PID| USERNAM|
|00000300| 45 20 50 52 49 20 4e 49 | 43 45 20 20 20 53 49 5a |E PRI NI|CE SIZ|
|00000310| 45 20 20 20 52 45 53 20 | 53 54 41 54 45 20 20 20 |E RES |STATE |
|00000320| 54 49 4d 45 20 20 20 57 | 43 50 55 20 20 20 20 43 |TIME W|CPU C|
|00000330| 50 55 20 43 4f 4d 4d 41 | 4e 44 0a 09 31 34 32 39 |PU COMMA|ND..1429|
|00000340| 35 20 6e 65 77 73 20 20 | 20 20 20 20 20 32 20 20 |5 news | 2 |
|00000350| 20 20 34 20 20 36 37 34 | 34 4b 20 34 37 32 38 4b | 4 674|4K 4728K|
|00000360| 20 73 6c 65 65 70 20 32 | 36 38 3a 30 31 20 20 31 | sleep 2|68:01 1|
|00000370| 2e 35 31 25 20 20 31 2e | 35 31 25 20 69 6e 6e 64 |.51% 1.|51% innd|
|00000380| 0a 09 20 34 34 39 35 20 | 76 69 78 69 65 20 20 20 |.. 4495 |vixie |
|00000390| 20 20 32 38 20 20 20 20 | 30 20 20 20 38 34 30 4b | 28 |0 840K|
|000003a0| 20 20 33 34 30 4b 20 73 | 74 6f 70 20 20 20 20 30 | 340K s|top 0|
|000003b0| 3a 30 31 20 20 31 2e 30 | 34 25 20 20 31 2e 30 33 |:01 1.0|4% 1.03|
|000003c0| 25 20 6a 6f 76 65 0a 09 | 20 36 35 35 31 20 76 69 |% jove..| 6551 vi|
|000003d0| 78 69 65 20 20 20 20 20 | 20 32 20 20 20 20 30 20 |xie | 2 0 |
|000003e0| 20 31 35 30 38 4b 20 20 | 34 33 36 4b 20 73 6c 65 | 1508K |436K sle|
|000003f0| 65 70 20 20 20 36 3a 34 | 33 20 20 30 2e 38 38 25 |ep 6:4|3 0.88%|
|00000400| 20 20 30 2e 38 38 25 20 | 78 74 65 72 6d 0a 09 20 | 0.88% |xterm.. |
|00000410| 34 35 36 30 20 76 69 78 | 69 65 20 20 20 20 20 32 |4560 vix|ie 2|
|00000420| 38 20 20 20 20 30 20 20 | 20 37 35 36 4b 20 20 32 |8 0 | 756K 2|
|00000430| 33 32 4b 20 72 75 6e 20 | 20 20 20 20 30 3a 30 30 |32K run | 0:00|
|00000440| 20 20 33 2e 30 31 25 20 | 20 30 2e 37 38 25 20 74 | 3.01% | 0.78% t|
|00000450| 6f 70 0a 09 20 20 39 35 | 39 20 72 6f 6f 74 20 20 |op.. 95|9 root |
|00000460| 20 20 20 20 20 32 20 20 | 20 20 30 20 20 20 36 32 | 2 | 0 62|
|00000470| 34 4b 20 20 31 32 34 4b | 20 73 6c 65 65 70 20 20 |4K 124K| sleep |
|00000480| 20 30 3a 31 35 20 20 30 | 2e 30 30 25 20 20 30 2e | 0:15 0|.00% 0.|
|00000490| 30 30 25 20 74 65 6c 6e | 65 74 64 0a 09 5b 2e 2e |00% teln|etd..[..|
|000004a0| 2e 5d 0a 0a 20 20 69 74 | 20 69 73 20 6d 6f 73 74 |.].. it| is most|
|000004b0| 6c 79 20 6f 66 20 75 73 | 65 20 74 6f 20 73 79 73 |ly of us|e to sys|
|000004c0| 74 65 6d 20 61 64 6d 69 | 6e 69 73 74 72 61 74 6f |tem admi|nistrato|
|000004d0| 72 73 20 62 75 74 20 69 | 66 20 79 6f 75 20 61 72 |rs but i|f you ar|
|000004e0| 65 20 65 76 65 72 20 77 | 6f 6e 64 65 72 69 6e 67 |e ever w|ondering|
|000004f0| 0a 20 20 77 68 79 20 79 | 6f 75 72 20 63 6f 6d 70 |. why y|our comp|
|00000500| 75 74 65 72 20 69 73 20 | 73 6c 6f 77 2c 20 22 74 |uter is |slow, "t|
|00000510| 6f 70 22 20 63 61 6e 20 | 74 65 6c 6c 20 79 6f 75 |op" can |tell you|
|00000520| 2e 09 09 09 2d 2d 76 69 | 78 20 5d 0a 0a 23 21 20 |....--vi|x ]..#! |
|00000530| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|00000540| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|00000550| 65 2e 20 20 52 65 6d 6f | 76 65 20 61 6e 79 74 68 |e. Remo|ve anyth|
|00000560| 69 6e 67 20 62 65 66 6f | 72 65 20 74 68 69 73 20 |ing befo|re this |
|00000570| 6c 69 6e 65 2c 20 74 68 | 65 6e 20 75 6e 70 61 63 |line, th|en unpac|
|00000580| 6b 0a 23 20 69 74 20 62 | 79 20 73 61 76 69 6e 67 |k.# it b|y saving|
|00000590| 20 69 74 20 69 6e 74 6f | 20 61 20 66 69 6c 65 20 | it into| a file |
|000005a0| 61 6e 64 20 74 79 70 69 | 6e 67 20 22 73 68 20 66 |and typi|ng "sh f|
|000005b0| 69 6c 65 22 2e 20 20 54 | 6f 20 6f 76 65 72 77 72 |ile". T|o overwr|
|000005c0| 69 74 65 20 65 78 69 73 | 74 69 6e 67 0a 23 20 66 |ite exis|ting.# f|
|000005d0| 69 6c 65 73 2c 20 74 79 | 70 65 20 22 73 68 20 66 |iles, ty|pe "sh f|
|000005e0| 69 6c 65 20 2d 63 22 2e | 20 20 59 6f 75 20 63 61 |ile -c".| You ca|
|000005f0| 6e 20 61 6c 73 6f 20 66 | 65 65 64 20 74 68 69 73 |n also f|eed this|
|00000600| 20 61 73 20 73 74 61 6e | 64 61 72 64 20 69 6e 70 | as stan|dard inp|
|00000610| 75 74 20 76 69 61 0a 23 | 20 75 6e 73 68 61 72 2c |ut via.#| unshar,|
|00000620| 20 6f 72 20 62 79 20 74 | 79 70 69 6e 67 20 22 73 | or by t|yping "s|
|00000630| 68 20 3c 66 69 6c 65 22 | 2c 20 65 2e 67 2e 2e 20 |h <file"|, e.g.. |
|00000640| 20 49 66 20 74 68 69 73 | 20 61 72 63 68 69 76 65 | If this| archive|
|00000650| 20 69 73 20 63 6f 6d 70 | 6c 65 74 65 2c 20 79 6f | is comp|lete, yo|
|00000660| 75 0a 23 20 77 69 6c 6c | 20 73 65 65 20 74 68 65 |u.# will| see the|
|00000670| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6d 65 73 73 61 | followi|ng messa|
|00000680| 67 65 20 61 74 20 74 68 | 65 20 65 6e 64 3a 0a 23 |ge at th|e end:.#|
|00000690| 09 09 22 45 6e 64 20 6f | 66 20 61 72 63 68 69 76 |.."End o|f archiv|
|000006a0| 65 20 31 20 28 6f 66 20 | 31 33 29 2e 22 0a 23 20 |e 1 (of |13).".# |
|000006b0| 43 6f 6e 74 65 6e 74 73 | 3a 20 20 46 41 51 20 4d |Contents|: FAQ M|
|000006c0| 61 6b 65 2e 64 65 73 63 | 2e 58 20 4d 61 6b 65 66 |ake.desc|.X Makef|
|000006d0| 69 6c 65 2e 58 20 52 45 | 41 44 4d 45 20 62 6f 6f |ile.X RE|ADME boo|
|000006e0| 6c 65 61 6e 2e 68 20 64 | 69 73 70 6c 61 79 2e 68 |lean.h d|isplay.h|
|000006f0| 0a 23 20 20 20 67 65 74 | 61 6e 73 20 67 65 74 6f |.# get|ans geto|
|00000700| 70 74 2e 63 20 6c 61 79 | 6f 75 74 2e 68 20 6c 6f |pt.c lay|out.h lo|
|00000710| 61 64 61 76 67 2e 68 20 | 6d 2d 74 65 6d 70 6c 61 |adavg.h |m-templa|
|00000720| 74 65 20 6d 61 63 68 69 | 6e 65 20 6d 61 63 68 69 |te machi|ne machi|
|00000730| 6e 65 2e 68 0a 23 20 20 | 20 6d 61 63 68 69 6e 65 |ne.h.# | machine|
|00000740| 2f 6d 5f 33 38 36 62 73 | 64 2e 6d 61 6e 20 6d 61 |/m_386bs|d.man ma|
|00000750| 63 68 69 6e 65 2f 6d 5f | 62 73 64 34 34 2e 6d 61 |chine/m_|bsd44.ma|
|00000760| 6e 20 6d 61 63 68 69 6e | 65 2f 6d 5f 62 73 64 34 |n machin|e/m_bsd4|
|00000770| 34 61 2e 6d 61 6e 0a 23 | 20 20 20 6d 61 63 68 69 |4a.man.#| machi|
|00000780| 6e 65 2f 6d 5f 64 67 75 | 78 2e 6d 61 6e 20 6d 61 |ne/m_dgu|x.man ma|
|00000790| 63 68 69 6e 65 2f 6d 5f | 64 79 6e 69 78 2e 6d 61 |chine/m_|dynix.ma|
|000007a0| 6e 20 6d 61 63 68 69 6e | 65 2f 6d 5f 68 70 75 78 |n machin|e/m_hpux|
|000007b0| 39 2e 6d 61 6e 0a 23 20 | 20 20 6d 61 63 68 69 6e |9.man.# | machin|
|000007c0| 65 2f 6d 5f 73 75 6e 6f | 73 34 2e 6d 61 6e 20 6d |e/m_suno|s4.man m|
|000007d0| 61 63 68 69 6e 65 2f 6d | 5f 73 75 6e 6f 73 35 2e |achine/m|_sunos5.|
|000007e0| 6d 61 6e 20 6d 61 63 68 | 69 6e 65 2f 6d 5f 73 76 |man mach|ine/m_sv|
|000007f0| 72 34 2e 6d 61 6e 0a 23 | 20 20 20 6d 61 63 68 69 |r4.man.#| machi|
|00000800| 6e 65 2f 6d 5f 73 76 72 | 34 32 2e 6d 61 6e 20 6d |ne/m_svr|42.man m|
|00000810| 61 63 68 69 6e 65 2f 6d | 5f 75 6d 61 78 2e 6d 61 |achine/m|_umax.ma|
|00000820| 6e 20 6d 65 74 61 74 6f | 70 20 6f 73 2e 68 20 70 |n metato|p os.h p|
|00000830| 61 74 63 68 6c 65 76 65 | 6c 2e 68 0a 23 20 20 20 |atchleve|l.h.# |
|00000840| 73 63 72 65 65 6e 2e 68 | 20 73 69 67 63 6f 6e 76 |screen.h| sigconv|
|00000850| 2e 61 77 6b 20 74 6f 70 | 2e 68 20 74 6f 70 2e 6c |.awk top|.h top.l|
|00000860| 6f 63 61 6c 2e 48 20 75 | 73 65 72 6e 61 6d 65 2e |ocal.H u|sername.|
|00000870| 63 20 75 74 69 6c 73 2e | 68 0a 23 20 20 20 76 65 |c utils.|h.# ve|
|00000880| 72 73 69 6f 6e 2e 63 0a | 23 20 57 72 61 70 70 65 |rsion.c.|# Wrappe|
|00000890| 64 20 62 79 20 70 68 69 | 6c 40 70 65 78 20 6f 6e |d by phi|l@pex on|
|000008a0| 20 57 65 64 20 41 75 67 | 20 20 34 20 31 34 3a 32 | Wed Aug| 4 14:2|
|000008b0| 32 3a 33 39 20 31 39 39 | 33 0a 50 41 54 48 3d 2f |2:39 199|3.PATH=/|
|000008c0| 62 69 6e 3a 2f 75 73 72 | 2f 62 69 6e 3a 2f 75 73 |bin:/usr|/bin:/us|
|000008d0| 72 2f 75 63 62 20 3b 20 | 65 78 70 6f 72 74 20 50 |r/ucb ; |export P|
|000008e0| 41 54 48 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |ATH.if t|est -f '|
|000008f0| 46 41 51 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |FAQ' -a |"${1}" !|
|00000900| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00000910| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00000920| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00000930| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 46 41 |sting fi|le \"'FA|
|00000940| 51 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |Q'\".els|e.echo s|
|00000950| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00000960| 5c 22 27 46 41 51 27 5c | 22 20 5c 28 33 31 38 34 |\"'FAQ'\|" \(3184|
|00000970| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00000980| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 46 41 51 |d "s/^X/|/" >'FAQ|
|00000990| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|000009a0| 27 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |'.X | |
|000009b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009c0| 54 4f 50 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |TOP.X | |
|000009d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 56 65 | | Ve|
|000009e0| 72 73 69 6f 6e 20 33 2e | 32 0a 58 0a 58 20 20 20 |rsion 3.|2.X.X |
|000009f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a00| 20 20 20 20 57 69 6c 6c | 69 61 6d 20 4c 65 46 65 | Will|iam LeFe|
|00000a10| 62 76 72 65 0a 58 09 09 | 20 20 20 20 20 61 6e 64 |bvre.X..| and|
|00000a20| 20 61 20 63 61 73 74 20 | 6f 66 20 64 6f 7a 65 6e | a cast |of dozen|
|00000a30| 73 0a 58 0a 58 0a 58 46 | 52 45 51 55 45 4e 54 4c |s.X.X.XF|REQUENTL|
|00000a40| 59 20 41 53 4b 45 44 20 | 51 55 45 53 54 49 4f 4e |Y ASKED |QUESTION|
|00000a50| 53 20 41 4e 44 20 54 48 | 45 49 52 20 41 4e 53 57 |S AND TH|EIR ANSW|
|00000a60| 45 52 53 0a 58 0a 58 31 | 2e 20 22 57 65 20 6a 75 |ERS.X.X1|. "We ju|
|00000a70| 73 74 20 75 70 67 72 61 | 64 65 64 20 6f 75 72 20 |st upgra|ded our |
|00000a80| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|00000a90| 20 74 6f 20 76 65 72 73 | 69 6f 6e 20 39 39 2e 39 | to vers|ion 99.9|
|00000aa0| 2e 39 2e 39 20 61 6e 64 | 20 74 6f 70 0a 58 20 20 |.9.9 and| top.X |
|00000ab0| 20 62 72 6f 6b 65 2e 20 | 20 57 68 61 74 20 73 68 | broke. | What sh|
|00000ac0| 6f 75 6c 64 20 77 65 20 | 64 6f 3f 22 0a 58 0a 58 |ould we |do?".X.X|
|00000ad0| 20 20 20 52 65 63 6f 6d | 70 69 6c 65 2e 20 20 54 | Recom|pile. T|
|00000ae0| 6f 70 20 69 73 20 76 65 | 72 79 20 73 65 6e 73 69 |op is ve|ry sensi|
|00000af0| 74 69 76 65 20 74 6f 20 | 63 68 61 6e 67 65 73 20 |tive to |changes |
|00000b00| 69 6e 20 69 6e 74 65 72 | 6e 61 6c 20 6b 65 72 6e |in inter|nal kern|
|00000b10| 65 6c 20 64 61 74 61 0a | 58 20 20 20 73 74 72 75 |el data.|X stru|
|00000b20| 63 74 75 72 65 73 2e 20 | 20 49 74 20 69 73 20 6e |ctures. | It is n|
|00000b30| 6f 74 20 75 6e 63 6f 6d | 6d 6f 6e 20 66 6f 72 20 |ot uncom|mon for |
|00000b40| 61 20 6e 65 77 20 76 65 | 72 73 69 6f 6e 20 6f 66 |a new ve|rsion of|
|00000b50| 20 74 68 65 20 6f 70 65 | 72 61 74 69 6e 67 0a 58 | the ope|rating.X|
|00000b60| 20 20 20 73 79 73 74 65 | 6d 20 74 6f 20 69 6e 63 | syste|m to inc|
|00000b70| 6c 75 64 65 20 63 68 61 | 6e 67 65 73 20 74 6f 20 |lude cha|nges to |
|00000b80| 6b 65 72 6e 65 6c 20 64 | 61 74 61 20 73 74 72 75 |kernel d|ata stru|
|00000b90| 63 74 75 72 65 73 2e 0a | 58 0a 58 32 2e 20 22 49 |ctures..|X.X2. "I|
|00000ba0| 20 74 72 69 65 64 20 63 | 6f 6d 70 69 6c 69 6e 67 | tried c|ompiling|
|00000bb0| 20 74 6f 70 20 75 6e 64 | 65 72 20 53 75 6e 4f 53 | top und|er SunOS|
|00000bc0| 20 76 65 72 73 69 6f 6e | 20 34 2e 31 2e 33 20 61 | version| 4.1.3 a|
|00000bd0| 6e 64 20 69 74 20 67 6f | 74 20 63 6f 6d 70 69 6c |nd it go|t compil|
|00000be0| 65 0a 58 20 20 20 74 69 | 6d 65 20 65 72 72 6f 72 |e.X ti|me error|
|00000bf0| 73 2e 20 20 49 73 20 74 | 68 65 72 65 20 61 20 70 |s. Is t|here a p|
|00000c00| 61 74 63 68 3f 22 0a 58 | 0a 58 20 20 20 49 66 20 |atch?".X|.X If |
|00000c10| 79 6f 75 20 74 72 79 20 | 63 6f 6d 70 69 6c 69 6e |you try |compilin|
|00000c20| 67 20 74 6f 70 20 69 6e | 20 61 20 22 53 79 73 74 |g top in| a "Syst|
|00000c30| 65 6d 20 56 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |em V env|ironment|
|00000c40| 22 20 75 6e 64 65 72 20 | 53 75 6e 4f 53 0a 58 20 |" under |SunOS.X |
|00000c50| 20 20 28 74 68 61 74 20 | 69 73 2c 20 2f 75 73 72 | (that |is, /usr|
|00000c60| 2f 35 62 69 6e 20 69 73 | 20 62 65 66 6f 72 65 20 |/5bin is| before |
|00000c70| 2f 75 73 72 2f 62 69 6e | 20 6f 6e 20 79 6f 75 72 |/usr/bin| on your|
|00000c80| 20 70 61 74 68 29 20 74 | 68 65 6e 20 74 68 65 20 | path) t|hen the |
|00000c90| 0a 58 20 20 20 63 6f 6d | 70 69 6c 61 74 69 6f 6e |.X com|pilation|
|00000ca0| 20 77 69 6c 6c 20 66 61 | 69 6c 2e 20 20 54 68 69 | will fa|il. Thi|
|00000cb0| 73 20 69 73 20 6d 6f 73 | 74 6c 79 20 64 75 65 20 |s is mos|tly due |
|00000cc0| 74 6f 20 74 68 65 20 66 | 61 63 74 20 74 68 61 74 |to the f|act that|
|00000cd0| 20 74 6f 70 0a 58 20 20 | 20 74 68 69 6e 6b 73 20 | top.X | thinks |
|00000ce0| 69 74 73 20 62 65 69 6e | 67 20 63 6f 6d 70 69 6c |its bein|g compil|
|00000cf0| 65 64 20 6f 6e 20 61 20 | 53 79 73 74 65 6d 20 56 |ed on a |System V|
|00000d00| 20 6d 61 63 68 69 6e 65 | 20 77 68 65 6e 20 69 74 | machine| when it|
|00000d10| 20 72 65 61 6c 6c 79 20 | 69 73 6e 27 74 2e 0a 58 | really |isn't..X|
|00000d20| 20 20 20 54 68 65 20 6f | 6e 6c 79 20 73 6f 6c 75 | The o|nly solu|
|00000d30| 74 69 6f 6e 20 69 73 20 | 74 6f 20 70 75 74 20 2f |tion is |to put /|
|00000d40| 75 73 72 2f 62 69 6e 20 | 61 6e 64 20 2f 75 73 72 |usr/bin |and /usr|
|00000d50| 2f 75 63 62 20 62 65 66 | 6f 72 65 20 2f 75 73 72 |/ucb bef|ore /usr|
|00000d60| 2f 35 62 69 6e 0a 58 20 | 20 20 6f 6e 20 79 6f 75 |/5bin.X | on you|
|00000d70| 72 20 70 61 74 68 20 61 | 6e 64 20 74 72 79 20 61 |r path a|nd try a|
|00000d80| 67 61 69 6e 2e 0a 58 0a | 58 33 2e 20 22 54 6f 70 |gain..X.|X3. "Top|
|00000d90| 20 69 73 20 28 6e 6f 74 | 29 20 64 69 73 70 6c 61 | is (not|) displa|
|00000da0| 79 69 6e 67 20 69 64 6c | 65 20 70 72 6f 63 65 73 |ying idl|e proces|
|00000db0| 73 65 73 20 61 6e 64 20 | 49 20 64 6f 6e 27 74 20 |ses and |I don't |
|00000dc0| 28 64 6f 29 20 77 61 6e | 74 20 69 74 20 74 6f 2e |(do) wan|t it to.|
|00000dd0| 22 0a 58 0a 58 20 20 20 | 54 68 69 73 20 64 65 66 |".X.X |This def|
|00000de0| 61 75 6c 74 20 68 61 73 | 20 6f 6e 6c 79 20 63 68 |ault has| only ch|
|00000df0| 61 6e 67 65 64 20 61 62 | 6f 75 74 20 61 20 64 6f |anged ab|out a do|
|00000e00| 7a 65 6e 20 74 69 6d 65 | 73 2c 20 61 6e 64 20 49 |zen time|s, and I|
|00000e10| 20 66 69 6e 61 6c 6c 79 | 20 67 6f 74 0a 58 20 20 | finally| got.X |
|00000e20| 20 74 69 72 65 64 20 6f | 66 20 70 65 6f 70 6c 65 | tired o|f people|
|00000e30| 20 77 68 69 6e 69 6e 67 | 20 61 62 6f 75 74 20 69 | whining| about i|
|00000e40| 74 2e 20 20 47 6f 20 72 | 65 61 64 20 74 68 65 20 |t. Go r|ead the |
|00000e50| 6d 61 6e 75 61 6c 20 70 | 61 67 65 20 66 6f 72 20 |manual p|age for |
|00000e60| 76 65 72 73 69 6f 6e 0a | 58 20 20 20 33 2e 32 20 |version.|X 3.2 |
|00000e70| 61 6e 64 20 70 61 79 20 | 73 70 65 63 69 61 6c 20 |and pay |special |
|00000e80| 61 74 74 65 6e 74 69 6f | 6e 20 74 6f 20 74 68 65 |attentio|n to the|
|00000e90| 20 64 65 73 63 72 69 70 | 74 69 6f 6e 20 6f 66 20 | descrip|tion of |
|00000ea0| 74 68 65 20 22 54 4f 50 | 22 20 65 6e 76 69 72 6f |the "TOP|" enviro|
|00000eb0| 6e 6d 65 6e 74 0a 58 20 | 20 20 76 61 72 69 61 62 |nment.X | variab|
|00000ec0| 6c 65 2e 0a 58 0a 58 34 | 2e 20 22 57 65 20 68 61 |le..X.X4|. "We ha|
|00000ed0| 76 65 20 73 6f 20 6d 75 | 63 68 20 6d 65 6d 6f 72 |ve so mu|ch memor|
|00000ee0| 79 20 69 6e 20 6f 75 72 | 20 6d 61 63 68 69 6e 65 |y in our| machine|
|00000ef0| 20 74 68 61 74 20 74 68 | 65 20 6d 65 6d 6f 72 79 | that th|e memory|
|00000f00| 20 73 74 61 74 75 73 20 | 64 69 73 70 6c 61 79 0a | status |display.|
|00000f10| 58 20 20 20 28 74 68 65 | 20 66 6f 75 72 74 68 20 |X (the| fourth |
|00000f20| 6c 69 6e 65 29 20 65 6e | 64 73 20 75 70 20 62 65 |line) en|ds up be|
|00000f30| 69 6e 67 20 6c 6f 6e 67 | 65 72 20 74 68 61 6e 20 |ing long|er than |
|00000f40| 38 30 20 63 68 61 72 61 | 63 74 65 72 73 2e 20 20 |80 chara|cters. |
|00000f50| 54 68 69 73 0a 58 20 20 | 20 63 6f 6d 70 6c 65 74 |This.X | complet|
|00000f60| 65 6c 79 20 6d 65 73 73 | 65 73 20 75 70 20 74 6f |ely mess|es up to|
|00000f70| 70 27 73 20 6f 75 74 70 | 75 74 2e 20 20 49 73 20 |p's outp|ut. Is |
|00000f80| 74 68 65 72 65 20 61 20 | 70 61 74 63 68 3f 22 0a |there a |patch?".|
|00000f90| 58 0a 58 20 20 20 4e 6f | 2c 20 62 75 74 20 74 68 |X.X No|, but th|
|00000fa0| 69 73 20 77 69 6c 6c 20 | 62 65 20 66 69 78 65 64 |is will |be fixed|
|00000fb0| 20 69 6e 20 76 65 72 73 | 69 6f 6e 20 33 2e 32 2e | in vers|ion 3.2.|
|00000fc0| 20 20 49 6e 20 74 68 65 | 20 6d 65 61 6e 74 69 6d | In the| meantim|
|00000fd0| 65 2c 20 6a 75 73 74 0a | 58 20 20 20 74 61 6b 65 |e, just.|X take|
|00000fe0| 20 73 6f 6d 65 20 6f 66 | 20 74 68 61 74 20 6d 65 | some of| that me|
|00000ff0| 6d 6f 72 79 20 6f 75 74 | 20 6f 66 20 79 6f 75 72 |mory out| of your|
|00001000| 20 6d 61 63 68 69 6e 65 | 2e 20 20 3a 2d 29 0a 58 | machine|. :-).X|
|00001010| 0a 58 35 2e 20 22 57 68 | 65 6e 20 49 20 72 75 6e |.X5. "Wh|en I run|
|00001020| 20 74 6f 70 20 6f 6e 20 | 6d 79 20 53 56 52 34 2d | top on |my SVR4-|
|00001030| 64 65 72 69 76 65 64 20 | 6f 70 65 72 61 74 69 6e |derived |operatin|
|00001040| 67 20 73 79 73 74 65 6d | 2c 20 69 74 20 64 69 73 |g system|, it dis|
|00001050| 70 6c 61 79 73 20 61 6c | 6c 0a 58 20 20 20 74 68 |plays al|l.X th|
|00001060| 65 20 73 79 73 74 65 6d | 20 69 6e 66 6f 72 6d 61 |e system| informa|
|00001070| 74 69 6f 6e 20 61 74 20 | 74 68 65 20 74 6f 70 20 |tion at |the top |
|00001080| 62 75 74 20 64 6f 65 73 | 20 6e 6f 74 20 64 69 73 |but does| not dis|
|00001090| 70 6c 61 79 20 61 6e 79 | 20 70 72 6f 63 65 73 73 |play any| process|
|000010a0| 0a 58 20 20 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |.X inf|ormation|
|000010b0| 2e 20 20 59 65 74 20 77 | 68 65 6e 20 49 20 72 75 |. Yet w|hen I ru|
|000010c0| 6e 20 69 74 20 61 73 20 | 72 6f 6f 74 2c 20 65 76 |n it as |root, ev|
|000010d0| 65 72 79 74 68 69 6e 67 | 20 77 6f 72 6b 73 20 66 |erything| works f|
|000010e0| 69 6e 65 2e 22 0a 58 0a | 58 20 20 20 59 6f 75 72 |ine.".X.|X Your|
|000010f0| 20 73 79 73 74 65 6d 20 | 70 72 6f 62 61 62 6c 79 | system |probably|
|00001100| 20 75 73 65 73 20 74 68 | 65 20 70 73 65 75 64 6f | uses th|e pseudo|
|00001110| 20 66 69 6c 65 20 73 79 | 73 74 65 6d 20 22 2f 70 | file sy|stem "/p|
|00001120| 72 6f 63 22 2c 20 77 68 | 69 63 68 20 69 73 0a 58 |roc", wh|ich is.X|
|00001130| 20 20 20 62 79 20 64 65 | 66 61 75 6c 74 20 6f 6e | by de|fault on|
|00001140| 6c 79 20 61 63 63 65 73 | 73 69 62 6c 65 20 62 79 |ly acces|sible by|
|00001150| 20 72 6f 6f 74 2e 20 20 | 54 6f 70 20 6e 65 65 64 | root. |Top need|
|00001160| 73 20 74 6f 20 62 65 20 | 69 6e 73 74 61 6c 6c 65 |s to be |installe|
|00001170| 64 20 73 65 74 75 69 64 | 0a 58 20 20 20 72 6f 6f |d setuid|.X roo|
|00001180| 74 20 6f 6e 20 73 75 63 | 68 20 73 79 73 74 65 6d |t on suc|h system|
|00001190| 73 20 69 66 20 69 74 20 | 69 73 20 67 6f 69 6e 67 |s if it |is going|
|000011a0| 20 74 6f 20 66 75 6e 63 | 74 69 6f 6e 20 63 6f 72 | to func|tion cor|
|000011b0| 72 65 63 74 6c 79 20 66 | 6f 72 20 6e 6f 72 6d 61 |rectly f|or norma|
|000011c0| 6c 0a 58 20 20 20 75 73 | 65 72 73 2e 0a 58 0a 58 |l.X us|ers..X.X|
|000011d0| 36 2e 20 22 43 6f 6e 66 | 69 67 75 72 65 20 73 61 |6. "Conf|igure sa|
|000011e0| 69 64 20 74 68 61 74 20 | 69 74 20 73 61 77 20 2f |id that |it saw /|
|000011f0| 70 72 6f 63 20 61 6e 64 | 20 69 73 20 72 65 63 6f |proc and| is reco|
|00001200| 6d 6d 65 6e 64 69 6e 67 | 20 74 68 61 74 20 49 20 |mmending| that I |
|00001210| 69 6e 73 74 61 6c 6c 0a | 58 20 20 20 74 6f 70 20 |install.|X top |
|00001220| 73 65 74 75 69 64 20 72 | 6f 6f 74 2e 20 20 49 73 |setuid r|oot. Is|
|00001230| 20 74 68 65 72 65 20 61 | 6e 79 20 77 61 79 20 61 | there a|ny way a|
|00001240| 72 6f 75 6e 64 20 74 68 | 69 73 3f 20 20 49 73 20 |round th|is? Is |
|00001250| 69 74 20 73 61 66 65 3f | 22 0a 58 0a 58 20 20 20 |it safe?|".X.X |
|00001260| 54 68 65 72 65 20 69 73 | 20 6e 6f 20 77 61 79 20 |There is| no way |
|00001270| 61 72 6f 75 6e 64 20 69 | 74 2e 20 20 43 6f 6d 70 |around i|t. Comp|
|00001280| 6c 61 69 6e 20 74 6f 20 | 50 6f 73 69 78 2e 20 20 |lain to |Posix. |
|00001290| 45 76 65 72 79 20 65 66 | 66 6f 72 74 20 68 61 73 |Every ef|fort has|
|000012a0| 20 62 65 65 6e 0a 58 20 | 20 20 6d 61 64 65 20 74 | been.X | made t|
|000012b0| 6f 20 6d 61 6b 65 20 74 | 6f 70 20 61 20 73 65 63 |o make t|op a sec|
|000012c0| 75 72 65 20 73 65 74 75 | 69 64 20 70 72 6f 67 72 |ure setu|id progr|
|000012d0| 61 6d 2e 20 20 48 6f 77 | 65 76 65 72 2c 20 77 65 |am. How|ever, we|
|000012e0| 20 63 61 6e 6e 6f 74 20 | 67 75 61 72 61 6e 74 65 | cannot |guarante|
|000012f0| 65 0a 58 20 20 20 74 68 | 61 74 20 74 68 65 72 65 |e.X th|at there|
|00001300| 20 61 72 65 20 6e 6f 20 | 73 65 63 75 72 69 74 79 | are no |security|
|00001310| 20 70 72 6f 62 6c 65 6d | 73 20 61 73 73 6f 63 69 | problem|s associ|
|00001320| 61 74 65 64 20 77 69 74 | 68 20 74 68 69 73 20 63 |ated wit|h this c|
|00001330| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 2e 0a 58 20 |onfigura|tion..X |
|00001340| 20 20 54 68 65 20 70 6c | 61 63 65 73 20 77 68 65 | The pl|aces whe|
|00001350| 72 65 20 74 6f 70 20 69 | 73 20 6d 6f 73 74 20 76 |re top i|s most v|
|00001360| 75 6c 6e 65 72 61 62 6c | 65 20 61 72 65 20 74 68 |ulnerabl|e are th|
|00001370| 65 20 62 75 69 6c 74 69 | 6e 20 6b 69 6c 6c 20 61 |e builti|n kill a|
|00001380| 6e 64 20 72 65 6e 69 63 | 65 0a 58 20 20 20 63 6f |nd renic|e.X co|
|00001390| 6d 6d 61 6e 64 73 2e 20 | 20 54 68 65 72 65 20 69 |mmands. | There i|
|000013a0| 73 20 6e 6f 20 69 6e 74 | 65 72 6e 61 6c 20 74 6f |s no int|ernal to|
|000013b0| 70 20 63 6f 6d 6d 61 6e | 64 20 74 68 61 74 20 63 |p comman|d that c|
|000013c0| 61 75 73 65 73 20 74 6f | 70 20 74 6f 20 73 74 61 |auses to|p to sta|
|000013d0| 72 74 0a 58 20 20 20 61 | 20 73 68 65 6c 6c 20 61 |rt.X a| shell a|
|000013e0| 73 20 61 20 73 75 62 70 | 72 6f 63 65 73 73 2e 0a |s a subp|rocess..|
|000013f0| 58 0a 58 37 2e 20 22 49 | 73 20 74 68 65 72 65 20 |X.X7. "I|s there |
|00001400| 61 20 6d 6f 64 75 6c 65 | 20 74 68 61 74 20 77 69 |a module| that wi|
|00001410| 6c 6c 20 6d 61 6b 65 20 | 74 6f 70 20 77 6f 72 6b |ll make |top work|
|00001420| 20 75 6e 64 65 72 20 41 | 49 58 3f 22 0a 58 0a 58 | under A|IX?".X.X|
|00001430| 20 20 20 4e 6f 74 20 61 | 74 20 74 68 65 20 63 75 | Not a|t the cu|
|00001440| 72 72 65 6e 74 20 74 69 | 6d 65 2e 20 20 4d 61 6e |rrent ti|me. Man|
|00001450| 79 20 70 65 6f 70 6c 65 | 20 68 61 76 65 20 73 74 |y people| have st|
|00001460| 61 72 74 65 64 20 74 68 | 69 73 20 70 72 6f 6a 65 |arted th|is proje|
|00001470| 63 74 20 62 75 74 0a 58 | 20 20 20 6e 6f 6e 65 20 |ct but.X| none |
|00001480| 68 61 76 65 20 79 65 74 | 20 74 6f 20 66 69 6e 69 |have yet| to fini|
|00001490| 73 68 2e 20 20 54 68 61 | 74 20 6d 61 79 20 73 61 |sh. Tha|t may sa|
|000014a0| 79 20 73 6f 6d 65 74 68 | 69 6e 67 20 61 62 6f 75 |y someth|ing abou|
|000014b0| 74 20 74 68 65 20 64 69 | 66 66 69 63 75 6c 74 79 |t the di|fficulty|
|000014c0| 0a 58 20 20 20 6f 66 20 | 74 68 65 20 74 61 73 6b |.X of |the task|
|000014d0| 2e 2e 2e 2e 2e 2e 0a 58 | 0a 58 38 2e 20 22 54 6f |.......X|.X8. "To|
|000014e0| 20 77 68 6f 6d 20 64 6f | 20 49 20 72 65 70 6f 72 | whom do| I repor|
|000014f0| 74 20 70 72 6f 62 6c 65 | 6d 73 20 77 69 74 68 20 |t proble|ms with |
|00001500| 74 6f 70 3f 22 0a 58 0a | 58 20 20 20 59 6f 75 20 |top?".X.|X You |
|00001510| 63 61 6e 20 6d 61 69 6c | 20 62 75 67 20 72 65 70 |can mail| bug rep|
|00001520| 6f 72 74 73 20 74 6f 20 | 22 70 68 69 6c 40 65 65 |orts to |"phil@ee|
|00001530| 63 73 2e 6e 77 75 2e 65 | 64 75 22 2e 20 20 49 66 |cs.nwu.e|du". If|
|00001540| 20 69 74 20 6c 6f 6f 6b | 73 20 6c 69 6b 65 20 74 | it look|s like t|
|00001550| 68 65 0a 58 20 20 20 70 | 72 6f 62 6c 65 6d 20 69 |he.X p|roblem i|
|00001560| 73 20 6d 61 63 68 69 6e | 65 2d 73 70 65 63 69 66 |s machin|e-specif|
|00001570| 69 63 2c 20 49 20 77 69 | 6c 6c 20 66 6f 72 77 61 |ic, I wi|ll forwa|
|00001580| 72 64 20 74 68 65 20 72 | 65 70 6f 72 74 20 61 6c |rd the r|eport al|
|00001590| 6f 6e 67 20 74 6f 20 74 | 68 65 0a 58 20 20 20 6d |ong to t|he.X m|
|000015a0| 6f 64 75 6c 65 27 73 20 | 61 75 74 68 6f 72 2e 20 |odule's |author. |
|000015b0| 20 49 66 20 79 6f 75 20 | 77 6f 75 6c 64 20 6c 69 | If you |would li|
|000015c0| 6b 65 20 74 6f 20 63 6f | 6e 76 65 72 73 65 20 64 |ke to co|nverse d|
|000015d0| 69 72 65 63 74 6c 79 20 | 77 69 74 68 20 74 68 65 |irectly |with the|
|000015e0| 0a 58 20 20 20 6d 6f 64 | 75 6c 65 20 61 75 74 68 |.X mod|ule auth|
|000015f0| 6f 72 2c 20 74 68 65 20 | 61 75 74 68 6f 72 73 27 |or, the |authors'|
|00001600| 20 6e 61 6d 65 73 20 61 | 72 65 20 6c 69 73 74 65 | names a|re liste|
|00001610| 64 20 61 74 20 74 68 65 | 20 62 65 67 69 6e 6e 69 |d at the| beginni|
|00001620| 6e 67 20 6f 66 20 74 68 | 65 0a 58 20 20 20 6d 6f |ng of th|e.X mo|
|00001630| 64 75 6c 65 20 2e 63 20 | 66 69 6c 65 20 69 6e 20 |dule .c |file in |
|00001640| 74 68 65 20 22 6d 61 63 | 68 69 6e 65 22 20 64 69 |the "mac|hine" di|
|00001650| 72 65 63 74 6f 72 79 2e | 0a 58 0a 45 4e 44 5f 4f |rectory.|.X.END_O|
|00001660| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 33 |F_FILE.i|f test 3|
|00001670| 31 38 34 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |184 -ne |`wc -c <|
|00001680| 27 46 41 51 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |'FAQ'`; |then. |
|00001690| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 46 | echo sh|ar: \"'F|
|000016a0| 41 51 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |AQ'\" un|packed w|
|000016b0| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|000016c0| 66 69 0a 23 20 65 6e 64 | 20 6f 66 20 27 46 41 51 |fi.# end| of 'FAQ|
|000016d0| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|000016e0| 27 4d 61 6b 65 2e 64 65 | 73 63 2e 58 27 20 2d 61 |'Make.de|sc.X' -a|
|000016f0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00001700| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00001710| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00001720| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00001730| 69 6c 65 20 5c 22 27 4d | 61 6b 65 2e 64 65 73 63 |ile \"'M|ake.desc|
|00001740| 2e 58 27 5c 22 0a 65 6c | 73 65 0a 65 63 68 6f 20 |.X'\".el|se.echo |
|00001750| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00001760| 20 5c 22 27 4d 61 6b 65 | 2e 64 65 73 63 2e 58 27 | \"'Make|.desc.X'|
|00001770| 5c 22 20 5c 28 36 30 34 | 20 63 68 61 72 61 63 74 |\" \(604| charact|
|00001780| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00001790| 2f 22 20 3e 27 4d 61 6b | 65 2e 64 65 73 63 2e 58 |/" >'Mak|e.desc.X|
|000017a0| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|000017b0| 27 0a 58 23 20 4d 61 6b | 65 66 69 6c 65 20 66 6f |'.X# Mak|efile fo|
|000017c0| 72 20 2e 64 65 73 63 20 | 66 69 6c 65 73 0a 58 0a |r .desc |files.X.|
|000017d0| 58 23 20 54 68 69 73 20 | 6d 61 6b 65 66 69 6c 65 |X# This |makefile|
|000017e0| 20 69 73 20 74 68 65 20 | 70 72 6f 74 6f 74 79 70 | is the |prototyp|
|000017f0| 65 20 66 6f 72 20 22 4d | 61 6b 65 2e 64 65 73 63 |e for "M|ake.desc|
|00001800| 22 2c 20 77 68 69 63 68 | 20 69 73 20 75 73 65 64 |", which| is used|
|00001810| 20 62 79 0a 58 23 20 74 | 6f 70 27 73 20 43 6f 6e | by.X# t|op's Con|
|00001820| 66 69 67 75 72 65 20 73 | 63 72 69 70 74 20 74 6f |figure s|cript to|
|00001830| 20 62 75 69 6c 64 20 2e | 64 65 73 63 20 66 69 6c | build .|desc fil|
|00001840| 65 73 20 61 6e 64 20 74 | 68 65 20 53 59 4e 4f 50 |es and t|he SYNOP|
|00001850| 53 49 53 20 66 69 6c 65 | 2e 0a 58 23 20 43 6f 6e |SIS file|..X# Con|
|00001860| 66 69 67 75 72 65 20 74 | 68 65 6e 20 75 73 65 73 |figure t|hen uses|
|00001870| 20 74 68 65 73 65 20 66 | 69 6c 65 73 20 74 6f 20 | these f|iles to |
|00001880| 61 73 6b 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |ask appr|opriate |
|00001890| 71 75 65 73 74 69 6f 6e | 73 2e 0a 58 0a 58 23 20 |question|s..X.X# |
|000018a0| 57 72 69 74 74 65 6e 20 | 62 79 20 57 69 6c 6c 69 |Written |by Willi|
|000018b0| 61 6d 20 4c 65 46 65 62 | 76 72 65 2c 20 4e 6f 72 |am LeFeb|vre, Nor|
|000018c0| 74 68 77 65 73 74 65 72 | 6e 20 55 6e 69 76 65 72 |thwester|n Univer|
|000018d0| 73 69 74 79 0a 58 0a 58 | 23 20 44 4f 20 4e 4f 54 |sity.X.X|# DO NOT|
|000018e0| 20 45 44 49 54 20 22 4d | 61 6b 65 2e 64 65 73 63 | EDIT "M|ake.desc|
|000018f0| 22 21 21 21 20 20 4d 61 | 6b 65 20 63 68 61 6e 67 |"!!! Ma|ke chang|
|00001900| 65 73 20 74 6f 20 22 4d | 61 6b 65 2e 64 65 73 63 |es to "M|ake.desc|
|00001910| 2e 58 22 2c 0a 58 23 20 | 74 68 65 6e 20 22 6d 61 |.X",.X# |then "ma|
|00001920| 6b 65 20 76 65 72 79 63 | 6c 65 61 6e 22 2c 20 74 |ke veryc|lean", t|
|00001930| 68 65 6e 20 72 75 6e 20 | 22 43 6f 6e 66 69 67 75 |hen run |"Configu|
|00001940| 72 65 22 2e 0a 58 0a 58 | 44 45 53 43 53 3d 25 64 |re"..X.X|DESCS=%d|
|00001950| 65 73 63 73 25 0a 58 0a | 58 2e 53 55 46 46 49 58 |escs%.X.|X.SUFFIX|
|00001960| 45 53 3a 20 2e 64 65 73 | 63 0a 58 0a 58 2e 63 2e |ES: .des|c.X.X.c.|
|00001970| 64 65 73 63 3a 0a 58 09 | 73 65 64 20 2d 65 20 27 |desc:.X.|sed -e '|
|00001980| 2f 5e 24 24 2f 2c 24 24 | 64 27 20 2d 65 20 27 73 |/^$$/,$$|d' -e 's|
|00001990| 2c 5e 5b 2f 20 2a 5d 2a | 2c 2c 27 20 24 3c 20 3e |,^[/ *]*|,,' $< >|
|000019a0| 20 24 40 0a 58 0a 58 61 | 6c 6c 3a 20 53 59 4e 4f | $@.X.Xa|ll: SYNO|
|000019b0| 50 53 49 53 0a 58 0a 58 | 53 59 4e 4f 50 53 49 53 |PSIS.X.X|SYNOPSIS|
|000019c0| 3a 20 24 28 44 45 53 43 | 53 29 0a 58 09 67 72 65 |: $(DESC|S).X.gre|
|000019d0| 70 20 53 59 4e 4f 50 53 | 49 53 3a 20 24 28 44 45 |p SYNOPS|IS: $(DE|
|000019e0| 53 43 53 29 20 7c 20 73 | 65 64 20 2d 65 20 27 73 |SCS) | s|ed -e 's|
|000019f0| 40 5e 6d 61 63 68 69 6e | 65 2f 6d 5f 40 40 27 20 |@^machin|e/m_@@' |
|00001a00| 2d 65 20 27 73 40 2e 64 | 65 73 63 3a 2e 5b 5e 3a |-e 's@.d|esc:.[^:|
|00001a10| 5d 2a 3a 20 2a 40 3a 40 | 27 20 3e 53 59 4e 4f 50 |]*: *@:@|' >SYNOP|
|00001a20| 53 49 53 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |SIS.END_|OF_FILE.|
|00001a30| 69 66 20 74 65 73 74 20 | 36 30 34 20 2d 6e 65 20 |if test |604 -ne |
|00001a40| 60 77 63 20 2d 63 20 3c | 27 4d 61 6b 65 2e 64 65 |`wc -c <|'Make.de|
|00001a50| 73 63 2e 58 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |sc.X'`; |then. |
|00001a60| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 4d | echo sh|ar: \"'M|
|00001a70| 61 6b 65 2e 64 65 73 63 | 2e 58 27 5c 22 20 75 6e |ake.desc|.X'\" un|
|00001a80| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00001a90| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|00001aa0| 20 6f 66 20 27 4d 61 6b | 65 2e 64 65 73 63 2e 58 | of 'Mak|e.desc.X|
|00001ab0| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00001ac0| 27 4d 61 6b 65 66 69 6c | 65 2e 58 27 20 2d 61 20 |'Makefil|e.X' -a |
|00001ad0| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00001ae0| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00001af0| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00001b00| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00001b10| 6c 65 20 5c 22 27 4d 61 | 6b 65 66 69 6c 65 2e 58 |le \"'Ma|kefile.X|
|00001b20| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00001b30| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00001b40| 22 27 4d 61 6b 65 66 69 | 6c 65 2e 58 27 5c 22 20 |"'Makefi|le.X'\" |
|00001b50| 5c 28 33 37 32 39 20 63 | 68 61 72 61 63 74 65 72 |\(3729 c|haracter|
|00001b60| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00001b70| 20 3e 27 4d 61 6b 65 66 | 69 6c 65 2e 58 27 20 3c | >'Makef|ile.X' <|
|00001b80| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00001b90| 23 20 4d 61 6b 65 66 69 | 6c 65 20 66 6f 72 20 22 |# Makefi|le for "|
|00001ba0| 74 6f 70 22 2c 20 61 20 | 74 6f 70 20 31 30 20 70 |top", a |top 10 p|
|00001bb0| 72 6f 63 65 73 73 20 64 | 69 73 70 6c 61 79 20 66 |rocess d|isplay f|
|00001bc0| 6f 72 20 55 6e 69 78 0a | 58 23 0a 58 23 20 54 68 |or Unix.|X#.X# Th|
|00001bd0| 69 73 20 6d 61 6b 65 66 | 69 6c 65 20 69 73 20 66 |is makef|ile is f|
|00001be0| 6f 72 20 74 6f 70 2c 20 | 76 65 72 73 69 6f 6e 20 |or top, |version |
|00001bf0| 33 0a 58 23 0a 58 23 20 | 57 72 69 74 74 65 6e 20 |3.X#.X# |Written |
|00001c00| 62 79 20 57 69 6c 6c 69 | 61 6d 20 4c 65 46 65 62 |by Willi|am LeFeb|
|00001c10| 76 72 65 2c 20 4e 6f 72 | 74 68 77 65 73 74 65 72 |vre, Nor|thwester|
|00001c20| 6e 20 55 6e 69 76 65 72 | 73 69 74 79 0a 58 23 09 |n Univer|sity.X#.|
|00001c30| 09 09 28 66 6f 72 6d 65 | 72 6c 79 20 52 69 63 65 |..(forme|rly Rice|
|00001c40| 20 55 6e 69 76 65 72 73 | 69 74 79 29 0a 58 0a 58 | Univers|ity).X.X|
|00001c50| 23 20 44 4f 20 4e 4f 54 | 20 45 44 49 54 20 22 4d |# DO NOT| EDIT "M|
|00001c60| 61 6b 65 66 69 6c 65 22 | 21 21 21 21 20 20 4d 61 |akefile"|!!!! Ma|
|00001c70| 6b 65 20 63 68 61 6e 67 | 65 73 20 74 6f 20 22 4d |ke chang|es to "M|
|00001c80| 61 6b 65 66 69 6c 65 2e | 58 22 20 61 6e 64 20 72 |akefile.|X" and r|
|00001c90| 65 72 75 6e 0a 58 23 20 | 43 6f 6e 66 69 67 75 72 |erun.X# |Configur|
|00001ca0| 65 2e 0a 58 0a 58 23 20 | 45 78 65 63 75 74 61 62 |e..X.X# |Executab|
|00001cb0| 6c 65 73 20 28 74 68 65 | 73 65 20 73 68 6f 75 6c |les (the|se shoul|
|00001cc0| 64 20 62 65 20 6f 62 76 | 69 6f 75 73 29 3a 0a 58 |d be obv|ious):.X|
|00001cd0| 0a 58 53 48 45 4c 4c 20 | 20 20 3d 20 25 73 68 65 |.XSHELL | = %she|
|00001ce0| 6c 6c 25 0a 58 43 43 20 | 20 20 20 20 20 3d 20 25 |ll%.XCC | = %|
|00001cf0| 63 63 25 0a 58 41 57 4b | 20 20 20 20 20 3d 20 25 |cc%.XAWK| = %|
|00001d00| 61 77 6b 25 0a 58 49 4e | 53 54 41 4c 4c 20 3d 20 |awk%.XIN|STALL = |
|00001d10| 25 69 6e 73 74 61 6c 6c | 25 0a 58 0a 58 23 20 69 |%install|%.X.X# i|
|00001d20| 6e 73 74 61 6c 6c 61 74 | 69 6f 6e 20 69 6e 66 6f |nstallat|ion info|
|00001d30| 72 6d 61 74 69 6f 6e 3a | 0a 58 23 09 4f 57 4e 45 |rmation:|.X#.OWNE|
|00001d40| 52 09 2d 20 6e 61 6d 65 | 20 28 6f 72 20 75 69 64 |R.- name| (or uid|
|00001d50| 29 20 66 6f 72 20 74 68 | 65 20 69 6e 73 74 61 6c |) for th|e instal|
|00001d60| 6c 65 64 20 65 78 65 63 | 75 74 61 62 6c 65 27 73 |led exec|utable's|
|00001d70| 20 6f 77 6e 65 72 0a 58 | 23 09 47 52 4f 55 50 09 | owner.X|#.GROUP.|
|00001d80| 2d 20 67 72 6f 75 70 20 | 6e 61 6d 65 20 28 6f 72 |- group |name (or|
|00001d90| 20 67 69 64 29 20 66 6f | 72 20 74 68 65 20 69 6e | gid) fo|r the in|
|00001da0| 73 74 61 6c 6c 65 64 20 | 65 78 65 63 75 74 61 62 |stalled |executab|
|00001db0| 6c 65 27 73 20 67 72 6f | 75 70 0a 58 23 09 4d 4f |le's gro|up.X#.MO|
|00001dc0| 44 45 09 2d 20 6d 6f 64 | 65 20 66 6f 72 20 74 68 |DE.- mod|e for th|
|00001dd0| 65 20 69 6e 73 74 61 6c | 6c 65 64 20 65 78 65 63 |e instal|led exec|
|00001de0| 75 74 61 62 6c 65 20 28 | 73 68 6f 75 6c 64 20 73 |utable (|should s|
|00001df0| 74 61 72 74 20 77 69 74 | 68 20 61 20 30 29 0a 58 |tart wit|h a 0).X|
|00001e00| 23 09 42 49 4e 44 49 52 | 09 2d 20 64 69 72 65 63 |#.BINDIR|.- direc|
|00001e10| 74 6f 72 79 20 77 68 65 | 72 65 20 74 68 65 20 65 |tory whe|re the e|
|00001e20| 78 65 63 75 74 61 62 6c | 65 20 73 68 6f 75 6c 64 |xecutabl|e should|
|00001e30| 20 6c 69 76 65 0a 58 23 | 09 4d 41 4e 44 49 52 09 | live.X#|.MANDIR.|
|00001e40| 2d 20 64 69 72 65 63 74 | 6f 72 79 20 77 68 65 72 |- direct|ory wher|
|00001e50| 65 20 74 68 65 20 6d 61 | 6e 75 61 6c 20 70 61 67 |e the ma|nual pag|
|00001e60| 65 20 73 68 6f 75 6c 64 | 20 6c 69 76 65 0a 58 23 |e should| live.X#|
|00001e70| 09 4d 41 4e 45 58 54 09 | 2d 20 69 6e 73 74 61 6c |.MANEXT.|- instal|
|00001e80| 6c 65 64 20 6d 61 6e 20 | 70 61 67 65 73 20 65 6e |led man |pages en|
|00001e90| 64 20 69 6e 20 2e 24 28 | 4d 41 4e 45 58 54 29 0a |d in .$(|MANEXT).|
|00001ea0| 58 23 09 4d 41 4e 53 54 | 59 09 2d 20 22 6d 61 6e |X#.MANST|Y.- "man|
|00001eb0| 22 20 6f 72 20 22 63 61 | 74 6d 61 6e 22 20 64 65 |" or "ca|tman" de|
|00001ec0| 70 65 6e 64 69 6e 67 20 | 6f 6e 20 77 68 61 74 27 |pending |on what'|
|00001ed0| 73 20 74 6f 20 62 65 20 | 69 6e 73 74 61 6c 6c 65 |s to be |installe|
|00001ee0| 64 0a 58 23 09 53 49 47 | 4e 41 4c 09 2d 20 3c 73 |d.X#.SIG|NAL.- <s|
|00001ef0| 69 67 6e 61 6c 2e 68 3e | 20 6f 72 20 3c 73 79 73 |ignal.h>| or <sys|
|00001f00| 2f 73 69 67 6e 61 6c 2e | 68 3e 3b 20 74 68 65 20 |/signal.|h>; the |
|00001f10| 6f 6e 65 20 77 69 74 68 | 20 73 69 67 6e 61 6c 20 |one with| signal |
|00001f20| 64 65 66 69 6e 69 74 69 | 6f 6e 73 0a 58 23 09 54 |definiti|ons.X#.T|
|00001f30| 52 4f 46 46 09 2d 20 6d | 6f 73 74 20 61 70 70 72 |ROFF.- m|ost appr|
|00001f40| 6f 70 72 69 61 74 65 20 | 74 72 6f 66 66 20 63 6f |opriate |troff co|
|00001f50| 6d 6d 61 6e 64 0a 58 0a | 58 4f 57 4e 45 52 20 20 |mmand.X.|XOWNER |
|00001f60| 3d 20 25 6f 77 6e 65 72 | 25 0a 58 47 52 4f 55 50 |= %owner|%.XGROUP|
|00001f70| 20 20 3d 20 25 67 72 6f | 75 70 25 0a 58 4d 4f 44 | = %gro|up%.XMOD|
|00001f80| 45 20 20 20 3d 20 25 6d | 6f 64 65 25 0a 58 42 49 |E = %m|ode%.XBI|
|00001f90| 4e 44 49 52 20 3d 20 25 | 62 69 6e 64 69 72 25 0a |NDIR = %|bindir%.|
|00001fa0| 58 4d 41 4e 44 49 52 20 | 3d 20 25 6d 61 6e 64 69 |XMANDIR |= %mandi|
|00001fb0| 72 25 0a 58 4d 41 4e 45 | 58 54 20 3d 20 25 6d 61 |r%.XMANE|XT = %ma|
|00001fc0| 6e 65 78 74 25 0a 58 4d | 41 4e 53 54 59 20 3d 20 |next%.XM|ANSTY = |
|00001fd0| 25 6d 61 6e 73 74 79 25 | 0a 58 53 49 47 4e 41 4c |%mansty%|.XSIGNAL|
|00001fe0| 20 3d 20 25 73 69 67 6e | 61 6c 25 0a 58 0a 58 23 | = %sign|al%.X.X#|
|00001ff0| 20 56 61 6c 75 65 73 20 | 66 6f 72 20 74 68 65 20 | Values |for the |
|00002000| 74 77 6f 20 64 65 66 61 | 75 6c 74 73 20 69 6e 20 |two defa|ults in |
|00002010| 22 74 6f 70 22 3a 0a 58 | 23 09 54 4f 50 4e 09 2d |"top":.X|#.TOPN.-|
|00002020| 20 64 65 66 61 75 6c 74 | 20 6e 75 6d 62 65 72 20 | default| number |
|00002030| 6f 66 20 70 72 6f 63 65 | 73 73 65 73 20 74 6f 20 |of proce|sses to |
|00002040| 64 69 73 70 6c 61 79 0a | 58 23 09 44 45 4c 41 59 |display.|X#.DELAY|
|00002050| 09 2d 20 64 65 66 61 75 | 6c 74 20 64 65 6c 61 79 |.- defau|lt delay|
|00002060| 20 62 65 74 77 65 65 6e | 20 75 70 64 61 74 65 73 | between| updates|
|00002070| 0a 58 23 0a 58 23 20 73 | 65 74 20 54 4f 50 4e 20 |.X#.X# s|et TOPN |
|00002080| 74 6f 20 2d 31 20 74 6f | 20 69 6e 64 69 63 61 74 |to -1 to| indicat|
|00002090| 65 20 69 6e 66 69 6e 69 | 74 79 20 28 73 6f 20 74 |e infini|ty (so t|
|000020a0| 68 61 74 20 74 6f 70 20 | 77 69 6c 6c 20 64 69 73 |hat top |will dis|
|000020b0| 70 6c 61 79 20 61 73 20 | 6d 61 6e 79 0a 58 23 20 |play as |many.X# |
|000020c0| 61 73 20 74 68 65 20 73 | 63 72 65 65 6e 20 77 69 |as the s|creen wi|
|000020d0| 6c 6c 20 68 6f 6c 64 29 | 2e 0a 58 0a 58 54 4f 50 |ll hold)|..X.XTOP|
|000020e0| 4e 20 3d 20 25 74 6f 70 | 6e 25 0a 58 44 45 4c 41 |N = %top|n%.XDELA|
|000020f0| 59 20 3d 20 25 64 65 6c | 61 79 25 0a 58 0a 58 54 |Y = %del|ay%.X.XT|
|00002100| 41 52 46 49 4c 45 53 20 | 3d 20 52 45 41 44 4d 45 |ARFILES |= README|
|00002110| 20 49 4e 53 54 41 4c 4c | 20 46 41 51 20 43 68 61 | INSTALL| FAQ Cha|
|00002120| 6e 67 65 73 20 43 6f 6e | 66 69 67 75 72 65 20 50 |nges Con|figure P|
|00002130| 6f 72 74 69 6e 67 20 5c | 0a 58 09 20 20 20 4d 61 |orting \|.X. Ma|
|00002140| 6b 65 66 69 6c 65 2e 58 | 20 4d 61 6b 65 2e 64 65 |kefile.X| Make.de|
|00002150| 73 63 2e 58 20 67 65 74 | 61 6e 73 20 5c 0a 58 09 |sc.X get|ans \.X.|
|00002160| 20 20 20 74 6f 70 2e 63 | 20 63 6f 6d 6d 61 6e 64 | top.c| command|
|00002170| 73 2e 63 20 64 69 73 70 | 6c 61 79 2e 63 20 73 63 |s.c disp|lay.c sc|
|00002180| 72 65 65 6e 2e 63 20 75 | 73 65 72 6e 61 6d 65 2e |reen.c u|sername.|
|00002190| 63 20 5c 0a 58 09 20 20 | 20 75 74 69 6c 73 2e 63 |c \.X. | utils.c|
|000021a0| 20 76 65 72 73 69 6f 6e | 2e 63 20 67 65 74 6f 70 | version|.c getop|
|000021b0| 74 2e 63 20 5c 0a 58 09 | 20 20 20 62 6f 6f 6c 65 |t.c \.X.| boole|
|000021c0| 61 6e 2e 68 20 64 69 73 | 70 6c 61 79 2e 68 20 6c |an.h dis|play.h l|
|000021d0| 61 79 6f 75 74 2e 68 20 | 6c 6f 61 64 61 76 67 2e |ayout.h |loadavg.|
|000021e0| 68 20 73 63 72 65 65 6e | 2e 68 20 5c 0a 58 09 20 |h screen|.h \.X. |
|000021f0| 20 20 6d 61 63 68 69 6e | 65 2e 68 20 70 61 74 63 | machin|e.h patc|
|00002200| 68 6c 65 76 65 6c 2e 68 | 20 74 6f 70 2e 68 20 74 |hlevel.h| top.h t|
|00002210| 6f 70 2e 6c 6f 63 61 6c | 2e 48 20 6f 73 2e 68 20 |op.local|.H os.h |
|00002220| 75 74 69 6c 73 2e 68 20 | 5c 0a 58 09 20 20 20 73 |utils.h |\.X. s|
|00002230| 69 67 63 6f 6e 76 2e 61 | 77 6b 20 74 6f 70 2e 58 |igconv.a|wk top.X|
|00002240| 20 6d 2d 74 65 6d 70 6c | 61 74 65 20 6d 65 74 61 | m-templ|ate meta|
|00002250| 74 6f 70 20 5c 0a 58 09 | 20 20 20 6d 61 63 68 69 |top \.X.| machi|
|00002260| 6e 65 0a 58 43 46 49 4c | 45 53 20 3d 20 74 6f 70 |ne.XCFIL|ES = top|
|00002270| 2e 63 20 63 6f 6d 6d 61 | 6e 64 73 2e 63 20 64 69 |.c comma|nds.c di|
|00002280| 73 70 6c 61 79 2e 63 20 | 73 63 72 65 65 6e 2e 63 |splay.c |screen.c|
|00002290| 20 75 73 65 72 6e 61 6d | 65 2e 63 20 5c 0a 58 09 | usernam|e.c \.X.|
|000022a0| 20 75 74 69 6c 73 2e 63 | 20 76 65 72 73 69 6f 6e | utils.c| version|
|000022b0| 2e 63 20 67 65 74 6f 70 | 74 2e 63 20 6d 61 63 68 |.c getop|t.c mach|
|000022c0| 69 6e 65 2e 63 0a 58 4f | 42 4a 53 20 3d 20 74 6f |ine.c.XO|BJS = to|
|000022d0| 70 2e 6f 20 63 6f 6d 6d | 61 6e 64 73 2e 6f 20 64 |p.o comm|ands.o d|
|000022e0| 69 73 70 6c 61 79 2e 6f | 20 73 63 72 65 65 6e 2e |isplay.o| screen.|
|000022f0| 6f 20 75 73 65 72 6e 61 | 6d 65 2e 6f 20 5c 0a 58 |o userna|me.o \.X|
|00002300| 20 20 20 20 20 20 20 75 | 74 69 6c 73 2e 6f 20 76 | u|tils.o v|
|00002310| 65 72 73 69 6f 6e 2e 6f | 20 67 65 74 6f 70 74 2e |ersion.o| getopt.|
|00002320| 6f 20 6d 61 63 68 69 6e | 65 2e 6f 0a 58 0a 58 43 |o machin|e.o.X.XC|
|00002330| 44 45 46 53 20 3d 20 25 | 63 64 65 66 73 25 0a 58 |DEFS = %|cdefs%.X|
|00002340| 4c 49 42 53 20 3d 20 25 | 6c 69 62 73 25 0a 58 0a |LIBS = %|libs%.X.|
|00002350| 58 43 46 4c 41 47 53 20 | 3d 20 25 63 66 6c 67 73 |XCFLAGS |= %cflgs|
|00002360| 25 20 24 28 43 44 45 46 | 53 29 0a 58 4c 49 4e 54 |% $(CDEF|S).XLINT|
|00002370| 46 4c 41 47 53 20 3d 20 | 2d 78 20 24 28 43 44 45 |FLAGS = |-x $(CDE|
|00002380| 46 53 29 0a 58 0a 58 61 | 6c 6c 3a 20 4d 61 6b 65 |FS).X.Xa|ll: Make|
|00002390| 66 69 6c 65 20 74 6f 70 | 2e 6c 6f 63 61 6c 2e 68 |file top|.local.h|
|000023a0| 20 74 6f 70 0a 58 0a 58 | 4d 61 6b 65 66 69 6c 65 | top.X.X|Makefile|
|000023b0| 3a 20 4d 61 6b 65 66 69 | 6c 65 2e 58 0a 58 09 40 |: Makefi|le.X.X.@|
|000023c0| 65 63 68 6f 20 27 59 6f | 75 20 6e 65 65 64 20 74 |echo 'Yo|u need t|
|000023d0| 6f 20 72 75 6e 20 74 68 | 65 20 73 63 72 69 70 74 |o run th|e script|
|000023e0| 20 22 43 6f 6e 66 69 67 | 75 72 65 22 20 62 65 66 | "Config|ure" bef|
|000023f0| 6f 72 65 20 72 75 6e 6e | 69 6e 67 20 22 6d 61 6b |ore runn|ing "mak|
|00002400| 65 22 2e 27 0a 58 09 65 | 78 69 74 20 31 30 0a 58 |e".'.X.e|xit 10.X|
|00002410| 0a 58 74 6f 70 2e 6c 6f | 63 61 6c 2e 68 3a 20 74 |.Xtop.lo|cal.h: t|
|00002420| 6f 70 2e 6c 6f 63 61 6c | 2e 48 0a 58 09 40 65 63 |op.local|.H.X.@ec|
|00002430| 68 6f 20 27 59 6f 75 20 | 6e 65 65 64 20 74 6f 20 |ho 'You |need to |
|00002440| 72 75 6e 20 74 68 65 20 | 73 63 72 69 70 74 20 22 |run the |script "|
|00002450| 43 6f 6e 66 69 67 75 72 | 65 22 20 62 65 66 6f 72 |Configur|e" befor|
|00002460| 65 20 72 75 6e 6e 69 6e | 67 20 22 6d 61 6b 65 22 |e runnin|g "make"|
|00002470| 2e 27 0a 58 09 65 78 69 | 74 20 31 30 0a 58 0a 58 |.'.X.exi|t 10.X.X|
|00002480| 74 6f 70 3a 20 24 28 4f | 42 4a 53 29 0a 58 09 72 |top: $(O|BJS).X.r|
|00002490| 6d 20 2d 66 20 74 6f 70 | 0a 58 09 24 28 43 43 29 |m -f top|.X.$(CC)|
|000024a0| 20 2d 6f 20 74 6f 70 20 | 24 28 4f 42 4a 53 29 20 | -o top |$(OBJS) |
|000024b0| 2d 6c 74 65 72 6d 63 61 | 70 20 2d 6c 6d 20 24 28 |-ltermca|p -lm $(|
|000024c0| 4c 49 42 53 29 0a 58 0a | 58 6c 69 6e 74 3a 20 73 |LIBS).X.|Xlint: s|
|000024d0| 69 67 64 65 73 63 2e 68 | 0a 58 09 24 28 4c 49 4e |igdesc.h|.X.$(LIN|
|000024e0| 54 29 20 24 28 4c 49 4e | 54 46 4c 41 47 53 29 20 |T) $(LIN|TFLAGS) |
|000024f0| 24 28 43 46 49 4c 45 53 | 29 0a 58 0a 58 23 20 69 |$(CFILES|).X.X# i|
|00002500| 6e 63 6c 75 64 65 20 66 | 69 6c 65 20 64 65 70 65 |nclude f|ile depe|
|00002510| 6e 64 65 6e 63 69 65 73 | 0a 58 74 6f 70 2e 6f 3a |ndencies|.Xtop.o:|
|00002520| 20 62 6f 6f 6c 65 61 6e | 2e 68 20 64 69 73 70 6c | boolean|.h displ|
|00002530| 61 79 2e 68 20 73 63 72 | 65 65 6e 2e 68 20 74 6f |ay.h scr|een.h to|
|00002540| 70 2e 68 20 74 6f 70 2e | 6c 6f 63 61 6c 2e 68 20 |p.h top.|local.h |
|00002550| 75 74 69 6c 73 2e 68 20 | 6d 61 63 68 69 6e 65 2e |utils.h |machine.|
|00002560| 68 20 0a 58 63 6f 6d 6d | 61 6e 64 73 2e 6f 3a 20 |h .Xcomm|ands.o: |
|00002570| 62 6f 6f 6c 65 61 6e 2e | 68 20 73 69 67 64 65 73 |boolean.|h sigdes|
|00002580| 63 2e 68 20 75 74 69 6c | 73 2e 68 0a 58 64 69 73 |c.h util|s.h.Xdis|
|00002590| 70 6c 61 79 2e 6f 3a 20 | 62 6f 6f 6c 65 61 6e 2e |play.o: |boolean.|
|000025a0| 68 20 64 69 73 70 6c 61 | 79 2e 68 20 6c 61 79 6f |h displa|y.h layo|
|000025b0| 75 74 2e 68 20 73 63 72 | 65 65 6e 2e 68 20 74 6f |ut.h scr|een.h to|
|000025c0| 70 2e 68 20 74 6f 70 2e | 6c 6f 63 61 6c 2e 68 20 |p.h top.|local.h |
|000025d0| 75 74 69 6c 73 2e 68 0a | 58 6d 61 63 68 69 6e 65 |utils.h.|Xmachine|
|000025e0| 2e 6f 3a 20 74 6f 70 2e | 68 20 6d 61 63 68 69 6e |.o: top.|h machin|
|000025f0| 65 2e 68 0a 58 73 63 72 | 65 65 6e 2e 6f 3a 20 62 |e.h.Xscr|een.o: b|
|00002600| 6f 6f 6c 65 61 6e 2e 68 | 20 73 63 72 65 65 6e 2e |oolean.h| screen.|
|00002610| 68 0a 58 75 74 69 6c 73 | 2e 6f 3a 20 74 6f 70 2e |h.Xutils|.o: top.|
|00002620| 68 0a 58 76 65 72 73 69 | 6f 6e 2e 6f 3a 20 74 6f |h.Xversi|on.o: to|
|00002630| 70 2e 68 20 70 61 74 63 | 68 6c 65 76 65 6c 2e 68 |p.h patc|hlevel.h|
|00002640| 0a 58 75 73 65 72 6e 61 | 6d 65 2e 6f 3a 20 74 6f |.Xuserna|me.o: to|
|00002650| 70 2e 6c 6f 63 61 6c 2e | 68 20 75 74 69 6c 73 2e |p.local.|h utils.|
|00002660| 68 0a 58 0a 58 23 20 61 | 75 74 6f 6d 61 74 69 63 |h.X.X# a|utomatic|
|00002670| 61 6c 6c 79 20 62 75 69 | 6c 74 20 69 6e 63 6c 75 |ally bui|lt inclu|
|00002680| 64 65 20 66 69 6c 65 0a | 58 73 69 67 64 65 73 63 |de file.|Xsigdesc|
|00002690| 2e 68 3a 20 73 69 67 63 | 6f 6e 76 2e 61 77 6b 20 |.h: sigc|onv.awk |
|000026a0| 24 28 53 49 47 4e 41 4c | 29 0a 58 09 24 28 41 57 |$(SIGNAL|).X.$(AW|
|000026b0| 4b 29 20 2d 66 20 73 69 | 67 63 6f 6e 76 2e 61 77 |K) -f si|gconv.aw|
|000026c0| 6b 20 24 28 53 49 47 4e | 41 4c 29 20 3e 73 69 67 |k $(SIGN|AL) >sig|
|000026d0| 64 65 73 63 2e 68 0a 58 | 0a 58 74 61 72 3a 0a 58 |desc.h.X|.Xtar:.X|
|000026e0| 09 72 6d 20 2d 66 20 74 | 6f 70 2e 74 61 72 20 6d |.rm -f t|op.tar m|
|000026f0| 61 63 68 69 6e 65 2f 2a | 2e 64 65 73 63 0a 58 09 |achine/*|.desc.X.|
|00002700| 74 61 72 20 63 76 66 20 | 74 6f 70 2e 74 61 72 20 |tar cvf |top.tar |
|00002710| 24 28 54 41 52 46 49 4c | 45 53 29 0a 58 0a 58 73 |$(TARFIL|ES).X.Xs|
|00002720| 68 61 72 3a 0a 58 09 72 | 6d 20 2d 66 20 74 6f 70 |har:.X.r|m -f top|
|00002730| 2e 73 68 61 72 2a 20 6d | 61 63 68 69 6e 65 2f 2a |.shar* m|achine/*|
|00002740| 2e 64 65 73 63 0a 58 09 | 6d 61 6b 65 6b 69 74 20 |.desc.X.|makekit |
|00002750| 2d 6e 74 6f 70 2e 73 68 | 61 72 2e 20 2d 74 22 4e |-ntop.sh|ar. -t"N|
|00002760| 6f 77 20 72 65 61 64 20 | 52 45 41 44 4d 45 20 61 |ow read |README a|
|00002770| 6e 64 20 49 4e 53 54 41 | 4c 4c 2c 20 74 68 65 6e |nd INSTA|LL, then|
|00002780| 20 72 75 6e 20 43 6f 6e | 66 69 67 75 72 65 22 20 | run Con|figure" |
|00002790| 6d 61 63 68 69 6e 65 20 | 24 28 54 41 52 46 49 4c |machine |$(TARFIL|
|000027a0| 45 53 29 2f 2a 0a 58 0a | 58 63 6c 65 61 6e 3a 0a |ES)/*.X.|Xclean:.|
|000027b0| 58 09 72 6d 20 2d 66 20 | 2a 2e 6f 20 74 6f 70 20 |X.rm -f |*.o top |
|000027c0| 63 6f 72 65 20 63 6f 72 | 65 2e 2a 20 73 69 67 64 |core cor|e.* sigd|
|000027d0| 65 73 63 2e 68 0a 58 0a | 58 76 65 72 79 63 6c 65 |esc.h.X.|Xverycle|
|000027e0| 61 6e 3a 20 63 6c 65 61 | 6e 0a 58 09 72 6d 20 2d |an: clea|n.X.rm -|
|000027f0| 66 20 4d 61 6b 65 2e 64 | 65 73 63 20 6d 61 63 68 |f Make.d|esc mach|
|00002800| 69 6e 65 2f 2a 2e 64 65 | 73 63 20 2e 64 65 66 61 |ine/*.de|sc .defa|
|00002810| 75 6c 74 73 20 74 6f 70 | 2e 74 61 72 20 53 59 4e |ults top|.tar SYN|
|00002820| 4f 50 53 49 53 20 4d 61 | 6b 65 66 69 6c 65 20 74 |OPSIS Ma|kefile t|
|00002830| 6f 70 2e 6c 6f 63 61 6c | 2e 68 20 74 6f 70 2e 31 |op.local|.h top.1|
|00002840| 20 6d 61 63 68 69 6e 65 | 2e 63 0a 58 0a 58 69 6e | machine|.c.X.Xin|
|00002850| 73 74 61 6c 6c 3a 20 74 | 6f 70 20 74 6f 70 2e 31 |stall: t|op top.1|
|00002860| 20 69 6e 73 74 61 6c 6c | 2d 74 6f 70 20 69 6e 73 | install|-top ins|
|00002870| 74 61 6c 6c 2d 24 28 4d | 41 4e 53 54 59 29 0a 58 |tall-$(M|ANSTY).X|
|00002880| 0a 58 69 6e 73 74 61 6c | 6c 2d 74 6f 70 3a 0a 58 |.Xinstal|l-top:.X|
|00002890| 09 24 28 49 4e 53 54 41 | 4c 4c 29 20 2d 73 20 2d |.$(INSTA|LL) -s -|
|000028a0| 6f 20 24 28 4f 57 4e 45 | 52 29 20 2d 6d 20 24 28 |o $(OWNE|R) -m $(|
|000028b0| 4d 4f 44 45 29 20 2d 67 | 20 24 28 47 52 4f 55 50 |MODE) -g| $(GROUP|
|000028c0| 29 20 74 6f 70 20 24 28 | 42 49 4e 44 49 52 29 0a |) top $(|BINDIR).|
|000028d0| 58 0a 58 69 6e 73 74 61 | 6c 6c 2d 6d 61 6e 3a 0a |X.Xinsta|ll-man:.|
|000028e0| 58 09 24 28 49 4e 53 54 | 41 4c 4c 29 20 2d 63 20 |X.$(INST|ALL) -c |
|000028f0| 74 6f 70 2e 31 20 24 28 | 4d 41 4e 44 49 52 29 2f |top.1 $(|MANDIR)/|
|00002900| 74 6f 70 2e 24 28 4d 41 | 4e 45 58 54 29 0a 58 0a |top.$(MA|NEXT).X.|
|00002910| 58 69 6e 73 74 61 6c 6c | 2d 63 61 74 6d 61 6e 3a |Xinstall|-catman:|
|00002920| 0a 58 09 74 62 6c 20 74 | 6f 70 2e 31 20 7c 20 6e |.X.tbl t|op.1 | n|
|00002930| 72 6f 66 66 20 2d 6d 61 | 6e 20 3e 20 24 28 4d 41 |roff -ma|n > $(MA|
|00002940| 4e 44 49 52 29 2f 74 6f | 70 2e 24 28 4d 41 4e 45 |NDIR)/to|p.$(MANE|
|00002950| 58 54 29 0a 58 0a 58 69 | 6e 73 74 61 6c 6c 6d 65 |XT).X.Xi|nstallme|
|00002960| 74 61 3a 20 74 6f 70 20 | 74 6f 70 2e 31 0a 58 09 |ta: top |top.1.X.|
|00002970| 24 28 49 4e 53 54 41 4c | 4c 29 20 2d 6f 20 24 28 |$(INSTAL|L) -o $(|
|00002980| 4f 57 4e 45 52 29 20 2d | 6d 20 37 35 35 20 2d 67 |OWNER) -|m 755 -g|
|00002990| 20 24 28 47 52 4f 55 50 | 29 20 6d 65 74 61 74 6f | $(GROUP|) metato|
|000029a0| 70 20 24 28 42 49 4e 44 | 49 52 29 2f 74 6f 70 0a |p $(BIND|IR)/top.|
|000029b0| 58 09 40 65 63 68 6f 20 | 24 28 49 4e 53 54 41 4c |X.@echo |$(INSTAL|
|000029c0| 4c 29 20 2d 73 20 2d 6f | 20 24 28 4f 57 4e 45 52 |L) -s -o| $(OWNER|
|000029d0| 29 20 2d 6d 20 24 28 4d | 4f 44 45 29 20 2d 67 20 |) -m $(M|ODE) -g |
|000029e0| 24 28 47 52 4f 55 50 29 | 20 74 6f 70 20 24 28 42 |$(GROUP)| top $(B|
|000029f0| 49 4e 44 49 52 29 2f 74 | 6f 70 2d 60 75 6e 61 6d |INDIR)/t|op-`unam|
|00002a00| 65 20 2d 6d 60 2d 60 75 | 6e 61 6d 65 20 2d 72 60 |e -m`-`u|name -r`|
|00002a10| 0a 58 09 40 24 28 49 4e | 53 54 41 4c 4c 29 20 2d |.X.@$(IN|STALL) -|
|00002a20| 73 20 2d 6f 20 24 28 4f | 57 4e 45 52 29 20 2d 6d |s -o $(O|WNER) -m|
|00002a30| 20 24 28 4d 4f 44 45 29 | 20 2d 67 20 24 28 47 52 | $(MODE)| -g $(GR|
|00002a40| 4f 55 50 29 20 5c 0a 58 | 09 09 74 6f 70 20 24 28 |OUP) \.X|..top $(|
|00002a50| 42 49 4e 44 49 52 29 2f | 74 6f 70 2d 60 75 6e 61 |BINDIR)/|top-`una|
|00002a60| 6d 65 20 2d 6d 60 2d 60 | 75 6e 61 6d 65 20 2d 72 |me -m`-`|uname -r|
|00002a70| 60 0a 58 09 24 28 49 4e | 53 54 41 4c 4c 29 20 2d |`.X.$(IN|STALL) -|
|00002a80| 63 20 74 6f 70 2e 31 20 | 24 28 4d 41 4e 44 49 52 |c top.1 |$(MANDIR|
|00002a90| 29 2f 74 6f 70 2e 24 28 | 4d 41 4e 45 58 54 29 0a |)/top.$(|MANEXT).|
|00002aa0| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 69 66 20 74 |END_OF_F|ILE.if t|
|00002ab0| 65 73 74 20 33 37 32 39 | 20 2d 6e 65 20 60 77 63 |est 3729| -ne `wc|
|00002ac0| 20 2d 63 20 3c 27 4d 61 | 6b 65 66 69 6c 65 2e 58 | -c <'Ma|kefile.X|
|00002ad0| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00002ae0| 6f 20 73 68 61 72 3a 20 | 5c 22 27 4d 61 6b 65 66 |o shar: |\"'Makef|
|00002af0| 69 6c 65 2e 58 27 5c 22 | 20 75 6e 70 61 63 6b 65 |ile.X'\"| unpacke|
|00002b00| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00002b10| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|00002b20| 4d 61 6b 65 66 69 6c 65 | 2e 58 27 0a 66 69 0a 69 |Makefile|.X'.fi.i|
|00002b30| 66 20 74 65 73 74 20 2d | 66 20 27 52 45 41 44 4d |f test -|f 'READM|
|00002b40| 45 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |E' -a "$|{1}" != |
|00002b50| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00002b60| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00002b70| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00002b80| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 52 45 41 44 |ing file| \"'READ|
|00002b90| 4d 45 27 5c 22 0a 65 6c | 73 65 0a 65 63 68 6f 20 |ME'\".el|se.echo |
|00002ba0| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00002bb0| 20 5c 22 27 52 45 41 44 | 4d 45 27 5c 22 20 5c 28 | \"'READ|ME'\" \(|
|00002bc0| 34 35 37 38 20 63 68 61 | 72 61 63 74 65 72 73 5c |4578 cha|racters\|
|00002bd0| 29 0a 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e |).sed "s|/^X//" >|
|00002be0| 27 52 45 41 44 4d 45 27 | 20 3c 3c 27 45 4e 44 5f |'README'| <<'END_|
|00002bf0| 4f 46 5f 46 49 4c 45 27 | 0a 58 20 20 20 20 20 20 |OF_FILE'|.X |
|00002c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c10| 20 20 20 20 20 20 20 54 | 4f 50 0a 58 20 20 20 20 | T|OP.X |
|00002c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c30| 20 20 20 20 20 56 65 72 | 73 69 6f 6e 20 33 2e 32 | Ver|sion 3.2|
|00002c40| 0a 58 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X.X | |
|00002c50| 20 20 20 20 20 20 20 20 | 20 20 20 57 69 6c 6c 69 | | Willi|
|00002c60| 61 6d 20 4c 65 46 65 62 | 76 72 65 0a 58 09 09 20 |am LeFeb|vre.X.. |
|00002c70| 20 20 20 20 61 6e 64 20 | 61 20 63 61 73 74 20 6f | and |a cast o|
|00002c80| 66 20 64 6f 7a 65 6e 73 | 0a 58 0a 58 0a 58 49 66 |f dozens|.X.X.XIf|
|00002c90| 20 79 6f 75 20 64 6f 20 | 6e 6f 74 20 77 61 6e 74 | you do |not want|
|00002ca0| 20 74 6f 20 72 65 61 64 | 20 74 68 69 73 20 65 6e | to read| this en|
|00002cb0| 74 69 72 65 20 66 69 6c | 65 2c 20 74 68 65 6e 20 |tire fil|e, then |
|00002cc0| 61 74 20 6c 65 61 73 74 | 20 72 65 61 64 0a 58 74 |at least| read.Xt|
|00002cd0| 68 65 20 73 65 63 74 69 | 6f 6e 20 61 74 20 74 68 |he secti|on at th|
|00002ce0| 65 20 65 6e 64 20 65 6e | 74 69 74 6c 65 64 20 22 |e end en|titled "|
|00002cf0| 4b 4e 4f 57 4e 20 50 52 | 4f 42 4c 45 4d 53 22 2e |KNOWN PR|OBLEMS".|
|00002d00| 0a 58 0a 58 22 74 6f 70 | 22 20 69 73 20 61 20 70 |.X.X"top|" is a p|
|00002d10| 72 6f 67 72 61 6d 20 74 | 68 61 74 20 77 69 6c 6c |rogram t|hat will|
|00002d20| 20 67 69 76 65 20 63 6f | 6e 74 69 6e 75 61 6c 20 | give co|ntinual |
|00002d30| 72 65 70 6f 72 74 73 20 | 61 62 6f 75 74 20 74 68 |reports |about th|
|00002d40| 65 20 73 74 61 74 65 20 | 6f 66 0a 58 74 68 65 20 |e state |of.Xthe |
|00002d50| 73 79 73 74 65 6d 2c 20 | 69 6e 63 6c 75 64 69 6e |system, |includin|
|00002d60| 67 20 61 20 6c 69 73 74 | 20 6f 66 20 74 68 65 20 |g a list| of the |
|00002d70| 74 6f 70 20 63 70 75 20 | 75 73 69 6e 67 20 70 72 |top cpu |using pr|
|00002d80| 6f 63 65 73 73 65 73 2e | 20 20 56 65 72 73 69 6f |ocesses.| Versio|
|00002d90| 6e 20 33 0a 58 6f 66 20 | 22 74 6f 70 22 20 68 61 |n 3.Xof |"top" ha|
|00002da0| 73 20 74 68 72 65 65 20 | 70 72 69 6d 61 72 79 20 |s three |primary |
|00002db0| 64 65 73 69 67 6e 20 67 | 6f 61 6c 73 3a 20 70 72 |design g|oals: pr|
|00002dc0| 6f 76 69 64 65 20 61 6e | 20 61 63 63 75 72 61 74 |ovide an| accurat|
|00002dd0| 65 20 73 6e 61 70 73 68 | 6f 74 20 6f 66 0a 58 74 |e snapsh|ot of.Xt|
|00002de0| 68 65 20 73 79 73 74 65 | 6d 20 61 6e 64 20 70 72 |he syste|m and pr|
|00002df0| 6f 63 65 73 73 20 73 74 | 61 74 65 2c 20 6e 6f 74 |ocess st|ate, not|
|00002e00| 20 62 65 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 74 | be one |of the t|
|00002e10| 6f 70 20 70 72 6f 63 65 | 73 73 65 73 20 69 74 73 |op proce|sses its|
|00002e20| 65 6c 66 2c 20 62 65 0a | 58 61 73 20 70 6f 72 74 |elf, be.|Xas port|
|00002e30| 61 62 6c 65 20 61 73 20 | 70 6f 73 73 69 62 6c 65 |able as |possible|
|00002e40| 2e 0a 58 0a 58 56 65 72 | 73 69 6f 6e 20 33 20 68 |..X.XVer|sion 3 h|
|00002e50| 61 73 20 6d 61 6e 79 20 | 62 75 67 20 66 69 78 65 |as many |bug fixe|
|00002e60| 73 20 66 72 6f 6d 20 76 | 65 72 73 69 6f 6e 20 32 |s from v|ersion 2|
|00002e70| 2e 35 2c 20 61 6e 64 20 | 69 74 20 68 61 73 20 61 |.5, and |it has a|
|00002e80| 6c 73 6f 20 62 65 65 6e | 0a 58 72 65 6f 72 67 61 |lso been|.Xreorga|
|00002e90| 6e 69 7a 65 64 20 69 6e | 20 61 20 6d 61 6a 6f 72 |nized in| a major|
|00002ea0| 20 77 61 79 20 74 6f 20 | 6d 61 6b 65 20 69 74 20 | way to |make it |
|00002eb0| 65 61 73 79 20 74 6f 20 | 70 6f 72 74 20 74 6f 20 |easy to |port to |
|00002ec0| 6f 74 68 65 72 20 70 6c | 61 74 66 6f 72 6d 73 2e |other pl|atforms.|
|00002ed0| 0a 58 41 6c 6c 20 73 79 | 73 74 65 6d 20 64 65 70 |.XAll sy|stem dep|
|00002ee0| 65 6e 64 65 6e 74 20 63 | 6f 64 65 20 69 73 20 6e |endent c|ode is n|
|00002ef0| 6f 77 20 63 6f 6e 74 61 | 69 6e 65 64 20 69 6e 20 |ow conta|ined in |
|00002f00| 6f 6e 65 20 66 69 6c 65 | 2e 0a 58 0a 58 54 6f 70 |one file|..X.XTop|
|00002f10| 20 6e 6f 77 20 69 6e 63 | 6c 75 64 65 73 20 61 20 | now inc|ludes a |
|00002f20| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 73 63 |configur|ation sc|
|00002f30| 72 69 70 74 20 63 61 6c | 6c 65 64 20 22 43 6f 6e |ript cal|led "Con|
|00002f40| 66 69 67 75 72 65 22 2e | 20 20 49 74 20 68 65 6c |figure".| It hel|
|00002f50| 70 73 0a 58 74 68 65 20 | 69 6e 73 74 61 6c 6c 65 |ps.Xthe |installe|
|00002f60| 72 20 63 68 6f 6f 73 65 | 20 74 68 65 20 63 6f 72 |r choose| the cor|
|00002f70| 72 65 63 74 20 70 61 72 | 61 6d 65 74 65 72 73 20 |rect par|ameters |
|00002f80| 66 6f 72 20 74 68 69 73 | 20 70 61 72 74 69 63 75 |for this| particu|
|00002f90| 6c 61 72 0a 58 69 6e 73 | 74 61 6c 6c 61 74 69 6f |lar.Xins|tallatio|
|00002fa0| 6e 2e 20 20 54 68 69 73 | 20 73 63 72 69 70 74 20 |n. This| script |
|00002fb0| 4d 55 53 54 20 62 65 20 | 72 75 6e 20 62 65 66 6f |MUST be |run befo|
|00002fc0| 72 65 20 61 74 74 65 6d | 70 74 69 6e 67 20 74 6f |re attem|pting to|
|00002fd0| 20 63 6f 6d 70 69 6c 65 | 20 74 6f 70 2e 0a 58 0a | compile| top..X.|
|00002fe0| 58 54 6f 70 20 72 65 71 | 75 69 72 65 73 20 72 65 |XTop req|uires re|
|00002ff0| 61 64 20 61 63 63 65 73 | 73 20 74 6f 20 74 68 65 |ad acces|s to the|
|00003000| 20 6d 65 6d 6f 72 79 20 | 66 69 6c 65 73 20 22 2f | memory |files "/|
|00003010| 64 65 76 2f 6b 6d 65 6d | 22 20 61 6e 64 20 22 2f |dev/kmem|" and "/|
|00003020| 64 65 76 2f 6d 65 6d 22 | 0a 58 61 73 20 77 65 6c |dev/mem"|.Xas wel|
|00003030| 6c 20 61 73 20 74 68 65 | 20 73 79 73 74 65 6d 20 |l as the| system |
|00003040| 69 6d 61 67 65 20 22 2f | 76 6d 75 6e 69 78 22 2e |image "/|vmunix".|
|00003050| 20 20 53 6f 6d 65 20 69 | 6e 73 74 61 6c 6c 61 74 | Some i|nstallat|
|00003060| 69 6f 6e 73 20 68 61 76 | 65 20 74 68 65 73 65 0a |ions hav|e these.|
|00003070| 58 66 69 6c 65 73 20 70 | 72 6f 74 65 63 74 65 64 |Xfiles p|rotected|
|00003080| 20 66 72 6f 6d 20 67 65 | 6e 65 72 61 6c 20 61 63 | from ge|neral ac|
|00003090| 63 65 73 73 2e 20 20 54 | 68 65 73 65 20 73 69 74 |cess. T|hese sit|
|000030a0| 65 73 20 77 6f 75 6c 64 | 20 68 61 76 65 20 74 6f |es would| have to|
|000030b0| 20 69 6e 73 74 61 6c 6c | 0a 58 74 68 69 73 20 70 | install|.Xthis p|
|000030c0| 72 6f 67 72 61 6d 20 69 | 6e 20 74 68 65 20 73 61 |rogram i|n the sa|
|000030d0| 6d 65 20 77 61 79 20 74 | 68 61 74 20 70 72 6f 67 |me way t|hat prog|
|000030e0| 72 61 6d 73 20 73 75 63 | 68 20 61 73 20 22 70 73 |rams suc|h as "ps|
|000030f0| 22 20 61 72 65 20 69 6e | 73 74 61 6c 6c 65 64 2e |" are in|stalled.|
|00003100| 0a 58 0a 58 43 41 56 45 | 41 54 3a 20 76 65 72 73 |.X.XCAVE|AT: vers|
|00003110| 69 6f 6e 20 33 20 6f 66 | 20 74 6f 70 20 68 61 73 |ion 3 of| top has|
|00003120| 20 69 6e 74 65 72 6e 61 | 6c 20 63 6f 6d 6d 61 6e | interna|l comman|
|00003130| 64 73 20 74 68 61 74 20 | 6b 69 6c 6c 20 61 6e 64 |ds that |kill and|
|00003140| 20 72 65 6e 69 63 65 0a | 58 70 72 6f 63 65 73 73 | renice.|Xprocess|
|00003150| 65 73 2e 20 20 41 6c 74 | 68 6f 75 67 68 20 49 20 |es. Alt|hough I |
|00003160| 68 61 76 65 20 74 61 6b | 65 6e 20 73 74 65 70 73 |have tak|en steps|
|00003170| 20 74 6f 20 69 6e 73 75 | 72 65 20 74 68 61 74 20 | to insu|re that |
|00003180| 74 6f 70 20 6d 61 6b 65 | 73 0a 58 61 70 70 72 6f |top make|s.Xappro|
|00003190| 70 72 69 61 74 65 20 63 | 68 65 63 6b 73 20 77 69 |priate c|hecks wi|
|000031a0| 74 68 20 74 68 65 73 65 | 20 63 6f 6d 6d 61 6e 64 |th these| command|
|000031b0| 73 2c 20 49 20 63 61 6e | 6e 6f 74 20 67 75 61 72 |s, I can|not guar|
|000031c0| 61 6e 74 65 65 20 74 68 | 61 74 20 74 68 65 73 65 |antee th|at these|
|000031d0| 0a 58 69 6e 74 65 72 6e | 61 6c 20 63 6f 6d 6d 61 |.Xintern|al comma|
|000031e0| 6e 64 73 20 61 72 65 20 | 74 6f 74 61 6c 6c 79 20 |nds are |totally |
|000031f0| 73 65 63 75 72 65 2e 20 | 20 49 46 20 59 4f 55 20 |secure. | IF YOU |
|00003200| 49 4e 53 54 41 4c 4c 20 | 74 6f 70 20 61 73 20 61 |INSTALL |top as a|
|00003210| 20 53 45 54 55 49 44 0a | 58 70 72 6f 67 72 61 6d | SETUID.|Xprogram|
|00003220| 2c 20 79 6f 75 20 64 6f | 20 73 6f 20 41 54 20 59 |, you do| so AT Y|
|00003230| 4f 55 52 20 4f 57 4e 20 | 52 49 53 4b 21 20 20 49 |OUR OWN |RISK! I|
|00003240| 20 72 65 61 6c 69 7a 65 | 20 74 68 61 74 20 73 6f | realize| that so|
|00003250| 6d 65 20 6f 70 65 72 61 | 74 69 6e 67 0a 58 73 79 |me opera|ting.Xsy|
|00003260| 73 74 65 6d 73 20 77 69 | 6c 6c 20 72 65 71 75 69 |stems wi|ll requi|
|00003270| 72 65 20 74 6f 70 20 74 | 6f 20 72 75 6e 20 73 65 |re top t|o run se|
|00003280| 74 75 69 64 2c 20 61 6e | 64 20 49 20 77 69 6c 6c |tuid, an|d I will|
|00003290| 20 64 6f 20 65 76 65 72 | 79 74 68 69 6e 67 20 49 | do ever|ything I|
|000032a0| 20 63 61 6e 0a 58 74 6f | 20 6d 61 6b 65 20 73 75 | can.Xto| make su|
|000032b0| 72 65 20 74 68 61 74 20 | 74 6f 70 20 69 73 20 61 |re that |top is a|
|000032c0| 20 73 65 63 75 72 65 20 | 73 65 74 75 69 64 20 70 | secure |setuid p|
|000032d0| 72 6f 67 72 61 6d 2e 0a | 58 0a 58 43 6f 6e 66 69 |rogram..|X.XConfi|
|000032e0| 67 75 72 65 20 77 69 6c | 6c 20 61 73 6b 20 79 6f |gure wil|l ask yo|
|000032f0| 75 20 74 6f 20 69 6e 70 | 75 74 20 76 61 6c 75 65 |u to inp|ut value|
|00003300| 73 20 66 6f 72 20 63 65 | 72 74 61 69 6e 20 70 61 |s for ce|rtain pa|
|00003310| 72 61 6d 65 74 65 72 73 | 2e 20 20 42 65 66 6f 72 |rameters|. Befor|
|00003320| 65 0a 58 65 61 63 68 20 | 70 61 72 61 6d 65 74 65 |e.Xeach |paramete|
|00003330| 72 2c 20 43 6f 6e 66 69 | 67 75 72 65 20 77 69 6c |r, Confi|gure wil|
|00003340| 6c 20 64 69 73 70 6c 61 | 79 20 61 20 64 65 73 63 |l displa|y a desc|
|00003350| 72 69 70 74 69 6f 6e 20 | 6f 66 20 77 68 61 74 20 |ription |of what |
|00003360| 74 68 65 0a 58 70 61 72 | 61 6d 65 74 65 72 20 64 |the.Xpar|ameter d|
|00003370| 6f 65 73 2e 20 20 52 65 | 61 64 20 74 68 65 20 64 |oes. Re|ad the d|
|00003380| 65 73 63 72 69 70 74 69 | 6f 6e 20 61 6e 64 20 63 |escripti|on and c|
|00003390| 68 6f 6f 73 65 20 61 6e | 20 61 70 70 72 6f 70 72 |hoose an| appropr|
|000033a0| 69 61 74 65 20 76 61 6c | 75 65 2e 0a 58 53 6f 6d |iate val|ue..XSom|
|000033b0| 65 74 69 6d 65 73 20 61 | 20 64 65 66 61 75 6c 74 |etimes a| default|
|000033c0| 20 77 69 6c 6c 20 61 70 | 70 65 61 72 20 69 6e 20 | will ap|pear in |
|000033d0| 62 72 61 63 6b 65 74 73 | 2e 20 20 54 79 70 69 6e |brackets|. Typin|
|000033e0| 67 20 6a 75 73 74 20 72 | 65 74 75 72 6e 20 77 69 |g just r|eturn wi|
|000033f0| 6c 6c 0a 58 63 68 6f 6f | 73 65 20 74 68 65 20 64 |ll.Xchoo|se the d|
|00003400| 65 66 61 75 6c 74 2e 0a | 58 0a 58 53 79 73 74 65 |efault..|X.XSyste|
|00003410| 6d 20 73 75 70 70 6f 72 | 74 20 6e 6f 77 20 74 61 |m suppor|t now ta|
|00003420| 6b 65 73 20 74 68 65 20 | 66 6f 72 6d 20 6f 66 20 |kes the |form of |
|00003430| 22 6d 6f 64 75 6c 65 73 | 22 2e 20 20 41 64 64 69 |"modules|". Addi|
|00003440| 6e 67 20 73 75 70 70 6f | 72 74 20 66 6f 72 0a 58 |ng suppo|rt for.X|
|00003450| 61 20 64 69 66 66 65 72 | 65 6e 74 20 61 72 63 68 |a differ|ent arch|
|00003460| 69 74 65 63 74 75 72 65 | 20 72 65 71 75 69 72 65 |itecture| require|
|00003470| 73 20 6f 6e 6c 79 20 61 | 64 64 69 6e 67 20 61 20 |s only a|dding a |
|00003480| 6d 6f 64 75 6c 65 2e 20 | 20 43 6f 6e 66 69 67 75 |module. | Configu|
|00003490| 72 65 0a 58 61 73 6b 73 | 20 77 68 69 63 68 20 6d |re.Xasks| which m|
|000034a0| 6f 64 75 6c 65 20 74 6f | 20 75 73 65 20 77 68 65 |odule to| use whe|
|000034b0| 6e 20 69 74 20 69 73 20 | 63 6f 6e 66 69 67 75 72 |n it is |configur|
|000034c0| 69 6e 67 20 74 6f 70 2e | 20 20 53 65 65 20 74 68 |ing top.| See th|
|000034d0| 65 20 66 69 6c 65 0a 58 | 22 50 6f 72 74 69 6e 67 |e file.X|"Porting|
|000034e0| 22 20 66 6f 72 20 61 20 | 64 65 73 63 72 69 70 74 |" for a |descript|
|000034f0| 69 6f 6e 20 6f 66 20 68 | 6f 77 20 74 6f 20 77 72 |ion of h|ow to wr|
|00003500| 69 74 65 20 79 6f 75 72 | 20 6f 77 6e 20 6d 6f 64 |ite your| own mod|
|00003510| 75 6c 65 2e 0a 58 0a 58 | 54 6f 20 63 6f 6d 70 69 |ule..X.X|To compi|
|00003520| 6c 65 20 61 6e 64 20 69 | 6e 73 74 61 6c 6c 20 22 |le and i|nstall "|
|00003530| 74 6f 70 22 2c 20 72 65 | 61 64 20 74 68 65 20 66 |top", re|ad the f|
|00003540| 69 6c 65 20 22 49 4e 53 | 54 41 4c 4c 22 20 61 6e |ile "INS|TALL" an|
|00003550| 64 20 66 6f 6c 6c 6f 77 | 20 74 68 65 0a 58 64 69 |d follow| the.Xdi|
|00003560| 75 72 65 63 74 69 6f 6e | 73 20 61 6e 64 20 61 64 |urection|s and ad|
|00003570| 76 69 63 65 20 63 6f 6e | 74 61 69 6e 65 64 20 74 |vice con|tained t|
|00003580| 68 65 72 65 69 6e 2e 0a | 58 0a 58 4f 6e 63 65 20 |herein..|X.XOnce |
|00003590| 79 6f 75 20 68 61 76 65 | 20 63 72 65 61 74 65 64 |you have| created|
|000035a0| 20 61 20 62 69 6e 61 72 | 79 20 66 6f 72 20 6f 6e | a binar|y for on|
|000035b0| 65 20 70 61 72 74 69 63 | 75 6c 61 72 20 74 79 70 |e partic|ular typ|
|000035c0| 65 20 6f 66 20 6d 61 63 | 68 69 6e 65 2c 20 79 6f |e of mac|hine, yo|
|000035d0| 75 0a 58 63 61 6e 20 72 | 65 63 6f 6e 66 69 67 75 |u.Xcan r|econfigu|
|000035e0| 72 65 20 66 6f 72 20 61 | 6e 6f 74 68 65 72 20 74 |re for a|nother t|
|000035f0| 79 70 65 20 77 69 74 68 | 20 22 2e 2f 43 6f 6e 66 |ype with| "./Conf|
|00003600| 69 67 75 72 65 20 6d 6f | 64 75 6c 65 6e 61 6d 65 |igure mo|dulename|
|00003610| 22 20 77 68 65 72 65 0a | 58 22 6d 6f 64 75 6c 65 |" where.|X"module|
|00003620| 6e 61 6d 65 22 20 69 73 | 20 72 65 70 6c 61 63 65 |name" is| replace|
|00003630| 64 20 77 69 74 68 20 74 | 68 65 20 61 70 70 72 6f |d with t|he appro|
|00003640| 70 72 69 61 74 65 20 6d | 6f 64 75 6c 65 20 6e 61 |priate m|odule na|
|00003650| 6d 65 2e 20 20 41 6c 6c | 20 6f 74 68 65 72 0a 58 |me. All| other.X|
|00003660| 70 61 72 61 6d 65 74 65 | 72 20 76 61 6c 75 65 73 |paramete|r values|
|00003670| 20 61 72 65 20 6b 65 70 | 74 20 74 68 65 20 73 61 | are kep|t the sa|
|00003680| 6d 65 2e 0a 58 0a 58 49 | 66 20 79 6f 75 20 6d 61 |me..X.XI|f you ma|
|00003690| 6b 65 20 61 6e 79 20 6b | 69 6e 64 20 6f 66 20 63 |ke any k|ind of c|
|000036a0| 68 61 6e 67 65 20 74 6f | 20 22 74 6f 70 22 20 74 |hange to| "top" t|
|000036b0| 68 61 74 20 79 6f 75 20 | 66 65 65 6c 20 77 6f 75 |hat you |feel wou|
|000036c0| 6c 64 20 62 65 0a 58 62 | 65 6e 65 66 69 63 69 61 |ld be.Xb|eneficia|
|000036d0| 6c 20 74 6f 20 6f 74 68 | 65 72 73 20 77 68 6f 20 |l to oth|ers who |
|000036e0| 75 73 65 20 74 68 69 73 | 20 70 72 6f 67 72 61 6d |use this| program|
|000036f0| 2c 20 6f 72 20 69 66 20 | 79 6f 75 20 66 69 6e 64 |, or if |you find|
|00003700| 20 61 6e 64 20 66 69 78 | 20 61 20 62 75 67 2c 0a | and fix| a bug,.|
|00003710| 58 70 6c 65 61 73 65 20 | 73 65 6e 64 20 6d 65 20 |Xplease |send me |
|00003720| 74 68 65 20 63 68 61 6e | 67 65 2e 0a 58 0a 58 41 |the chan|ge..X.XA|
|00003730| 56 41 49 4c 41 42 49 4c | 49 54 59 0a 58 0a 58 54 |VAILABIL|ITY.X.XT|
|00003740| 68 65 20 6c 61 74 65 73 | 74 20 76 65 72 73 69 6f |he lates|t versio|
|00003750| 6e 20 6f 66 20 22 74 6f | 70 22 20 69 73 20 61 6c |n of "to|p" is al|
|00003760| 77 61 79 73 20 61 76 61 | 69 6c 61 62 6c 65 20 76 |ways ava|ilable v|
|00003770| 69 61 20 61 6e 6f 6e 79 | 6d 6f 75 73 20 46 54 50 |ia anony|mous FTP|
|00003780| 20 66 72 6f 6d 0a 58 74 | 68 65 20 68 6f 73 74 20 | from.Xt|he host |
|00003790| 22 65 65 63 73 2e 6e 77 | 75 2e 65 64 75 22 20 69 |"eecs.nw|u.edu" i|
|000037a0| 6e 20 74 68 65 20 64 69 | 72 65 63 74 6f 72 79 20 |n the di|rectory |
|000037b0| 22 2f 70 75 62 2f 74 6f | 70 22 2e 20 20 41 64 64 |"/pub/to|p". Add|
|000037c0| 69 74 69 6f 6e 61 6c 20 | 6d 6f 64 75 6c 65 73 0a |itional |modules.|
|000037d0| 58 77 69 6c 6c 20 62 65 | 20 6d 61 64 65 20 61 76 |Xwill be| made av|
|000037e0| 61 69 6c 61 62 6c 65 20 | 69 6e 20 74 68 65 20 64 |ailable |in the d|
|000037f0| 69 72 65 63 74 6f 72 79 | 20 22 2f 70 75 62 2f 74 |irectory| "/pub/t|
|00003800| 6f 70 2f 6d 22 2e 0a 58 | 0a 58 4b 4e 4f 57 4e 20 |op/m"..X|.XKNOWN |
|00003810| 50 52 4f 42 4c 45 4d 53 | 3a 0a 58 0a 58 47 6e 75 |PROBLEMS|:.X.XGnu|
|00003820| 20 43 43 0a 58 0a 58 47 | 6e 75 20 43 43 20 6c 69 | CC.X.XG|nu CC li|
|00003830| 6b 65 73 20 76 65 72 79 | 20 6d 75 63 68 20 74 6f |kes very| much to|
|00003840| 20 75 73 65 20 69 74 73 | 20 6f 77 6e 20 69 6e 63 | use its| own inc|
|00003850| 6c 75 64 65 20 66 69 6c | 65 73 2e 20 20 4e 6f 74 |lude fil|es. Not|
|00003860| 20 62 65 69 6e 67 20 61 | 20 67 63 63 0a 58 65 78 | being a| gcc.Xex|
|00003870| 70 65 72 74 2c 20 49 20 | 63 61 6e 27 74 20 65 78 |pert, I |can't ex|
|00003880| 70 6c 61 69 6e 20 77 68 | 79 20 69 74 20 64 6f 65 |plain wh|y it doe|
|00003890| 73 20 74 68 69 73 2e 20 | 20 42 75 74 20 49 20 63 |s this. | But I c|
|000038a0| 61 6e 20 74 65 6c 6c 20 | 79 6f 75 20 74 68 61 74 |an tell |you that|
|000038b0| 20 69 6e 0a 58 61 74 20 | 6c 65 61 73 74 20 73 6f | in.Xat |least so|
|000038c0| 6d 65 20 69 6e 73 74 61 | 6e 63 65 73 20 74 68 61 |me insta|nces tha|
|000038d0| 74 20 49 20 68 61 76 65 | 20 65 6e 63 6f 75 6e 74 |t I have| encount|
|000038e0| 65 72 64 2c 20 74 68 65 | 20 66 69 6c 65 73 20 69 |erd, the| files i|
|000038f0| 6e 20 67 6e 75 2d 63 63 | 27 73 0a 58 22 69 6e 63 |n gnu-cc|'s.X"inc|
|00003900| 6c 75 64 65 2f 73 79 73 | 22 20 64 69 72 65 63 74 |lude/sys|" direct|
|00003910| 6f 72 79 20 61 72 65 20 | 49 4e 43 4f 52 52 45 43 |ory are |INCORREC|
|00003920| 54 2e 20 20 55 6e 66 6f | 72 74 75 6e 61 74 65 6c |T. Unfo|rtunatel|
|00003930| 79 2c 20 75 73 69 6e 67 | 20 74 68 65 0a 58 73 74 |y, using| the.Xst|
|00003940| 61 6e 64 61 72 64 20 69 | 6e 63 6c 75 64 65 20 66 |andard i|nclude f|
|00003950| 69 6c 65 73 20 77 69 74 | 68 20 47 6e 75 20 43 43 |iles wit|h Gnu CC|
|00003960| 20 64 6f 65 73 6e 27 74 | 20 73 65 65 6d 20 74 6f | doesn't| seem to|
|00003970| 20 70 72 6f 64 75 63 65 | 20 61 20 75 73 61 62 6c | produce| a usabl|
|00003980| 65 0a 58 72 65 73 75 6c | 74 2c 20 65 69 74 68 65 |e.Xresul|t, eithe|
|00003990| 72 2e 20 20 49 66 20 79 | 6f 75 20 66 65 65 6c 20 |r. If y|ou feel |
|000039a0| 79 6f 75 20 6d 75 73 74 | 20 75 73 65 20 67 63 63 |you must| use gcc|
|000039b0| 20 74 6f 20 63 6f 6d 70 | 69 6c 65 20 74 6f 70 2c | to comp|ile top,|
|000039c0| 20 74 68 65 6e 20 49 0a | 58 77 6f 75 6c 64 20 72 | then I.|Xwould r|
|000039d0| 65 63 6f 6d 6d 65 6e 64 | 20 79 6f 75 20 6d 61 6b |ecommend| you mak|
|000039e0| 65 20 6d 61 63 68 69 6e | 65 2e 6f 20 77 69 74 68 |e machin|e.o with|
|000039f0| 20 43 46 4c 41 47 53 3d | 2d 49 2f 75 73 72 2f 69 | CFLAGS=|-I/usr/i|
|00003a00| 6e 63 6c 75 64 65 2c 20 | 74 68 65 6e 0a 58 6d 61 |nclude, |then.Xma|
|00003a10| 6b 65 20 74 68 65 20 72 | 65 73 74 20 6f 66 20 74 |ke the r|est of t|
|00003a20| 68 65 20 6f 62 6a 65 63 | 74 20 66 69 6c 65 73 20 |he objec|t files |
|00003a30| 6e 6f 72 6d 61 6c 6c 79 | 2e 20 20 54 68 69 73 20 |normally|. This |
|00003a40| 73 65 65 6d 73 20 74 6f | 20 77 6f 72 6b 0a 58 72 |seems to| work.Xr|
|00003a50| 65 61 73 6f 6e 61 62 6c | 79 20 77 65 6c 6c 2e 0a |easonabl|y well..|
|00003a60| 58 0a 58 0a 58 4d 75 6c | 74 69 70 72 6f 63 65 73 |X.X.XMul|tiproces|
|00003a70| 73 6f 72 20 53 6f 6c 61 | 72 69 73 20 32 20 6d 61 |sor Sola|ris 2 ma|
|00003a80| 63 68 69 6e 65 73 3a 0a | 58 0a 58 54 68 65 72 65 |chines:.|X.XThere|
|00003a90| 20 69 73 20 61 20 62 75 | 67 20 69 6e 20 74 68 65 | is a bu|g in the|
|00003aa0| 20 73 75 6e 6f 73 35 20 | 6d 6f 64 75 6c 65 20 77 | sunos5 |module w|
|00003ab0| 68 69 63 68 20 70 72 65 | 76 65 6e 74 73 20 69 74 |hich pre|vents it|
|00003ac0| 20 66 72 6f 6d 20 77 6f | 72 6b 69 6e 67 0a 58 63 | from wo|rking.Xc|
|00003ad0| 6f 72 72 65 63 74 6c 79 | 20 6f 6e 20 6d 61 63 68 |orrectly| on mach|
|00003ae0| 69 6e 65 73 20 74 68 61 | 74 20 63 6f 6e 74 61 69 |ines tha|t contai|
|00003af0| 6e 20 6d 6f 72 65 20 74 | 68 61 6e 20 6f 6e 65 20 |n more t|han one |
|00003b00| 70 72 6f 63 65 73 73 6f | 72 20 28 73 69 6e 67 6c |processo|r (singl|
|00003b10| 65 0a 58 70 72 6f 63 65 | 73 73 6f 72 20 73 75 6e |e.Xproce|ssor sun|
|00003b20| 34 6d 20 6d 61 63 68 69 | 6e 65 73 20 73 65 65 6d |4m machi|nes seem|
|00003b30| 20 74 6f 20 72 75 6e 20 | 6a 75 73 74 20 66 69 6e | to run |just fin|
|00003b40| 65 29 2e 20 20 41 20 66 | 69 78 20 69 73 20 70 65 |e). A f|ix is pe|
|00003b50| 6e 64 69 6e 67 2e 0a 58 | 0a 58 0a 58 53 79 73 74 |nding..X|.X.XSyst|
|00003b60| 65 6d 20 56 20 52 20 34 | 2e 32 0a 58 0a 58 4c 6f |em V R 4|.2.X.XLo|
|00003b70| 61 64 20 61 76 65 72 61 | 67 65 20 61 6e 64 20 6d |ad avera|ge and m|
|00003b80| 65 6d 6f 72 79 20 64 69 | 73 70 6c 61 79 73 20 64 |emory di|splays d|
|00003b90| 6f 20 6e 6f 74 20 77 6f | 72 6b 2e 20 20 54 68 65 |o not wo|rk. The|
|00003ba0| 20 70 72 6f 62 6c 65 6d | 20 68 61 73 20 62 65 65 | problem| has bee|
|00003bb0| 6e 0a 58 74 72 61 63 65 | 64 20 64 6f 77 6e 20 74 |n.Xtrace|d down t|
|00003bc0| 6f 20 61 20 70 6f 74 65 | 6e 74 69 61 6c 20 62 75 |o a pote|ntial bu|
|00003bd0| 67 20 69 6e 20 74 68 65 | 20 22 6d 65 6d 22 20 64 |g in the| "mem" d|
|00003be0| 72 69 76 65 72 2e 20 20 | 54 68 65 20 61 75 74 68 |river. |The auth|
|00003bf0| 6f 72 0a 58 6f 66 20 74 | 68 65 20 73 76 72 34 32 |or.Xof t|he svr42|
|00003c00| 20 6d 6f 64 75 6c 65 20 | 69 73 20 77 6f 72 6b 69 | module |is worki|
|00003c10| 6e 67 20 6f 6e 20 61 20 | 66 69 78 2e 0a 58 0a 58 |ng on a |fix..X.X|
|00003c20| 0a 58 4d 65 6d 6f 72 79 | 20 6f 75 74 70 75 74 20 |.XMemory| output |
|00003c30| 6f 76 65 72 66 6c 6f 77 | 0a 58 0a 58 53 6f 6d 65 |overflow|.X.XSome|
|00003c40| 20 22 77 65 6c 6c 20 65 | 6e 64 6f 77 65 64 22 20 | "well e|ndowed" |
|00003c50| 6d 61 63 68 69 6e 65 73 | 20 77 69 6c 6c 20 63 61 |machines| will ca|
|00003c60| 75 73 65 20 74 6f 70 20 | 74 6f 20 6f 76 65 72 66 |use top |to overf|
|00003c70| 6c 6f 77 20 73 6f 6d 65 | 20 6f 66 20 74 68 65 0a |low some| of the.|
|00003c80| 58 66 69 65 6c 64 73 20 | 69 6e 20 74 68 65 20 6d |Xfields |in the m|
|00003c90| 65 6d 6f 72 79 20 6c 69 | 6e 65 20 61 6e 64 20 74 |emory li|ne and t|
|00003ca0| 68 65 20 22 53 49 5a 45 | 22 20 61 6e 64 20 22 52 |he "SIZE|" and "R|
|00003cb0| 45 53 22 20 63 6f 6c 75 | 6d 6e 73 2e 20 20 56 65 |ES" colu|mns. Ve|
|00003cc0| 72 73 69 6f 6e 0a 58 33 | 2e 32 20 77 69 6c 6c 20 |rsion.X3|.2 will |
|00003cd0| 68 61 76 65 20 61 6e 20 | 65 6c 65 67 61 6e 74 20 |have an |elegant |
|00003ce0| 66 69 78 20 66 6f 72 20 | 74 68 69 73 20 28 6d 65 |fix for |this (me|
|00003cf0| 6d 6f 72 79 20 76 61 6c | 75 65 73 20 6f 76 65 72 |mory val|ues over|
|00003d00| 20 61 20 63 65 72 74 61 | 69 6e 0a 58 76 61 6c 75 | a certa|in.Xvalu|
|00003d10| 65 20 77 69 6c 6c 20 62 | 65 20 64 69 73 70 6c 61 |e will b|e displa|
|00003d20| 79 65 64 20 69 6e 20 6d | 65 67 61 62 79 74 65 73 |yed in m|egabytes|
|00003d30| 20 77 69 74 68 20 61 20 | 74 72 61 69 6c 69 6e 67 | with a |trailing|
|00003d40| 20 22 4d 22 29 2e 0a 58 | 0a 58 0a 58 0a 58 09 09 | "M")..X|.X.X.X..|
|00003d50| 57 69 6c 6c 69 61 6d 20 | 4c 65 46 65 62 76 72 65 |William |LeFebvre|
|00003d60| 0a 58 09 09 44 65 70 61 | 72 74 6d 65 6e 74 20 6f |.X..Depa|rtment o|
|00003d70| 66 20 45 6c 65 63 74 72 | 69 63 61 6c 20 45 6e 67 |f Electr|ical Eng|
|00003d80| 69 6e 65 65 72 69 6e 67 | 20 61 6e 64 20 43 6f 6d |ineering| and Com|
|00003d90| 70 75 74 65 72 20 53 63 | 69 65 6e 63 65 0a 58 09 |puter Sc|ience.X.|
|00003da0| 09 4e 6f 72 74 68 77 65 | 73 74 65 72 6e 20 55 6e |.Northwe|stern Un|
|00003db0| 69 76 65 72 73 69 74 79 | 0a 58 09 09 3c 70 68 69 |iversity|.X..<phi|
|00003dc0| 6c 40 65 65 63 73 2e 6e | 77 75 2e 65 64 75 3e 0a |l@eecs.n|wu.edu>.|
|00003dd0| 58 0a 58 0a 58 09 09 55 | 2e 53 2e 20 4d 61 69 6c |X.X.X..U|.S. Mail|
|00003de0| 20 61 64 64 72 65 73 73 | 3a 0a 58 09 09 20 20 20 | address|:.X.. |
|00003df0| 20 57 69 6c 6c 69 61 6d | 20 4c 65 46 65 62 76 72 | William| LeFebvr|
|00003e00| 65 0a 58 09 09 20 20 20 | 20 45 45 43 53 20 44 65 |e.X.. | EECS De|
|00003e10| 70 61 72 74 6d 65 6e 74 | 0a 58 09 09 20 20 20 20 |partment|.X.. |
|00003e20| 32 31 34 35 20 53 68 65 | 72 69 64 61 6e 20 52 6f |2145 She|ridan Ro|
|00003e30| 61 64 0a 58 09 09 20 20 | 20 20 45 76 61 6e 73 74 |ad.X.. | Evanst|
|00003e40| 6f 6e 2c 20 49 4c 20 20 | 36 30 32 30 38 0a 45 4e |on, IL |60208.EN|
|00003e50| 44 5f 4f 46 5f 46 49 4c | 45 0a 69 66 20 74 65 73 |D_OF_FIL|E.if tes|
|00003e60| 74 20 34 35 37 38 20 2d | 6e 65 20 60 77 63 20 2d |t 4578 -|ne `wc -|
|00003e70| 63 20 3c 27 52 45 41 44 | 4d 45 27 60 3b 20 74 68 |c <'READ|ME'`; th|
|00003e80| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|00003e90| 3a 20 5c 22 27 52 45 41 | 44 4d 45 27 5c 22 20 75 |: \"'REA|DME'\" u|
|00003ea0| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00003eb0| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00003ec0| 64 20 6f 66 20 27 52 45 | 41 44 4d 45 27 0a 66 69 |d of 'RE|ADME'.fi|
|00003ed0| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 62 6f 6f |.if test| -f 'boo|
|00003ee0| 6c 65 61 6e 2e 68 27 20 | 2d 61 20 22 24 7b 31 7d |lean.h' |-a "${1}|
|00003ef0| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00003f00| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00003f10| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00003f20| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00003f30| 27 62 6f 6f 6c 65 61 6e | 2e 68 27 5c 22 0a 65 6c |'boolean|.h'\".el|
|00003f40| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|00003f50| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 62 6f 6f 6c |tracting| \"'bool|
|00003f60| 65 61 6e 2e 68 27 5c 22 | 20 5c 28 31 32 35 20 63 |ean.h'\"| \(125 c|
|00003f70| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00003f80| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 62 6f 6f 6c 65 |"s/^X//"| >'boole|
|00003f90| 61 6e 2e 68 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |an.h' <<|'END_OF_|
|00003fa0| 46 49 4c 45 27 0a 58 2f | 2a 20 4d 79 20 66 61 76 |FILE'.X/|* My fav|
|00003fb0| 6f 72 69 74 65 20 6e 61 | 6d 65 73 20 66 6f 72 20 |orite na|mes for |
|00003fc0| 62 6f 6f 6c 65 61 6e 20 | 76 61 6c 75 65 73 20 2a |boolean |values *|
|00003fd0| 2f 0a 58 23 64 65 66 69 | 6e 65 20 20 4e 6f 09 30 |/.X#defi|ne No.0|
|00003fe0| 0a 58 23 64 65 66 69 6e | 65 20 20 59 65 73 09 31 |.X#defin|e Yes.1|
|00003ff0| 0a 58 23 64 65 66 69 6e | 65 20 20 4d 61 79 62 65 |.X#defin|e Maybe|
|00004000| 09 32 09 09 2f 2a 20 74 | 72 69 2d 73 74 61 74 65 |.2../* t|ri-state|
|00004010| 20 62 6f 6f 6c 65 61 6e | 2c 20 61 63 74 75 61 6c | boolean|, actual|
|00004020| 6c 79 20 2a 2f 0a 58 0a | 45 4e 44 5f 4f 46 5f 46 |ly */.X.|END_OF_F|
|00004030| 49 4c 45 0a 69 66 20 74 | 65 73 74 20 31 32 35 20 |ILE.if t|est 125 |
|00004040| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 62 6f 6f |-ne `wc |-c <'boo|
|00004050| 6c 65 61 6e 2e 68 27 60 | 3b 20 74 68 65 6e 0a 20 |lean.h'`|; then. |
|00004060| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00004070| 27 62 6f 6f 6c 65 61 6e | 2e 68 27 5c 22 20 75 6e |'boolean|.h'\" un|
|00004080| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00004090| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|000040a0| 20 6f 66 20 27 62 6f 6f | 6c 65 61 6e 2e 68 27 0a | of 'boo|lean.h'.|
|000040b0| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 64 |fi.if te|st -f 'd|
|000040c0| 69 73 70 6c 61 79 2e 68 | 27 20 2d 61 20 22 24 7b |isplay.h|' -a "${|
|000040d0| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|000040e0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|000040f0| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00004100| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00004110| 5c 22 27 64 69 73 70 6c | 61 79 2e 68 27 5c 22 0a |\"'displ|ay.h'\".|
|00004120| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00004130| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 64 69 |Extracti|ng \"'di|
|00004140| 73 70 6c 61 79 2e 68 27 | 5c 22 20 5c 28 31 33 35 |splay.h'|\" \(135|
|00004150| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00004160| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 64 69 73 |d "s/^X/|/" >'dis|
|00004170| 70 6c 61 79 2e 68 27 20 | 3c 3c 27 45 4e 44 5f 4f |play.h' |<<'END_O|
|00004180| 46 5f 46 49 4c 45 27 0a | 58 2f 2a 20 63 6f 6e 73 |F_FILE'.|X/* cons|
|00004190| 74 61 6e 74 73 20 6e 65 | 65 64 65 64 20 66 6f 72 |tants ne|eded for|
|000041a0| 20 64 69 73 70 6c 61 79 | 2e 63 20 2a 2f 0a 58 0a | display|.c */.X.|
|000041b0| 58 2f 2a 20 22 74 79 70 | 65 22 20 61 72 67 75 6d |X/* "typ|e" argum|
|000041c0| 65 6e 74 20 66 6f 72 20 | 6e 65 77 5f 6d 65 73 73 |ent for |new_mess|
|000041d0| 61 67 65 20 66 75 6e 63 | 74 69 6f 6e 20 2a 2f 0a |age func|tion */.|
|000041e0| 58 0a 58 23 64 65 66 69 | 6e 65 20 20 4d 54 5f 73 |X.X#defi|ne MT_s|
|000041f0| 74 61 6e 64 6f 75 74 20 | 20 31 0a 58 23 64 65 66 |tandout | 1.X#def|
|00004200| 69 6e 65 20 20 4d 54 5f | 64 65 6c 61 79 65 64 20 |ine MT_|delayed |
|00004210| 20 20 32 0a 58 0a 45 4e | 44 5f 4f 46 5f 46 49 4c | 2.X.EN|D_OF_FIL|
|00004220| 45 0a 69 66 20 74 65 73 | 74 20 31 33 35 20 2d 6e |E.if tes|t 135 -n|
|00004230| 65 20 60 77 63 20 2d 63 | 20 3c 27 64 69 73 70 6c |e `wc -c| <'displ|
|00004240| 61 79 2e 68 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |ay.h'`; |then. |
|00004250| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 64 | echo sh|ar: \"'d|
|00004260| 69 73 70 6c 61 79 2e 68 | 27 5c 22 20 75 6e 70 61 |isplay.h|'\" unpa|
|00004270| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00004280| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|00004290| 66 20 27 64 69 73 70 6c | 61 79 2e 68 27 0a 66 69 |f 'displ|ay.h'.fi|
|000042a0| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 67 65 74 |.if test| -f 'get|
|000042b0| 61 6e 73 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |ans' -a |"${1}" !|
|000042c0| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|000042d0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|000042e0| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|000042f0| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 67 65 |sting fi|le \"'ge|
|00004300| 74 61 6e 73 27 5c 22 0a | 65 6c 73 65 0a 65 63 68 |tans'\".|else.ech|
|00004310| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|00004320| 6e 67 20 5c 22 27 67 65 | 74 61 6e 73 27 5c 22 20 |ng \"'ge|tans'\" |
|00004330| 5c 28 31 35 34 34 20 63 | 68 61 72 61 63 74 65 72 |\(1544 c|haracter|
|00004340| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00004350| 20 3e 27 67 65 74 61 6e | 73 27 20 3c 3c 27 45 4e | >'getan|s' <<'EN|
|00004360| 44 5f 4f 46 5f 46 49 4c | 45 27 0a 58 23 21 2f 62 |D_OF_FIL|E'.X#!/b|
|00004370| 69 6e 2f 63 73 68 20 2d | 66 0a 58 73 65 74 20 6e |in/csh -|f.Xset n|
|00004380| 79 20 3d 20 28 6e 6f 20 | 79 65 73 29 0a 58 69 66 |y = (no |yes).Xif|
|00004390| 20 28 24 32 20 3d 3d 20 | 22 79 65 73 6e 6f 22 29 | ($2 == |"yesno")|
|000043a0| 20 74 68 65 6e 0a 58 20 | 20 20 20 40 20 69 20 3d | then.X | @ i =|
|000043b0| 20 24 33 20 2b 20 31 0a | 58 20 20 20 20 73 65 74 | $3 + 1.|X set|
|000043c0| 20 70 6d 70 74 20 3d 20 | 22 24 31 20 5b 24 6e 79 | pmpt = |"$1 [$ny|
|000043d0| 5b 24 69 5d 5d 3a 20 22 | 0a 58 65 6c 73 65 0a 58 |[$i]]: "|.Xelse.X|
|000043e0| 20 20 20 20 73 65 74 20 | 70 6d 70 74 20 3d 20 22 | set |pmpt = "|
|000043f0| 24 31 20 5b 24 33 5d 3a | 20 22 0a 58 65 6e 64 69 |$1 [$3]:| ".Xendi|
|00004400| 66 0a 58 72 70 74 3a 0a | 58 65 63 68 6f 20 2d 6e |f.Xrpt:.|Xecho -n|
|00004410| 20 22 24 70 6d 70 74 22 | 0a 58 73 65 74 20 69 6e | "$pmpt"|.Xset in|
|00004420| 70 75 74 20 3d 20 24 3c | 0a 58 73 77 69 74 63 68 |put = $<|.Xswitch|
|00004430| 20 28 24 32 29 0a 58 20 | 20 20 20 63 61 73 65 20 | ($2).X | case |
|00004440| 6e 75 6d 62 65 72 3a 0a | 58 09 73 65 74 20 74 6d |number:.|X.set tm|
|00004450| 70 20 3d 20 60 65 63 68 | 6f 20 24 69 6e 70 75 74 |p = `ech|o $input|
|00004460| 20 7c 20 74 72 20 2d 64 | 20 30 31 32 33 34 35 36 | | tr -d| 0123456|
|00004470| 37 38 39 2e 60 0a 58 09 | 69 66 20 28 22 78 24 74 |789.`.X.|if ("x$t|
|00004480| 6d 70 22 20 21 3d 20 78 | 29 20 74 68 65 6e 0a 58 |mp" != x|) then.X|
|00004490| 09 20 20 20 20 65 63 68 | 6f 20 22 49 6e 76 61 6c |. ech|o "Inval|
|000044a0| 69 64 20 6e 75 6d 62 65 | 72 2e 20 20 50 6c 65 61 |id numbe|r. Plea|
|000044b0| 73 65 20 74 72 79 20 61 | 67 61 69 6e 2e 22 0a 58 |se try a|gain.".X|
|000044c0| 09 20 20 20 20 67 6f 74 | 6f 20 72 70 74 0a 58 09 |. got|o rpt.X.|
|000044d0| 65 6e 64 69 66 0a 58 09 | 62 72 65 61 6b 73 77 0a |endif.X.|breaksw.|
|000044e0| 58 0a 58 20 20 20 20 63 | 61 73 65 20 69 6e 74 65 |X.X c|ase inte|
|000044f0| 67 65 72 3a 0a 58 09 73 | 65 74 20 74 6d 70 20 3d |ger:.X.s|et tmp =|
|00004500| 20 60 65 63 68 6f 20 24 | 69 6e 70 75 74 20 7c 20 | `echo $|input | |
|00004510| 74 72 20 2d 64 20 30 31 | 32 33 34 35 36 37 38 39 |tr -d 01|23456789|
|00004520| 60 0a 58 09 69 66 20 28 | 22 78 24 74 6d 70 22 20 |`.X.if (|"x$tmp" |
|00004530| 21 3d 20 78 29 20 74 68 | 65 6e 0a 58 09 20 20 20 |!= x) th|en.X. |
|00004540| 20 65 63 68 6f 20 22 49 | 6e 76 61 6c 69 64 20 69 | echo "I|nvalid i|
|00004550| 6e 74 65 67 65 72 2e 20 | 20 50 6c 65 61 73 65 20 |nteger. | Please |
|00004560| 74 72 79 20 61 67 61 69 | 6e 2e 22 0a 58 09 20 20 |try agai|n.".X. |
|00004570| 20 20 67 6f 74 6f 20 72 | 70 74 0a 58 09 65 6e 64 | goto r|pt.X.end|
|00004580| 69 66 0a 58 09 62 72 65 | 61 6b 73 77 0a 58 0a 58 |if.X.bre|aksw.X.X|
|00004590| 20 20 20 20 63 61 73 65 | 20 6e 65 67 69 6e 74 65 | case| neginte|
|000045a0| 67 65 72 3a 0a 58 09 69 | 66 20 28 22 78 24 69 6e |ger:.X.i|f ("x$in|
|000045b0| 70 75 74 22 20 21 3d 20 | 78 2d 31 29 20 74 68 65 |put" != |x-1) the|
|000045c0| 6e 0a 58 09 20 20 20 20 | 73 65 74 20 74 6d 70 20 |n.X. |set tmp |
|000045d0| 3d 20 60 65 63 68 6f 20 | 24 69 6e 70 75 74 20 7c |= `echo |$input ||
|000045e0| 20 74 72 20 2d 64 20 30 | 31 32 33 34 35 36 37 38 | tr -d 0|12345678|
|000045f0| 39 60 0a 58 09 20 20 20 | 20 69 66 20 28 22 78 24 |9`.X. | if ("x$|
|00004600| 74 6d 70 22 20 21 3d 20 | 78 29 20 74 68 65 6e 0a |tmp" != |x) then.|
|00004610| 58 09 20 20 20 20 20 20 | 20 20 65 63 68 6f 20 22 |X. | echo "|
|00004620| 49 6e 76 61 6c 69 64 20 | 69 6e 74 65 67 65 72 2e |Invalid |integer.|
|00004630| 20 20 50 6c 65 61 73 65 | 20 74 72 79 20 61 67 61 | Please| try aga|
|00004640| 69 6e 2e 22 0a 58 09 20 | 20 20 20 20 20 20 20 67 |in.".X. | g|
|00004650| 6f 74 6f 20 72 70 74 0a | 58 09 20 20 20 20 65 6e |oto rpt.|X. en|
|00004660| 64 69 66 0a 58 09 65 6e | 64 69 66 0a 58 09 62 72 |dif.X.en|dif.X.br|
|00004670| 65 61 6b 73 77 0a 58 0a | 58 20 20 20 20 63 61 73 |eaksw.X.|X cas|
|00004680| 65 20 66 69 6c 65 3a 0a | 58 09 69 66 20 28 22 78 |e file:.|X.if ("x|
|00004690| 24 69 6e 70 75 74 22 20 | 3d 3d 20 22 78 22 29 20 |$input" |== "x") |
|000046a0| 74 68 65 6e 0a 58 09 20 | 20 20 20 73 65 74 20 69 |then.X. | set i|
|000046b0| 6e 70 75 74 20 3d 20 24 | 33 0a 58 09 65 6e 64 69 |nput = $|3.X.endi|
|000046c0| 66 0a 58 09 69 66 20 28 | 21 20 2d 65 20 22 24 69 |f.X.if (|! -e "$i|
|000046d0| 6e 70 75 74 22 29 20 74 | 68 65 6e 0a 58 09 20 20 |nput") t|hen.X. |
|000046e0| 20 20 65 63 68 6f 20 54 | 68 65 20 66 69 6c 65 20 | echo T|he file |
|000046f0| 24 69 6e 70 75 74 20 22 | 64 6f 65 73 20 6e 6f 74 |$input "|does not|
|00004700| 20 65 78 69 73 74 2e 20 | 20 50 6c 65 61 73 65 20 | exist. | Please |
|00004710| 74 72 79 20 61 67 61 69 | 6e 2e 22 0a 58 09 20 20 |try agai|n.".X. |
|00004720| 20 20 67 6f 74 6f 20 72 | 70 74 0a 58 09 65 6e 64 | goto r|pt.X.end|
|00004730| 69 66 0a 58 09 62 72 65 | 61 6b 73 77 0a 58 0a 58 |if.X.bre|aksw.X.X|
|00004740| 20 20 20 20 63 61 73 65 | 20 70 61 74 68 3a 0a 58 | case| path:.X|
|00004750| 09 69 66 20 28 22 78 24 | 69 6e 70 75 74 22 20 3d |.if ("x$|input" =|
|00004760| 3d 20 22 78 22 29 20 74 | 68 65 6e 0a 58 09 20 20 |= "x") t|hen.X. |
|00004770| 20 20 73 65 74 20 69 6e | 70 75 74 20 3d 20 22 24 | set in|put = "$|
|00004780| 33 22 0a 58 09 65 6e 64 | 69 66 0a 58 09 69 66 20 |3".X.end|if.X.if |
|00004790| 28 21 20 2d 65 20 22 24 | 69 6e 70 75 74 22 29 20 |(! -e "$|input") |
|000047a0| 74 68 65 6e 0a 58 09 20 | 20 20 20 66 6f 72 65 61 |then.X. | forea|
|000047b0| 63 68 20 65 6c 74 20 28 | 24 70 61 74 68 29 0a 58 |ch elt (|$path).X|
|000047c0| 09 09 69 66 20 28 2d 65 | 20 22 24 65 6c 74 2f 24 |..if (-e| "$elt/$|
|000047d0| 69 6e 70 75 74 22 29 20 | 62 72 65 61 6b 73 77 0a |input") |breaksw.|
|000047e0| 58 09 20 20 20 20 65 6e | 64 0a 58 09 20 20 20 20 |X. en|d.X. |
|000047f0| 65 63 68 6f 20 54 68 65 | 20 63 6f 6d 6d 61 6e 64 |echo The| command|
|00004800| 20 24 69 6e 70 75 74 20 | 22 77 61 73 20 6e 6f 74 | $input |"was not|
|00004810| 20 66 6f 75 6e 64 2e 20 | 20 50 6c 65 61 73 65 20 | found. | Please |
|00004820| 74 72 79 20 61 67 61 69 | 6e 2e 22 0a 58 09 20 20 |try agai|n.".X. |
|00004830| 20 20 67 6f 74 6f 20 72 | 70 74 0a 58 09 65 6e 64 | goto r|pt.X.end|
|00004840| 69 66 0a 58 09 62 72 65 | 61 6b 73 77 0a 58 0a 58 |if.X.bre|aksw.X.X|
|00004850| 20 20 20 20 63 61 73 65 | 20 79 65 73 6e 6f 3a 0a | case| yesno:.|
|00004860| 58 09 69 66 20 28 22 78 | 24 69 6e 70 75 74 22 20 |X.if ("x|$input" |
|00004870| 3d 3d 20 78 79 20 7c 7c | 20 22 78 24 69 6e 70 75 |== xy ||| "x$inpu|
|00004880| 74 22 20 3d 3d 20 78 79 | 65 73 29 20 74 68 65 6e |t" == xy|es) then|
|00004890| 0a 58 09 20 20 20 73 65 | 74 20 69 6e 70 75 74 20 |.X. se|t input |
|000048a0| 3d 20 31 0a 58 09 65 6c | 73 65 20 69 66 20 28 22 |= 1.X.el|se if ("|
|000048b0| 78 24 69 6e 70 75 74 22 | 20 3d 3d 20 78 6e 20 7c |x$input"| == xn ||
|000048c0| 7c 20 22 78 24 69 6e 70 | 75 74 22 20 3d 3d 20 78 || "x$inp|ut" == x|
|000048d0| 6e 6f 29 20 74 68 65 6e | 0a 58 09 20 20 20 73 65 |no) then|.X. se|
|000048e0| 74 20 69 6e 70 75 74 20 | 3d 20 30 0a 58 09 65 6c |t input |= 0.X.el|
|000048f0| 73 65 20 69 66 20 28 22 | 78 24 69 6e 70 75 74 22 |se if ("|x$input"|
|00004900| 20 21 3d 20 78 29 20 74 | 68 65 6e 0a 58 09 20 20 | != x) t|hen.X. |
|00004910| 20 65 63 68 6f 20 27 50 | 6c 65 61 73 65 20 61 6e | echo 'P|lease an|
|00004920| 73 77 65 72 20 22 79 65 | 73 22 20 6f 72 20 22 6e |swer "ye|s" or "n|
|00004930| 6f 22 2e 27 0a 58 09 20 | 20 20 67 6f 74 6f 20 72 |o".'.X. | goto r|
|00004940| 70 74 0a 58 09 65 6e 64 | 69 66 0a 58 09 62 72 65 |pt.X.end|if.X.bre|
|00004950| 61 6b 73 77 0a 58 0a 58 | 20 20 20 20 64 65 66 61 |aksw.X.X| defa|
|00004960| 75 6c 74 3a 0a 58 09 62 | 72 65 61 6b 73 77 0a 58 |ult:.X.b|reaksw.X|
|00004970| 0a 58 65 6e 64 73 77 0a | 58 0a 58 69 66 20 28 22 |.Xendsw.|X.Xif ("|
|00004980| 78 24 69 6e 70 75 74 22 | 20 3d 3d 20 78 29 20 74 |x$input"| == x) t|
|00004990| 68 65 6e 0a 58 20 20 20 | 20 73 65 74 20 69 6e 70 |hen.X | set inp|
|000049a0| 75 74 20 3d 20 22 24 33 | 22 0a 58 65 6e 64 69 66 |ut = "$3|".Xendif|
|000049b0| 0a 58 0a 58 65 63 68 6f | 20 24 69 6e 70 75 74 20 |.X.Xecho| $input |
|000049c0| 3e 20 24 34 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |> $4.END|_OF_FILE|
|000049d0| 0a 69 66 20 74 65 73 74 | 20 31 35 34 34 20 2d 6e |.if test| 1544 -n|
|000049e0| 65 20 60 77 63 20 2d 63 | 20 3c 27 67 65 74 61 6e |e `wc -c| <'getan|
|000049f0| 73 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |s'`; the|n. ec|
|00004a00| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 67 65 74 61 |ho shar:| \"'geta|
|00004a10| 6e 73 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |ns'\" un|packed w|
|00004a20| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00004a30| 66 69 0a 63 68 6d 6f 64 | 20 2b 78 20 27 67 65 74 |fi.chmod| +x 'get|
|00004a40| 61 6e 73 27 0a 23 20 65 | 6e 64 20 6f 66 20 27 67 |ans'.# e|nd of 'g|
|00004a50| 65 74 61 6e 73 27 0a 66 | 69 0a 69 66 20 74 65 73 |etans'.f|i.if tes|
|00004a60| 74 20 2d 66 20 27 67 65 | 74 6f 70 74 2e 63 27 20 |t -f 'ge|topt.c' |
|00004a70| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|00004a80| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|00004a90| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|00004aa0| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|00004ab0| 20 66 69 6c 65 20 5c 22 | 27 67 65 74 6f 70 74 2e | file \"|'getopt.|
|00004ac0| 63 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |c'\".els|e.echo s|
|00004ad0| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00004ae0| 5c 22 27 67 65 74 6f 70 | 74 2e 63 27 5c 22 20 5c |\"'getop|t.c'\" \|
|00004af0| 28 31 32 36 32 20 63 68 | 61 72 61 63 74 65 72 73 |(1262 ch|aracters|
|00004b00| 5c 29 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\).sed "|s/^X//" |
|00004b10| 3e 27 67 65 74 6f 70 74 | 2e 63 27 20 3c 3c 27 45 |>'getopt|.c' <<'E|
|00004b20| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 2f 2a 0a |ND_OF_FI|LE'.X/*.|
|00004b30| 58 20 2a 20 67 65 74 6f | 70 74 20 72 6f 75 74 69 |X * geto|pt routi|
|00004b40| 6e 65 20 63 75 73 74 6f | 6d 69 7a 65 64 20 66 6f |ne custo|mized fo|
|00004b50| 72 20 74 6f 70 2e 0a 58 | 20 2a 2f 0a 58 0a 58 2f |r top..X| */.X.X/|
|00004b60| 2a 4c 49 4e 54 4c 49 42 | 52 41 52 59 2a 2f 0a 58 |*LINTLIB|RARY*/.X|
|00004b70| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 6f 73 2e 68 |.X#inclu|de "os.h|
|00004b80| 22 0a 58 23 69 66 6e 64 | 65 66 20 4e 55 4c 4c 0a |".X#ifnd|ef NULL.|
|00004b90| 58 23 64 65 66 69 6e 65 | 20 4e 55 4c 4c 09 30 0a |X#define| NULL.0.|
|00004ba0| 58 23 65 6e 64 69 66 0a | 58 23 69 66 6e 64 65 66 |X#endif.|X#ifndef|
|00004bb0| 20 45 4f 46 0a 58 23 64 | 65 66 69 6e 65 20 45 4f | EOF.X#d|efine EO|
|00004bc0| 46 09 28 2d 31 29 0a 58 | 23 65 6e 64 69 66 0a 58 |F.(-1).X|#endif.X|
|00004bd0| 23 64 65 66 69 6e 65 20 | 45 52 52 28 73 2c 20 63 |#define |ERR(s, c|
|00004be0| 29 09 69 66 28 6f 70 74 | 65 72 72 29 7b 5c 0a 58 |).if(opt|err){\.X|
|00004bf0| 09 65 78 74 65 72 6e 20 | 69 6e 74 20 77 72 69 74 |.extern |int writ|
|00004c00| 65 28 29 3b 5c 0a 58 09 | 63 68 61 72 20 65 72 72 |e();\.X.|char err|
|00004c10| 62 75 66 5b 32 5d 3b 5c | 0a 58 09 65 72 72 62 75 |buf[2];\|.X.errbu|
|00004c20| 66 5b 30 5d 20 3d 20 63 | 3b 20 65 72 72 62 75 66 |f[0] = c|; errbuf|
|00004c30| 5b 31 5d 20 3d 20 27 5c | 6e 27 3b 5c 0a 58 09 28 |[1] = '\|n';\.X.(|
|00004c40| 76 6f 69 64 29 20 77 72 | 69 74 65 28 32 2c 20 61 |void) wr|ite(2, a|
|00004c50| 72 67 76 5b 30 5d 2c 20 | 73 74 72 6c 65 6e 28 61 |rgv[0], |strlen(a|
|00004c60| 72 67 76 5b 30 5d 29 29 | 3b 5c 0a 58 09 28 76 6f |rgv[0]))|;\.X.(vo|
|00004c70| 69 64 29 20 77 72 69 74 | 65 28 32 2c 20 73 2c 20 |id) writ|e(2, s, |
|00004c80| 73 74 72 6c 65 6e 28 73 | 29 29 3b 5c 0a 58 09 28 |strlen(s|));\.X.(|
|00004c90| 76 6f 69 64 29 20 77 72 | 69 74 65 28 32 2c 20 65 |void) wr|ite(2, e|
|00004ca0| 72 72 62 75 66 2c 20 32 | 29 3b 7d 0a 58 0a 58 0a |rrbuf, 2|);}.X.X.|
|00004cb0| 58 69 6e 74 09 6f 70 74 | 65 72 72 20 3d 20 31 3b |Xint.opt|err = 1;|
|00004cc0| 0a 58 69 6e 74 09 6f 70 | 74 69 6e 64 20 3d 20 31 |.Xint.op|tind = 1|
|00004cd0| 3b 0a 58 69 6e 74 09 6f | 70 74 6f 70 74 3b 0a 58 |;.Xint.o|ptopt;.X|
|00004ce0| 63 68 61 72 09 2a 6f 70 | 74 61 72 67 3b 0a 58 0a |char.*op|targ;.X.|
|00004cf0| 58 69 6e 74 0a 58 67 65 | 74 6f 70 74 28 61 72 67 |Xint.Xge|topt(arg|
|00004d00| 63 2c 20 61 72 67 76 2c | 20 6f 70 74 73 29 0a 58 |c, argv,| opts).X|
|00004d10| 69 6e 74 09 61 72 67 63 | 3b 0a 58 63 68 61 72 09 |int.argc|;.Xchar.|
|00004d20| 2a 2a 61 72 67 76 2c 20 | 2a 6f 70 74 73 3b 0a 58 |**argv, |*opts;.X|
|00004d30| 7b 0a 58 09 73 74 61 74 | 69 63 20 69 6e 74 20 73 |{.X.stat|ic int s|
|00004d40| 70 20 3d 20 31 3b 0a 58 | 09 72 65 67 69 73 74 65 |p = 1;.X|.registe|
|00004d50| 72 20 69 6e 74 20 63 3b | 0a 58 09 72 65 67 69 73 |r int c;|.X.regis|
|00004d60| 74 65 72 20 63 68 61 72 | 20 2a 63 70 3b 0a 58 0a |ter char| *cp;.X.|
|00004d70| 58 09 69 66 28 73 70 20 | 3d 3d 20 31 29 0a 58 09 |X.if(sp |== 1).X.|
|00004d80| 09 69 66 28 6f 70 74 69 | 6e 64 20 3e 3d 20 61 72 |.if(opti|nd >= ar|
|00004d90| 67 63 20 7c 7c 0a 58 09 | 09 20 20 20 61 72 67 76 |gc ||.X.|. argv|
|00004da0| 5b 6f 70 74 69 6e 64 5d | 5b 30 5d 20 21 3d 20 27 |[optind]|[0] != '|
|00004db0| 2d 27 20 7c 7c 20 61 72 | 67 76 5b 6f 70 74 69 6e |-' || ar|gv[optin|
|00004dc0| 64 5d 5b 31 5d 20 3d 3d | 20 27 5c 30 27 29 0a 58 |d][1] ==| '\0').X|
|00004dd0| 09 09 09 72 65 74 75 72 | 6e 28 45 4f 46 29 3b 0a |...retur|n(EOF);.|
|00004de0| 58 09 09 65 6c 73 65 20 | 69 66 28 73 74 72 63 6d |X..else |if(strcm|
|00004df0| 70 28 61 72 67 76 5b 6f | 70 74 69 6e 64 5d 2c 20 |p(argv[o|ptind], |
|00004e00| 22 2d 2d 22 29 20 3d 3d | 20 30 29 20 7b 0a 58 09 |"--") ==| 0) {.X.|
|00004e10| 09 09 6f 70 74 69 6e 64 | 2b 2b 3b 0a 58 09 09 09 |..optind|++;.X...|
|00004e20| 72 65 74 75 72 6e 28 45 | 4f 46 29 3b 0a 58 09 09 |return(E|OF);.X..|
|00004e30| 7d 0a 58 09 6f 70 74 6f | 70 74 20 3d 20 63 20 3d |}.X.opto|pt = c =|
|00004e40| 20 61 72 67 76 5b 6f 70 | 74 69 6e 64 5d 5b 73 70 | argv[op|tind][sp|
|00004e50| 5d 3b 0a 58 09 69 66 28 | 63 20 3d 3d 20 27 3a 27 |];.X.if(|c == ':'|
|00004e60| 20 7c 7c 20 28 63 70 3d | 73 74 72 63 68 72 28 6f | || (cp=|strchr(o|
|00004e70| 70 74 73 2c 20 63 29 29 | 20 3d 3d 20 4e 55 4c 4c |pts, c))| == NULL|
|00004e80| 29 20 7b 0a 58 09 09 45 | 52 52 28 22 3a 20 75 6e |) {.X..E|RR(": un|
|00004e90| 6b 6e 6f 77 6e 20 6f 70 | 74 69 6f 6e 2c 20 2d 22 |known op|tion, -"|
|00004ea0| 2c 20 63 29 3b 0a 58 09 | 09 69 66 28 61 72 67 76 |, c);.X.|.if(argv|
|00004eb0| 5b 6f 70 74 69 6e 64 5d | 5b 2b 2b 73 70 5d 20 3d |[optind]|[++sp] =|
|00004ec0| 3d 20 27 5c 30 27 29 20 | 7b 0a 58 09 09 09 6f 70 |= '\0') |{.X...op|
|00004ed0| 74 69 6e 64 2b 2b 3b 0a | 58 09 09 09 73 70 20 3d |tind++;.|X...sp =|
|00004ee0| 20 31 3b 0a 58 09 09 7d | 0a 58 09 09 72 65 74 75 | 1;.X..}|.X..retu|
|00004ef0| 72 6e 28 27 3f 27 29 3b | 0a 58 09 7d 0a 58 09 69 |rn('?');|.X.}.X.i|
|00004f00| 66 28 2a 2b 2b 63 70 20 | 3d 3d 20 27 3a 27 29 20 |f(*++cp |== ':') |
|00004f10| 7b 0a 58 09 09 69 66 28 | 61 72 67 76 5b 6f 70 74 |{.X..if(|argv[opt|
|00004f20| 69 6e 64 5d 5b 73 70 2b | 31 5d 20 21 3d 20 27 5c |ind][sp+|1] != '\|
|00004f30| 30 27 29 0a 58 09 09 09 | 6f 70 74 61 72 67 20 3d |0').X...|optarg =|
|00004f40| 20 26 61 72 67 76 5b 6f | 70 74 69 6e 64 2b 2b 5d | &argv[o|ptind++]|
|00004f50| 5b 73 70 2b 31 5d 3b 0a | 58 09 09 65 6c 73 65 20 |[sp+1];.|X..else |
|00004f60| 69 66 28 2b 2b 6f 70 74 | 69 6e 64 20 3e 3d 20 61 |if(++opt|ind >= a|
|00004f70| 72 67 63 29 20 7b 0a 58 | 09 09 09 45 52 52 28 22 |rgc) {.X|...ERR("|
|00004f80| 3a 20 61 72 67 75 6d 65 | 6e 74 20 6d 69 73 73 69 |: argume|nt missi|
|00004f90| 6e 67 20 66 6f 72 20 2d | 22 2c 20 63 29 3b 0a 58 |ng for -|", c);.X|
|00004fa0| 09 09 09 73 70 20 3d 20 | 31 3b 0a 58 09 09 09 72 |...sp = |1;.X...r|
|00004fb0| 65 74 75 72 6e 28 27 3f | 27 29 3b 0a 58 09 09 7d |eturn('?|');.X..}|
|00004fc0| 20 65 6c 73 65 0a 58 09 | 09 09 6f 70 74 61 72 67 | else.X.|..optarg|
|00004fd0| 20 3d 20 61 72 67 76 5b | 6f 70 74 69 6e 64 2b 2b | = argv[|optind++|
|00004fe0| 5d 3b 0a 58 09 09 73 70 | 20 3d 20 31 3b 0a 58 09 |];.X..sp| = 1;.X.|
|00004ff0| 7d 20 65 6c 73 65 20 7b | 0a 58 09 09 69 66 28 61 |} else {|.X..if(a|
|00005000| 72 67 76 5b 6f 70 74 69 | 6e 64 5d 5b 2b 2b 73 70 |rgv[opti|nd][++sp|
|00005010| 5d 20 3d 3d 20 27 5c 30 | 27 29 20 7b 0a 58 09 09 |] == '\0|') {.X..|
|00005020| 09 73 70 20 3d 20 31 3b | 0a 58 09 09 09 6f 70 74 |.sp = 1;|.X...opt|
|00005030| 69 6e 64 2b 2b 3b 0a 58 | 09 09 7d 0a 58 09 09 6f |ind++;.X|..}.X..o|
|00005040| 70 74 61 72 67 20 3d 20 | 4e 55 4c 4c 3b 0a 58 09 |ptarg = |NULL;.X.|
|00005050| 7d 0a 58 09 72 65 74 75 | 72 6e 28 63 29 3b 0a 58 |}.X.retu|rn(c);.X|
|00005060| 7d 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 69 66 |}.END_OF|_FILE.if|
|00005070| 20 74 65 73 74 20 31 32 | 36 32 20 2d 6e 65 20 60 | test 12|62 -ne `|
|00005080| 77 63 20 2d 63 20 3c 27 | 67 65 74 6f 70 74 2e 63 |wc -c <'|getopt.c|
|00005090| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|000050a0| 6f 20 73 68 61 72 3a 20 | 5c 22 27 67 65 74 6f 70 |o shar: |\"'getop|
|000050b0| 74 2e 63 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |t.c'\" u|npacked |
|000050c0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|000050d0| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 67 65 |.fi.# en|d of 'ge|
|000050e0| 74 6f 70 74 2e 63 27 0a | 66 69 0a 69 66 20 74 65 |topt.c'.|fi.if te|
|000050f0| 73 74 20 2d 66 20 27 6c | 61 79 6f 75 74 2e 68 27 |st -f 'l|ayout.h'|
|00005100| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00005110| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00005120| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00005130| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00005140| 67 20 66 69 6c 65 20 5c | 22 27 6c 61 79 6f 75 74 |g file \|"'layout|
|00005150| 2e 68 27 5c 22 0a 65 6c | 73 65 0a 65 63 68 6f 20 |.h'\".el|se.echo |
|00005160| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00005170| 20 5c 22 27 6c 61 79 6f | 75 74 2e 68 27 5c 22 20 | \"'layo|ut.h'\" |
|00005180| 5c 28 36 32 31 20 63 68 | 61 72 61 63 74 65 72 73 |\(621 ch|aracters|
|00005190| 5c 29 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\).sed "|s/^X//" |
|000051a0| 3e 27 6c 61 79 6f 75 74 | 2e 68 27 20 3c 3c 27 45 |>'layout|.h' <<'E|
|000051b0| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 2f 2a 0a |ND_OF_FI|LE'.X/*.|
|000051c0| 58 20 2a 20 20 54 6f 70 | 20 2d 20 61 20 74 6f 70 |X * Top| - a top|
|000051d0| 20 75 73 65 72 73 20 64 | 69 73 70 6c 61 79 20 66 | users d|isplay f|
|000051e0| 6f 72 20 42 65 72 6b 65 | 6c 65 79 20 55 6e 69 78 |or Berke|ley Unix|
|000051f0| 0a 58 20 2a 0a 58 20 2a | 20 20 54 68 69 73 20 66 |.X *.X *| This f|
|00005200| 69 6c 65 20 64 65 66 69 | 6e 65 73 20 74 68 65 20 |ile defi|nes the |
|00005210| 6c 6f 63 61 74 69 6f 6e | 73 20 6f 6e 20 74 6e 65 |location|s on tne|
|00005220| 20 73 63 72 65 65 6e 20 | 66 6f 72 20 76 61 72 69 | screen |for vari|
|00005230| 6f 75 73 20 70 61 72 74 | 73 20 6f 66 20 74 68 65 |ous part|s of the|
|00005240| 0a 58 20 2a 20 20 64 69 | 73 70 6c 61 79 2e 20 20 |.X * di|splay. |
|00005250| 54 68 65 73 65 20 64 65 | 66 69 6e 69 74 69 6f 6e |These de|finition|
|00005260| 73 20 61 72 65 20 75 73 | 65 64 20 62 79 20 74 68 |s are us|ed by th|
|00005270| 65 20 72 6f 75 74 69 6e | 65 73 20 69 6e 20 22 64 |e routin|es in "d|
|00005280| 69 73 70 6c 61 79 2e 63 | 22 20 66 6f 72 0a 58 20 |isplay.c|" for.X |
|00005290| 2a 20 20 63 75 72 73 6f | 72 20 61 64 64 72 65 73 |* curso|r addres|
|000052a0| 73 69 6e 67 2e 0a 58 20 | 2a 2f 0a 58 0a 58 23 64 |sing..X |*/.X.X#d|
|000052b0| 65 66 69 6e 65 20 20 78 | 5f 6c 61 73 74 70 69 64 |efine x|_lastpid|
|000052c0| 09 31 30 0a 58 23 64 65 | 66 69 6e 65 20 20 79 5f |.10.X#de|fine y_|
|000052d0| 6c 61 73 74 70 69 64 09 | 30 0a 58 23 64 65 66 69 |lastpid.|0.X#defi|
|000052e0| 6e 65 20 20 78 5f 6c 6f | 61 64 61 76 65 09 33 33 |ne x_lo|adave.33|
|000052f0| 0a 58 23 64 65 66 69 6e | 65 20 20 78 5f 6c 6f 61 |.X#defin|e x_loa|
|00005300| 64 61 76 65 5f 6e 6f 6d | 70 69 64 09 31 36 0a 58 |dave_nom|pid.16.X|
|00005310| 23 64 65 66 69 6e 65 20 | 20 79 5f 6c 6f 61 64 61 |#define | y_loada|
|00005320| 76 65 09 30 0a 58 23 64 | 65 66 69 6e 65 20 20 78 |ve.0.X#d|efine x|
|00005330| 5f 70 72 6f 63 73 74 61 | 74 65 09 30 0a 58 23 64 |_procsta|te.0.X#d|
|00005340| 65 66 69 6e 65 20 20 79 | 5f 70 72 6f 63 73 74 61 |efine y|_procsta|
|00005350| 74 65 09 31 0a 58 23 64 | 65 66 69 6e 65 20 20 78 |te.1.X#d|efine x|
|00005360| 5f 62 72 6b 64 6e 09 31 | 35 0a 58 23 64 65 66 69 |_brkdn.1|5.X#defi|
|00005370| 6e 65 20 20 79 5f 62 72 | 6b 64 6e 09 31 0a 58 23 |ne y_br|kdn.1.X#|
|00005380| 64 65 66 69 6e 65 20 20 | 78 5f 6d 65 6d 09 09 38 |define |x_mem..8|
|00005390| 0a 58 23 64 65 66 69 6e | 65 20 20 79 5f 6d 65 6d |.X#defin|e y_mem|
|000053a0| 09 09 33 0a 58 23 64 65 | 66 69 6e 65 20 20 79 5f |..3.X#de|fine y_|
|000053b0| 6d 65 73 73 61 67 65 09 | 34 0a 58 23 64 65 66 69 |message.|4.X#defi|
|000053c0| 6e 65 20 20 78 5f 68 65 | 61 64 65 72 09 30 0a 58 |ne x_he|ader.0.X|
|000053d0| 23 64 65 66 69 6e 65 20 | 20 79 5f 68 65 61 64 65 |#define | y_heade|
|000053e0| 72 09 35 0a 58 23 64 65 | 66 69 6e 65 20 20 78 5f |r.5.X#de|fine x_|
|000053f0| 69 64 6c 65 63 75 72 73 | 6f 72 09 30 0a 58 23 64 |idlecurs|or.0.X#d|
|00005400| 65 66 69 6e 65 20 20 79 | 5f 69 64 6c 65 63 75 72 |efine y|_idlecur|
|00005410| 73 6f 72 09 34 0a 58 23 | 64 65 66 69 6e 65 20 20 |sor.4.X#|define |
|00005420| 79 5f 70 72 6f 63 73 09 | 36 0a 58 0a 58 23 64 65 |y_procs.|6.X.X#de|
|00005430| 66 69 6e 65 20 20 79 5f | 63 70 75 73 74 61 74 65 |fine y_|cpustate|
|00005440| 73 09 32 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |s.2.END_|OF_FILE.|
|00005450| 69 66 20 74 65 73 74 20 | 36 32 31 20 2d 6e 65 20 |if test |621 -ne |
|00005460| 60 77 63 20 2d 63 20 3c | 27 6c 61 79 6f 75 74 2e |`wc -c <|'layout.|
|00005470| 68 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |h'`; the|n. ec|
|00005480| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 6c 61 79 6f |ho shar:| \"'layo|
|00005490| 75 74 2e 68 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |ut.h'\" |unpacked|
|000054a0| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|000054b0| 21 0a 66 69 0a 23 20 65 | 6e 64 20 6f 66 20 27 6c |!.fi.# e|nd of 'l|
|000054c0| 61 79 6f 75 74 2e 68 27 | 0a 66 69 0a 69 66 20 74 |ayout.h'|.fi.if t|
|000054d0| 65 73 74 20 2d 66 20 27 | 6c 6f 61 64 61 76 67 2e |est -f '|loadavg.|
|000054e0| 68 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |h' -a "$|{1}" != |
|000054f0| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00005500| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00005510| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00005520| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 6c 6f 61 64 |ing file| \"'load|
|00005530| 61 76 67 2e 68 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |avg.h'\"|.else.ec|
|00005540| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00005550| 69 6e 67 20 5c 22 27 6c | 6f 61 64 61 76 67 2e 68 |ing \"'l|oadavg.h|
|00005560| 27 5c 22 20 5c 28 31 34 | 36 36 20 63 68 61 72 61 |'\" \(14|66 chara|
|00005570| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00005580| 58 2f 2f 22 20 3e 27 6c | 6f 61 64 61 76 67 2e 68 |X//" >'l|oadavg.h|
|00005590| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|000055a0| 27 0a 58 2f 2a 0a 58 20 | 2a 20 20 54 6f 70 20 2d |'.X/*.X |* Top -|
|000055b0| 20 61 20 74 6f 70 20 75 | 73 65 72 73 20 64 69 73 | a top u|sers dis|
|000055c0| 70 6c 61 79 20 66 6f 72 | 20 42 65 72 6b 65 6c 65 |play for| Berkele|
|000055d0| 79 20 55 6e 69 78 0a 58 | 20 2a 0a 58 20 2a 20 20 |y Unix.X| *.X * |
|000055e0| 44 65 66 69 6e 65 73 20 | 72 65 71 75 69 72 65 64 |Defines |required|
|000055f0| 20 74 6f 20 61 63 63 65 | 73 73 20 6c 6f 61 64 20 | to acce|ss load |
|00005600| 61 76 65 72 61 67 65 20 | 66 69 67 75 72 65 73 2e |average |figures.|
|00005610| 0a 58 20 2a 0a 58 20 2a | 20 20 54 68 69 73 20 69 |.X *.X *| This i|
|00005620| 6e 63 6c 75 64 65 20 66 | 69 6c 65 20 73 65 74 73 |nclude f|ile sets|
|00005630| 20 75 70 20 65 76 65 72 | 79 74 68 69 6e 67 20 77 | up ever|ything w|
|00005640| 65 20 6e 65 65 64 20 74 | 6f 20 61 63 63 65 73 73 |e need t|o access|
|00005650| 20 74 68 65 20 6c 6f 61 | 64 20 61 76 65 72 61 67 | the loa|d averag|
|00005660| 65 0a 58 20 2a 20 20 76 | 61 6c 75 65 73 20 69 6e |e.X * v|alues in|
|00005670| 20 74 68 65 20 6b 65 72 | 6e 65 6c 20 69 6e 20 61 | the ker|nel in a|
|00005680| 20 6d 61 63 68 69 6e 65 | 20 69 6e 64 65 70 65 6e | machine| indepen|
|00005690| 64 65 6e 74 20 77 61 79 | 2e 20 20 46 69 72 73 74 |dent way|. First|
|000056a0| 2c 20 69 74 20 73 65 74 | 73 20 74 68 65 0a 58 20 |, it set|s the.X |
|000056b0| 2a 20 20 74 79 70 65 64 | 65 66 20 22 6c 6f 61 64 |* typed|ef "load|
|000056c0| 5f 61 76 67 22 20 74 6f | 20 62 65 20 65 69 74 68 |_avg" to| be eith|
|000056d0| 65 72 20 64 6f 75 62 6c | 65 20 6f 72 20 6c 6f 6e |er doubl|e or lon|
|000056e0| 67 20 28 64 65 70 65 6e | 64 69 6e 67 20 6f 6e 20 |g (depen|ding on |
|000056f0| 77 68 61 74 20 69 73 0a | 58 20 2a 20 20 6e 65 65 |what is.|X * nee|
|00005700| 64 65 64 29 2c 20 74 68 | 65 6e 20 69 74 20 64 65 |ded), th|en it de|
|00005710| 66 69 6e 65 73 20 74 68 | 65 73 65 20 6d 61 63 72 |fines th|ese macr|
|00005720| 6f 73 20 61 70 70 72 6f | 70 72 69 61 74 65 6c 79 |os appro|priately|
|00005730| 3a 0a 58 20 2a 0a 58 20 | 2a 09 6c 6f 61 64 64 6f |:.X *.X |*.loaddo|
|00005740| 75 62 6c 65 28 6c 61 29 | 20 2d 20 63 6f 6e 76 65 |uble(la)| - conve|
|00005750| 72 74 20 6c 6f 61 64 5f | 61 76 67 20 74 6f 20 64 |rt load_|avg to d|
|00005760| 6f 75 62 6c 65 2e 0a 58 | 20 2a 09 69 6e 74 6c 6f |ouble..X| *.intlo|
|00005770| 61 64 28 69 29 20 20 20 | 20 20 2d 20 63 6f 6e 76 |ad(i) | - conv|
|00005780| 65 72 74 20 69 6e 74 65 | 67 65 72 20 74 6f 20 6c |ert inte|ger to l|
|00005790| 6f 61 64 5f 61 76 67 2e | 0a 58 20 2a 2f 0a 58 0a |oad_avg.|.X */.X.|
|000057a0| 58 2f 2a 0a 58 20 2a 20 | 57 65 20 61 73 73 75 6d |X/*.X * |We assum|
|000057b0| 65 20 74 68 61 74 20 69 | 66 20 46 53 43 41 4c 45 |e that i|f FSCALE|
|000057c0| 20 69 73 20 64 65 66 69 | 6e 65 64 2c 20 74 68 65 | is defi|ned, the|
|000057d0| 6e 20 61 76 65 6e 72 75 | 6e 20 61 6e 64 20 63 63 |n avenru|n and cc|
|000057e0| 70 75 20 61 72 65 20 74 | 79 70 65 20 6c 6f 6e 67 |pu are t|ype long|
|000057f0| 2e 0a 58 20 2a 20 49 66 | 20 79 6f 75 72 20 6d 61 |..X * If| your ma|
|00005800| 63 68 69 6e 65 20 69 73 | 20 61 6e 20 65 78 63 65 |chine is| an exce|
|00005810| 70 74 69 6f 6e 20 28 6d | 69 70 73 2c 20 70 65 72 |ption (m|ips, per|
|00005820| 68 61 70 73 3f 29 20 74 | 68 65 6e 20 6d 61 6b 65 |haps?) t|hen make|
|00005830| 20 61 64 6a 75 73 74 6d | 65 6e 74 73 0a 58 20 2a | adjustm|ents.X *|
|00005840| 20 68 65 72 65 2e 0a 58 | 20 2a 0a 58 20 2a 20 44 | here..X| *.X * D|
|00005850| 65 66 69 6e 65 64 20 74 | 79 70 65 73 3a 20 20 6c |efined t|ypes: l|
|00005860| 6f 61 64 5f 61 76 67 20 | 66 6f 72 20 6c 6f 61 64 |oad_avg |for load|
|00005870| 20 61 76 65 72 61 67 65 | 73 2c 20 70 63 74 63 70 | average|s, pctcp|
|00005880| 75 20 66 6f 72 20 63 70 | 75 20 70 65 72 63 65 6e |u for cp|u percen|
|00005890| 74 61 67 65 73 2e 0a 58 | 20 2a 2f 0a 58 23 69 66 |tages..X| */.X#if|
|000058a0| 64 65 66 20 6d 69 70 73 | 0a 58 23 20 69 6e 63 6c |def mips|.X# incl|
|000058b0| 75 64 65 20 3c 73 79 73 | 2f 66 69 78 70 6f 69 6e |ude <sys|/fixpoin|
|000058c0| 74 2e 68 3e 0a 58 23 20 | 69 66 20 64 65 66 69 6e |t.h>.X# |if defin|
|000058d0| 65 64 28 46 42 49 54 53 | 29 20 26 26 20 21 64 65 |ed(FBITS|) && !de|
|000058e0| 66 69 6e 65 64 28 46 53 | 43 41 4c 45 29 0a 58 23 |fined(FS|CALE).X#|
|000058f0| 20 20 64 65 66 69 6e 65 | 20 46 53 43 41 4c 45 20 | define| FSCALE |
|00005900| 28 31 20 3c 3c 20 46 42 | 49 54 53 29 09 2f 2a 20 |(1 << FB|ITS)./* |
|00005910| 6d 69 70 73 20 2a 2f 0a | 58 23 20 65 6e 64 69 66 |mips */.|X# endif|
|00005920| 0a 58 23 65 6e 64 69 66 | 0a 58 0a 58 23 69 66 64 |.X#endif|.X.X#ifd|
|00005930| 65 66 20 46 53 43 41 4c | 45 0a 58 23 20 64 65 66 |ef FSCAL|E.X# def|
|00005940| 69 6e 65 20 46 49 58 45 | 44 5f 4c 4f 41 44 41 56 |ine FIXE|D_LOADAV|
|00005950| 47 20 46 53 43 41 4c 45 | 0a 58 23 20 64 65 66 69 |G FSCALE|.X# defi|
|00005960| 6e 65 20 46 49 58 45 44 | 5f 50 43 54 43 50 55 20 |ne FIXED|_PCTCPU |
|00005970| 46 53 43 41 4c 45 0a 58 | 23 65 6e 64 69 66 0a 58 |FSCALE.X|#endif.X|
|00005980| 0a 58 23 69 66 64 65 66 | 20 69 62 6d 30 33 32 0a |.X#ifdef| ibm032.|
|00005990| 58 23 20 75 6e 64 65 66 | 20 46 49 58 45 44 5f 4c |X# undef| FIXED_L|
|000059a0| 4f 41 44 41 56 47 0a 58 | 23 20 75 6e 64 65 66 20 |OADAVG.X|# undef |
|000059b0| 46 49 58 45 44 5f 50 43 | 54 43 50 55 0a 58 23 20 |FIXED_PC|TCPU.X# |
|000059c0| 64 65 66 69 6e 65 20 46 | 49 58 45 44 5f 50 43 54 |define F|IXED_PCT|
|000059d0| 43 50 55 20 50 43 54 5f | 53 43 41 4c 45 0a 58 23 |CPU PCT_|SCALE.X#|
|000059e0| 65 6e 64 69 66 0a 58 0a | 58 0a 58 23 69 66 64 65 |endif.X.|X.X#ifde|
|000059f0| 66 20 46 49 58 45 44 5f | 50 43 54 43 50 55 0a 58 |f FIXED_|PCTCPU.X|
|00005a00| 20 20 74 79 70 65 64 65 | 66 20 6c 6f 6e 67 20 70 | typede|f long p|
|00005a10| 63 74 63 70 75 3b 0a 58 | 23 20 64 65 66 69 6e 65 |ctcpu;.X|# define|
|00005a20| 20 70 63 74 64 6f 75 62 | 6c 65 28 70 29 20 28 28 | pctdoub|le(p) ((|
|00005a30| 64 6f 75 62 6c 65 29 28 | 70 29 20 2f 20 46 49 58 |double)(|p) / FIX|
|00005a40| 45 44 5f 50 43 54 43 50 | 55 29 0a 58 23 65 6c 73 |ED_PCTCP|U).X#els|
|00005a50| 65 0a 58 74 79 70 65 64 | 65 66 20 64 6f 75 62 6c |e.Xtyped|ef doubl|
|00005a60| 65 20 70 63 74 63 70 75 | 3b 0a 58 23 20 64 65 66 |e pctcpu|;.X# def|
|00005a70| 69 6e 65 20 70 63 74 64 | 6f 75 62 6c 65 28 70 29 |ine pctd|ouble(p)|
|00005a80| 20 28 70 29 0a 58 23 65 | 6e 64 69 66 0a 58 0a 58 | (p).X#e|ndif.X.X|
|00005a90| 23 69 66 64 65 66 20 46 | 49 58 45 44 5f 4c 4f 41 |#ifdef F|IXED_LOA|
|00005aa0| 44 41 56 47 0a 58 20 20 | 74 79 70 65 64 65 66 20 |DAVG.X |typedef |
|00005ab0| 6c 6f 6e 67 20 6c 6f 61 | 64 5f 61 76 67 3b 0a 58 |long loa|d_avg;.X|
|00005ac0| 23 20 64 65 66 69 6e 65 | 20 6c 6f 61 64 64 6f 75 |# define| loaddou|
|00005ad0| 62 6c 65 28 6c 61 29 20 | 28 28 64 6f 75 62 6c 65 |ble(la) |((double|
|00005ae0| 29 28 6c 61 29 20 2f 20 | 46 49 58 45 44 5f 4c 4f |)(la) / |FIXED_LO|
|00005af0| 41 44 41 56 47 29 0a 58 | 23 20 64 65 66 69 6e 65 |ADAVG).X|# define|
|00005b00| 20 69 6e 74 6c 6f 61 64 | 28 69 29 20 28 28 69 6e | intload|(i) ((in|
|00005b10| 74 29 28 28 69 29 20 2a | 20 46 49 58 45 44 5f 4c |t)((i) *| FIXED_L|
|00005b20| 4f 41 44 41 56 47 29 29 | 0a 58 23 65 6c 73 65 0a |OADAVG))|.X#else.|
|00005b30| 58 20 20 74 79 70 65 64 | 65 66 20 64 6f 75 62 6c |X typed|ef doubl|
|00005b40| 65 20 6c 6f 61 64 5f 61 | 76 67 3b 0a 58 23 20 64 |e load_a|vg;.X# d|
|00005b50| 65 66 69 6e 65 20 6c 6f | 61 64 64 6f 75 62 6c 65 |efine lo|addouble|
|00005b60| 28 6c 61 29 20 28 6c 61 | 29 0a 58 23 20 64 65 66 |(la) (la|).X# def|
|00005b70| 69 6e 65 20 69 6e 74 6c | 6f 61 64 28 69 29 20 28 |ine intl|oad(i) (|
|00005b80| 28 64 6f 75 62 6c 65 29 | 28 69 29 29 0a 58 23 65 |(double)|(i)).X#e|
|00005b90| 6e 64 69 66 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |ndif.END|_OF_FILE|
|00005ba0| 0a 69 66 20 74 65 73 74 | 20 31 34 36 36 20 2d 6e |.if test| 1466 -n|
|00005bb0| 65 20 60 77 63 20 2d 63 | 20 3c 27 6c 6f 61 64 61 |e `wc -c| <'loada|
|00005bc0| 76 67 2e 68 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |vg.h'`; |then. |
|00005bd0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 6c | echo sh|ar: \"'l|
|00005be0| 6f 61 64 61 76 67 2e 68 | 27 5c 22 20 75 6e 70 61 |oadavg.h|'\" unpa|
|00005bf0| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00005c00| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|00005c10| 66 20 27 6c 6f 61 64 61 | 76 67 2e 68 27 0a 66 69 |f 'loada|vg.h'.fi|
|00005c20| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 6d 2d 74 |.if test| -f 'm-t|
|00005c30| 65 6d 70 6c 61 74 65 27 | 20 2d 61 20 22 24 7b 31 |emplate'| -a "${1|
|00005c40| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00005c50| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00005c60| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00005c70| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00005c80| 22 27 6d 2d 74 65 6d 70 | 6c 61 74 65 27 5c 22 0a |"'m-temp|late'\".|
|00005c90| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00005ca0| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 6d 2d |Extracti|ng \"'m-|
|00005cb0| 74 65 6d 70 6c 61 74 65 | 27 5c 22 20 5c 28 35 32 |template|'\" \(52|
|00005cc0| 37 36 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |76 chara|cters\).|
|00005cd0| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 6d |sed "s/^|X//" >'m|
|00005ce0| 2d 74 65 6d 70 6c 61 74 | 65 27 20 3c 3c 27 45 4e |-templat|e' <<'EN|
|00005cf0| 44 5f 4f 46 5f 46 49 4c | 45 27 0a 58 2f 2a 0a 58 |D_OF_FIL|E'.X/*.X|
|00005d00| 20 2a 20 74 6f 70 20 2d | 20 61 20 74 6f 70 20 75 | * top -| a top u|
|00005d10| 73 65 72 73 20 64 69 73 | 70 6c 61 79 20 66 6f 72 |sers dis|play for|
|00005d20| 20 55 6e 69 78 0a 58 20 | 2a 0a 58 20 2a 20 54 48 | Unix.X |*.X * TH|
|00005d30| 49 53 20 49 53 20 41 20 | 54 45 4d 50 4c 41 54 45 |IS IS A |TEMPLATE|
|00005d40| 20 46 49 4c 45 20 46 4f | 52 20 41 20 4d 41 43 48 | FILE FO|R A MACH|
|00005d50| 49 4e 45 20 44 45 50 45 | 4e 44 45 4e 54 20 28 6d |INE DEPE|NDENT (m|
|00005d60| 5f 2e 2e 2e 63 29 20 46 | 49 4c 45 0a 58 20 2a 0a |_...c) F|ILE.X *.|
|00005d70| 58 20 2a 20 53 59 4e 4f | 50 53 49 53 3a 20 20 6f |X * SYNO|PSIS: o|
|00005d80| 6e 65 20 6c 69 6e 65 20 | 64 65 73 63 72 69 70 74 |ne line |descript|
|00005d90| 69 6f 6e 20 6f 66 20 6d | 61 63 68 69 6e 65 20 74 |ion of m|achine t|
|00005da0| 68 69 73 20 6d 6f 64 75 | 6c 65 20 77 6f 72 6b 73 |his modu|le works|
|00005db0| 20 77 69 74 68 0a 58 20 | 2a 0a 58 20 2a 20 44 45 | with.X |*.X * DE|
|00005dc0| 53 43 52 49 50 54 49 4f | 4e 3a 0a 58 20 2a 20 44 |SCRIPTIO|N:.X * D|
|00005dd0| 65 74 61 69 6c 65 64 20 | 64 65 73 63 72 69 70 74 |etailed |descript|
|00005de0| 69 6f 6e 20 6f 66 20 74 | 68 69 73 20 6d 61 63 68 |ion of t|his mach|
|00005df0| 69 6e 65 20 64 65 70 65 | 6e 64 65 6e 74 20 6d 6f |ine depe|ndent mo|
|00005e00| 64 75 6c 65 2e 0a 58 20 | 2a 20 49 74 20 63 61 6e |dule..X |* It can|
|00005e10| 20 62 65 20 6d 75 6c 74 | 69 70 6c 65 20 6c 69 6e | be mult|iple lin|
|00005e20| 65 73 2c 20 62 75 74 20 | 61 20 62 6c 61 6e 6b 20 |es, but |a blank |
|00005e30| 63 6f 6d 6d 65 6e 74 20 | 6c 69 6e 65 20 28 6f 6e |comment |line (on|
|00005e40| 65 20 77 69 74 68 20 6f | 6e 6c 79 20 61 6e 0a 58 |e with o|nly an.X|
|00005e50| 20 2a 20 61 73 74 65 72 | 69 73 6b 29 20 69 73 20 | * aster|isk) is |
|00005e60| 63 6f 6e 73 69 64 65 72 | 65 64 20 74 6f 20 65 6e |consider|ed to en|
|00005e70| 64 20 69 74 2e 20 20 50 | 6c 61 63 65 20 68 65 72 |d it. P|lace her|
|00005e80| 65 20 61 20 63 6f 6d 70 | 6c 65 74 65 20 6c 69 73 |e a comp|lete lis|
|00005e90| 74 20 6f 66 20 0a 58 20 | 2a 20 74 68 65 20 6d 61 |t of .X |* the ma|
|00005ea0| 63 68 69 6e 65 73 20 61 | 6e 64 20 4f 53 20 76 65 |chines a|nd OS ve|
|00005eb0| 72 73 69 6f 6e 73 20 74 | 68 61 74 20 74 68 69 73 |rsions t|hat this|
|00005ec0| 20 6d 6f 64 75 6c 65 20 | 77 6f 72 6b 73 20 6f 6e | module |works on|
|00005ed0| 2e 0a 58 20 2a 0a 58 20 | 2a 20 4c 49 42 53 3a 20 |..X *.X |* LIBS: |
|00005ee0| 20 6c 69 73 74 20 6f 66 | 20 73 70 65 63 69 61 6c | list of| special|
|00005ef0| 20 6c 69 62 72 61 72 69 | 65 73 20 74 6f 20 69 6e | librari|es to in|
|00005f00| 63 6c 75 64 65 20 61 74 | 20 6c 69 6e 6b 20 73 74 |clude at| link st|
|00005f10| 65 70 20 28 52 45 4d 4f | 56 45 20 54 48 49 53 20 |ep (REMO|VE THIS |
|00005f20| 4c 49 4e 45 20 49 46 20 | 4e 4f 54 20 4e 45 45 44 |LINE IF |NOT NEED|
|00005f30| 45 44 29 0a 58 20 2a 0a | 58 20 2a 20 41 55 54 48 |ED).X *.|X * AUTH|
|00005f40| 4f 52 3a 20 20 79 6f 75 | 72 20 6e 61 6d 65 20 61 |OR: you|r name a|
|00005f50| 6e 64 20 3c 79 6f 75 72 | 40 69 6e 74 65 72 6e 65 |nd <your|@interne|
|00005f60| 74 2e 61 64 64 72 65 73 | 73 3e 0a 58 20 2a 2f 0a |t.addres|s>.X */.|
|00005f70| 58 0a 58 23 69 6e 63 6c | 75 64 65 20 22 74 6f 70 |X.X#incl|ude "top|
|00005f80| 2e 68 22 0a 58 23 69 6e | 63 6c 75 64 65 20 22 6d |.h".X#in|clude "m|
|00005f90| 61 63 68 69 6e 65 2e 68 | 22 0a 58 0a 58 0a 58 2f |achine.h|".X.X.X/|
|00005fa0| 2a 0a 58 20 2a 20 20 54 | 68 65 73 65 20 64 65 66 |*.X * T|hese def|
|00005fb0| 69 6e 69 74 69 6f 6e 73 | 20 63 6f 6e 74 72 6f 6c |initions| control|
|00005fc0| 20 74 68 65 20 66 6f 72 | 6d 61 74 20 6f 66 20 74 | the for|mat of t|
|00005fd0| 68 65 20 70 65 72 2d 70 | 72 6f 63 65 73 73 20 61 |he per-p|rocess a|
|00005fe0| 72 65 61 0a 58 20 2a 2f | 0a 58 0a 58 73 74 61 74 |rea.X */|.X.Xstat|
|00005ff0| 69 63 20 63 68 61 72 20 | 68 65 61 64 65 72 5b 5d |ic char |header[]|
|00006000| 20 3d 0a 58 20 20 22 20 | 20 50 49 44 20 58 20 20 | =.X " | PID X |
|00006010| 20 20 20 20 20 20 50 52 | 49 20 4e 49 43 45 20 20 | PR|I NICE |
|00006020| 20 53 49 5a 45 20 20 20 | 52 45 53 20 53 54 41 54 | SIZE |RES STAT|
|00006030| 45 20 20 20 54 49 4d 45 | 20 20 20 57 43 50 55 20 |E TIME| WCPU |
|00006040| 20 20 20 43 50 55 20 43 | 4f 4d 4d 41 4e 44 22 3b | CPU C|OMMAND";|
|00006050| 0a 58 2f 2a 20 30 31 32 | 33 34 35 36 20 20 20 2d |.X/* 012|3456 -|
|00006060| 2d 20 66 69 65 6c 64 20 | 74 6f 20 66 69 6c 6c 20 |- field |to fill |
|00006070| 69 6e 20 73 74 61 72 74 | 73 20 61 74 20 68 65 61 |in start|s at hea|
|00006080| 64 65 72 2b 36 20 2a 2f | 0a 58 23 64 65 66 69 6e |der+6 */|.X#defin|
|00006090| 65 20 55 4e 41 4d 45 5f | 53 54 41 52 54 20 36 0a |e UNAME_|START 6.|
|000060a0| 58 0a 58 23 64 65 66 69 | 6e 65 20 50 72 6f 63 5f |X.X#defi|ne Proc_|
|000060b0| 66 6f 72 6d 61 74 20 5c | 0a 58 09 22 25 35 64 20 |format \|.X."%5d |
|000060c0| 25 2d 38 2e 38 73 20 25 | 33 64 20 25 34 64 25 36 |%-8.8s %|3d %4d%6|
|000060d0| 64 4b 20 25 34 64 4b 20 | 25 2d 35 73 25 34 64 3a |dK %4dK |%-5s%4d:|
|000060e0| 25 30 32 64 20 25 35 2e | 32 66 25 25 20 25 35 2e |%02d %5.|2f%% %5.|
|000060f0| 32 66 25 25 20 25 2e 31 | 34 73 22 0a 58 0a 58 2f |2f%% %.1|4s".X.X/|
|00006100| 2a 20 74 68 65 73 65 20 | 61 72 65 20 66 6f 72 20 |* these |are for |
|00006110| 64 65 74 61 69 6c 69 6e | 67 20 74 68 65 20 70 72 |detailin|g the pr|
|00006120| 6f 63 65 73 73 20 73 74 | 61 74 65 73 20 2a 2f 0a |ocess st|ates */.|
|00006130| 58 0a 58 69 6e 74 20 70 | 72 6f 63 65 73 73 5f 73 |X.Xint p|rocess_s|
|00006140| 74 61 74 65 73 5b 3f 5d | 3b 0a 58 63 68 61 72 20 |tates[?]|;.Xchar |
|00006150| 2a 70 72 6f 63 73 74 61 | 74 65 6e 61 6d 65 73 5b |*procsta|tenames[|
|00006160| 5d 20 3d 20 7b 0a 58 20 | 20 20 20 22 22 2c 20 22 |] = {.X | "", "|
|00006170| 20 73 6c 65 65 70 69 6e | 67 2c 20 22 2c 20 22 20 | sleepin|g, ", " |
|00006180| 41 42 41 4e 44 4f 4e 45 | 44 2c 20 22 2c 20 22 20 |ABANDONE|D, ", " |
|00006190| 72 75 6e 6e 69 6e 67 2c | 20 22 2c 20 22 20 73 74 |running,| ", " st|
|000061a0| 61 72 74 69 6e 67 2c 20 | 22 2c 0a 58 20 20 20 20 |arting, |",.X |
|000061b0| 22 20 7a 6f 6d 62 69 65 | 2c 20 22 2c 20 22 20 73 |" zombie|, ", " s|
|000061c0| 74 6f 70 70 65 64 2c 20 | 22 2c 0a 58 20 20 20 20 |topped, |",.X |
|000061d0| 4e 55 4c 4c 0a 58 7d 3b | 0a 58 0a 58 2f 2a 20 74 |NULL.X};|.X.X/* t|
|000061e0| 68 65 73 65 20 61 72 65 | 20 66 6f 72 20 64 65 74 |hese are| for det|
|000061f0| 61 69 6c 69 6e 67 20 74 | 68 65 20 63 70 75 20 73 |ailing t|he cpu s|
|00006200| 74 61 74 65 73 20 2a 2f | 0a 58 0a 58 69 6e 74 20 |tates */|.X.Xint |
|00006210| 63 70 75 5f 73 74 61 74 | 65 73 5b 3f 5d 3b 0a 58 |cpu_stat|es[?];.X|
|00006220| 63 68 61 72 20 2a 63 70 | 75 73 74 61 74 65 6e 61 |char *cp|ustatena|
|00006230| 6d 65 73 5b 5d 20 3d 20 | 7b 0a 58 20 20 20 20 22 |mes[] = |{.X "|
|00006240| 75 73 65 72 22 2c 20 22 | 6e 69 63 65 22 2c 20 22 |user", "|nice", "|
|00006250| 73 79 73 74 65 6d 22 2c | 20 22 69 64 6c 65 22 2c |system",| "idle",|
|00006260| 0a 58 20 20 20 20 4e 55 | 4c 4c 0a 58 7d 3b 0a 58 |.X NU|LL.X};.X|
|00006270| 0a 58 2f 2a 20 74 68 65 | 73 65 20 61 72 65 20 66 |.X/* the|se are f|
|00006280| 6f 72 20 64 65 74 61 69 | 6c 69 6e 67 20 74 68 65 |or detai|ling the|
|00006290| 20 6d 65 6d 6f 72 79 20 | 73 74 61 74 69 73 74 69 | memory |statisti|
|000062a0| 63 73 20 2a 2f 0a 58 0a | 58 69 6e 74 20 6d 65 6d |cs */.X.|Xint mem|
|000062b0| 6f 72 79 5f 73 74 61 74 | 73 5b 3f 5d 3b 0a 58 63 |ory_stat|s[?];.Xc|
|000062c0| 68 61 72 20 2a 6d 65 6d | 6f 72 79 6e 61 6d 65 73 |har *mem|orynames|
|000062d0| 5b 5d 20 3d 20 7b 0a 58 | 20 20 20 20 22 4b 20 61 |[] = {.X| "K a|
|000062e0| 76 61 69 6c 61 62 6c 65 | 2c 20 22 2c 20 22 4b 20 |vailable|, ", "K |
|000062f0| 69 6e 20 75 73 65 2c 20 | 22 2c 20 22 4b 20 66 72 |in use, |", "K fr|
|00006300| 65 65 2c 20 22 2c 20 22 | 4b 20 6c 6f 63 6b 65 64 |ee, ", "|K locked|
|00006310| 22 2c 20 4e 55 4c 4c 0a | 58 7d 3b 0a 58 0a 58 2f |", NULL.|X};.X.X/|
|00006320| 2a 20 75 73 65 66 75 6c | 20 65 78 74 65 72 6e 61 |* useful| externa|
|00006330| 6c 73 20 2a 2f 0a 58 65 | 78 74 65 72 6e 20 69 6e |ls */.Xe|xtern in|
|00006340| 74 20 65 72 72 6e 6f 3b | 0a 58 65 78 74 65 72 6e |t errno;|.Xextern|
|00006350| 20 63 68 61 72 20 2a 73 | 79 73 5f 65 72 72 6c 69 | char *s|ys_errli|
|00006360| 73 74 5b 5d 3b 0a 58 0a | 58 6c 6f 6e 67 20 6c 73 |st[];.X.|Xlong ls|
|00006370| 65 65 6b 28 29 3b 0a 58 | 6c 6f 6e 67 20 74 69 6d |eek();.X|long tim|
|00006380| 65 28 29 3b 0a 58 6c 6f | 6e 67 20 70 65 72 63 65 |e();.Xlo|ng perce|
|00006390| 6e 74 61 67 65 73 28 29 | 3b 0a 58 0a 58 6d 61 63 |ntages()|;.X.Xmac|
|000063a0| 68 69 6e 65 5f 69 6e 69 | 74 28 73 74 61 74 69 63 |hine_ini|t(static|
|000063b0| 73 29 0a 58 0a 58 73 74 | 72 75 63 74 20 73 74 61 |s).X.Xst|ruct sta|
|000063c0| 74 69 63 73 20 2a 73 74 | 61 74 69 63 73 3b 0a 58 |tics *st|atics;.X|
|000063d0| 0a 58 7b 0a 58 20 20 20 | 20 72 65 74 75 72 6e 28 |.X{.X | return(|
|000063e0| 30 29 3b 0a 58 7d 0a 58 | 0a 58 63 68 61 72 20 2a |0);.X}.X|.Xchar *|
|000063f0| 66 6f 72 6d 61 74 5f 68 | 65 61 64 65 72 28 75 6e |format_h|eader(un|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.