home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / unix / volume24 / lb < prev    next >
SHell self-extracting ARchive  |  1991-06-06  |  32.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: lb

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)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 32 34 69 30 38 |Subject:| v24i08|
|00000010| 38 3a 20 20 53 69 6d 70 | 6c 65 20 6c 6f 61 64 2d |8: Simp|le load-|
|00000020| 62 61 6c 61 6e 63 69 6e | 67 20 70 72 6f 67 72 61 |balancin|g progra|
|00000030| 6d 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 63 6f |m.Newsgr|oups: co|
|00000040| 6d 70 2e 73 6f 75 72 63 | 65 73 2e 75 6e 69 78 0a |mp.sourc|es.unix.|
|00000050| 41 70 70 72 6f 76 65 64 | 3a 20 72 73 61 6c 7a 40 |Approved|: rsalz@|
|00000060| 75 75 6e 65 74 2e 55 55 | 2e 4e 45 54 0a 58 2d 43 |uunet.UU|.NET.X-C|
|00000070| 68 65 63 6b 73 75 6d 2d | 53 6e 65 66 72 75 3a 20 |hecksum-|Snefru: |
|00000080| 38 35 37 64 66 30 64 33 | 20 37 36 61 65 37 32 34 |857df0d3| 76ae724|
|00000090| 36 20 37 32 62 30 33 35 | 31 64 20 61 38 66 36 36 |6 72b035|1d a8f66|
|000000a0| 37 37 38 0a 0a 53 75 62 | 6d 69 74 74 65 64 2d 62 |778..Sub|mitted-b|
|000000b0| 79 3a 20 44 69 6b 72 61 | 6e 20 4b 61 73 73 61 62 |y: Dikra|n Kassab|
|000000c0| 69 61 6e 20 3c 64 65 6b | 65 40 65 65 2e 72 6f 63 |ian <dek|e@ee.roc|
|000000d0| 68 65 73 74 65 72 2e 65 | 64 75 3e 0a 50 6f 73 74 |hester.e|du>.Post|
|000000e0| 69 6e 67 2d 6e 75 6d 62 | 65 72 3a 20 56 6f 6c 75 |ing-numb|er: Volu|
|000000f0| 6d 65 20 32 34 2c 20 49 | 73 73 75 65 20 38 38 0a |me 24, I|ssue 88.|
|00000100| 41 72 63 68 69 76 65 2d | 6e 61 6d 65 3a 20 6c 62 |Archive-|name: lb|
|00000110| 0a 0a 0a 4c 42 20 69 73 | 20 61 20 6c 6f 61 64 2d |...LB is| a load-|
|00000120| 62 61 6c 61 6e 63 69 6e | 67 20 70 72 6f 67 72 61 |balancin|g progra|
|00000130| 6d 2e 20 20 49 74 20 63 | 61 6e 20 63 68 65 63 6b |m. It c|an check|
|00000140| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6c 6f 61 | the cur|rent loa|
|00000150| 64 20 6f 6e 20 76 61 72 | 69 6f 75 73 0a 6d 61 63 |d on var|ious.mac|
|00000160| 68 69 6e 65 73 20 6f 6e | 20 61 20 4c 41 4e 2c 20 |hines on| a LAN, |
|00000170| 61 6e 64 20 66 69 6e 64 | 20 74 68 65 20 62 65 73 |and find| the bes|
|00000180| 74 20 63 61 6e 64 69 64 | 61 74 65 20 6d 61 63 68 |t candid|ate mach|
|00000190| 69 6e 65 20 74 6f 20 61 | 63 63 65 70 74 20 61 20 |ine to a|ccept a |
|000001a0| 6e 65 77 20 6a 6f 62 0a | 74 6f 20 69 74 27 73 20 |new job.|to it's |
|000001b0| 72 75 6e 20 71 75 65 75 | 65 2e 20 20 41 64 64 69 |run queu|e. Addi|
|000001c0| 74 69 6f 6e 61 6c 6c 79 | 2c 20 69 74 20 63 61 6e |tionally|, it can|
|000001d0| 20 73 65 6e 64 20 74 68 | 65 20 6a 6f 62 20 74 6f | send th|e job to|
|000001e0| 20 74 68 61 74 20 6d 61 | 63 68 69 6e 65 0a 75 73 | that ma|chine.us|
|000001f0| 69 6e 67 20 72 73 68 28 | 31 29 2e 0a 0a 4c 42 20 |ing rsh(|1)...LB |
|00000200| 77 6f 72 6b 73 20 62 65 | 73 74 20 69 6e 20 68 6f |works be|st in ho|
|00000210| 6d 6f 67 65 6e 65 6f 75 | 73 20 65 6e 76 69 72 6f |mogeneou|s enviro|
|00000220| 6e 6d 65 6e 74 73 2c 20 | 77 68 65 72 65 20 65 61 |nments, |where ea|
|00000230| 63 68 20 6d 61 63 68 69 | 6e 65 20 68 61 73 20 73 |ch machi|ne has s|
|00000240| 69 6d 69 6c 61 72 0a 6f | 72 20 69 64 65 6e 74 69 |imilar.o|r identi|
|00000250| 63 61 6c 20 66 69 6c 65 | 20 73 79 73 74 65 6d 20 |cal file| system |
|00000260| 6c 61 79 6f 75 74 2e 20 | 20 48 65 72 65 20 61 74 |layout. | Here at|
|00000270| 20 74 68 65 20 55 6e 69 | 76 65 72 73 69 74 79 20 | the Uni|versity |
|00000280| 6f 66 20 52 6f 63 68 65 | 73 74 65 72 0a 44 65 70 |of Roche|ster.Dep|
|00000290| 61 72 74 6d 65 6e 74 20 | 6f 66 20 45 6c 65 63 74 |artment |of Elect|
|000002a0| 72 69 63 61 6c 20 45 6e | 67 69 6e 65 65 72 69 6e |rical En|gineerin|
|000002b0| 67 2c 20 77 65 20 68 61 | 76 65 20 6e 65 61 72 6c |g, we ha|ve nearl|
|000002c0| 79 20 37 30 20 53 55 4e | 20 63 6f 6d 70 75 74 65 |y 70 SUN| compute|
|000002d0| 72 73 2c 0a 77 68 69 63 | 68 20 73 68 61 72 65 20 |rs,.whic|h share |
|000002e0| 68 6f 6d 65 2d 64 69 72 | 65 63 74 6f 72 69 65 73 |home-dir|ectories|
|000002f0| 20 61 6e 64 20 6c 6f 63 | 61 6c 20 62 69 6e 61 72 | and loc|al binar|
|00000300| 69 65 73 2e 20 20 57 68 | 65 6e 20 61 20 75 73 65 |ies. Wh|en a use|
|00000310| 72 20 73 69 74 74 69 6e | 67 20 61 74 20 61 0a 73 |r sittin|g at a.s|
|00000320| 6d 61 6c 6c 20 77 6f 72 | 6b 73 74 61 74 69 6f 6e |mall wor|kstation|
|00000330| 20 77 61 6e 74 73 20 74 | 6f 20 72 75 6e 20 61 20 | wants t|o run a |
|00000340| 63 6f 6d 70 75 74 65 20 | 69 6e 74 65 6e 73 69 76 |compute |intensiv|
|00000350| 65 20 6a 6f 62 2c 20 4c | 42 20 68 65 6c 70 73 20 |e job, L|B helps |
|00000360| 74 6f 20 66 69 6e 64 20 | 61 0a 6d 61 63 68 69 6e |to find |a.machin|
|00000370| 65 20 6f 6e 20 74 68 65 | 20 6e 65 74 77 6f 72 6b |e on the| network|
|00000380| 20 74 68 61 74 20 68 61 | 73 20 61 20 6c 6f 77 20 | that ha|s a low |
|00000390| 6c 6f 61 64 2c 20 6b 6e | 6f 77 69 6e 67 20 74 68 |load, kn|owing th|
|000003a0| 61 74 20 74 68 61 74 20 | 6d 61 63 68 69 6e 65 20 |at that |machine |
|000003b0| 77 69 6c 6c 0a 61 6c 73 | 6f 20 68 61 76 65 20 68 |will.als|o have h|
|000003c0| 69 73 2f 68 65 72 20 68 | 6f 6d 65 20 64 69 72 65 |is/her h|ome dire|
|000003d0| 63 74 6f 72 79 20 61 6e | 64 20 72 65 71 75 69 72 |ctory an|d requir|
|000003e0| 65 64 20 70 72 6f 67 72 | 61 6d 2e 0a 0a 23 21 20 |ed progr|am...#! |
|000003f0| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|00000400| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|00000410| 65 2e 20 20 52 65 6d 6f | 76 65 20 61 6e 79 74 68 |e. Remo|ve anyth|
|00000420| 69 6e 67 20 62 65 66 6f | 72 65 20 74 68 69 73 20 |ing befo|re this |
|00000430| 6c 69 6e 65 2c 20 74 68 | 65 6e 20 66 65 65 64 20 |line, th|en feed |
|00000440| 69 74 0a 23 20 69 6e 74 | 6f 20 61 20 73 68 65 6c |it.# int|o a shel|
|00000450| 6c 20 76 69 61 20 22 73 | 68 20 66 69 6c 65 22 20 |l via "s|h file" |
|00000460| 6f 72 20 73 69 6d 69 6c | 61 72 2e 20 20 54 6f 20 |or simil|ar. To |
|00000470| 6f 76 65 72 77 72 69 74 | 65 20 65 78 69 73 74 69 |overwrit|e existi|
|00000480| 6e 67 20 66 69 6c 65 73 | 2c 0a 23 20 74 79 70 65 |ng files|,.# type|
|00000490| 20 22 73 68 20 66 69 6c | 65 20 2d 63 22 2e 0a 23 | "sh fil|e -c"..#|
|000004a0| 20 54 68 65 20 74 6f 6f | 6c 20 74 68 61 74 20 67 | The too|l that g|
|000004b0| 65 6e 65 72 61 74 65 64 | 20 74 68 69 73 20 61 70 |enerated| this ap|
|000004c0| 70 65 61 72 65 64 20 69 | 6e 20 74 68 65 20 63 6f |peared i|n the co|
|000004d0| 6d 70 2e 73 6f 75 72 63 | 65 73 2e 75 6e 69 78 20 |mp.sourc|es.unix |
|000004e0| 6e 65 77 73 67 72 6f 75 | 70 3b 0a 23 20 73 65 6e |newsgrou|p;.# sen|
|000004f0| 64 20 6d 61 69 6c 20 74 | 6f 20 63 6f 6d 70 2d 73 |d mail t|o comp-s|
|00000500| 6f 75 72 63 65 73 2d 75 | 6e 69 78 40 75 75 6e 65 |ources-u|nix@uune|
|00000510| 74 2e 75 75 2e 6e 65 74 | 20 69 66 20 79 6f 75 20 |t.uu.net| if you |
|00000520| 77 61 6e 74 20 74 68 61 | 74 20 74 6f 6f 6c 2e 0a |want tha|t tool..|
|00000530| 23 20 43 6f 6e 74 65 6e | 74 73 3a 20 20 49 4e 53 |# Conten|ts: INS|
|00000540| 54 41 4c 4c 20 4d 61 6b | 65 66 69 6c 65 20 4f 54 |TALL Mak|efile OT|
|00000550| 48 45 52 5f 53 45 52 56 | 45 52 53 20 52 45 41 44 |HER_SERV|ERS READ|
|00000560| 4d 45 20 63 6f 6e 66 69 | 67 2e 68 20 6c 62 2e 31 |ME confi|g.h lb.1|
|00000570| 20 6c 62 2e 35 0a 23 20 | 20 20 72 73 64 63 6c 6e | lb.5.# | rsdcln|
|00000580| 74 2e 63 20 73 72 76 63 | 6c 6e 74 2e 63 20 73 74 |t.c srvc|lnt.c st|
|00000590| 5f 73 65 6e 64 72 65 63 | 76 2e 63 20 73 74 61 74 |_sendrec|v.c stat|
|000005a0| 73 2e 68 0a 23 20 57 72 | 61 70 70 65 64 20 62 79 |s.h.# Wr|apped by|
|000005b0| 20 72 73 61 6c 7a 40 6c | 69 74 63 68 69 2e 62 62 | rsalz@l|itchi.bb|
|000005c0| 6e 2e 63 6f 6d 20 6f 6e | 20 54 68 75 20 4a 75 6e |n.com on| Thu Jun|
|000005d0| 20 20 36 20 31 32 3a 34 | 33 3a 34 30 20 31 39 39 | 6 12:4|3:40 199|
|000005e0| 31 0a 50 41 54 48 3d 2f | 62 69 6e 3a 2f 75 73 72 |1.PATH=/|bin:/usr|
|000005f0| 2f 62 69 6e 3a 2f 75 73 | 72 2f 75 63 62 20 3b 20 |/bin:/us|r/ucb ; |
|00000600| 65 78 70 6f 72 74 20 50 | 41 54 48 0a 65 63 68 6f |export P|ATH.echo|
|00000610| 20 49 66 20 74 68 69 73 | 20 61 72 63 68 69 76 65 | If this| archive|
|00000620| 20 69 73 20 63 6f 6d 70 | 6c 65 74 65 2c 20 79 6f | is comp|lete, yo|
|00000630| 75 20 77 69 6c 6c 20 73 | 65 65 20 74 68 65 20 66 |u will s|ee the f|
|00000640| 6f 6c 6c 6f 77 69 6e 67 | 20 6d 65 73 73 61 67 65 |ollowing| message|
|00000650| 3a 0a 65 63 68 6f 20 27 | 20 20 20 20 20 20 20 20 |:.echo '| |
|00000660| 20 20 22 73 68 61 72 3a | 20 45 6e 64 20 6f 66 20 | "shar:| End of |
|00000670| 61 72 63 68 69 76 65 2e | 22 27 0a 69 66 20 74 65 |archive.|"'.if te|
|00000680| 73 74 20 2d 66 20 27 49 | 4e 53 54 41 4c 4c 27 20 |st -f 'I|NSTALL' |
|00000690| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|000006a0| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|000006b0| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|000006c0| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|000006d0| 20 66 69 6c 65 20 5c 22 | 27 49 4e 53 54 41 4c 4c | file \"|'INSTALL|
|000006e0| 27 5c 22 0a 65 6c 73 65 | 0a 20 20 65 63 68 6f 20 |'\".else|. echo |
|000006f0| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00000700| 20 5c 22 27 49 4e 53 54 | 41 4c 4c 27 5c 22 20 5c | \"'INST|ALL'\" \|
|00000710| 28 31 39 38 38 20 63 68 | 61 72 61 63 74 65 72 73 |(1988 ch|aracters|
|00000720| 5c 29 0a 20 20 73 65 64 | 20 22 73 2f 5e 58 2f 2f |\). sed| "s/^X//|
|00000730| 22 20 3e 27 49 4e 53 54 | 41 4c 4c 27 20 3c 3c 27 |" >'INST|ALL' <<'|
|00000740| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 0a 58 |END_OF_F|ILE'.X.X|
|00000750| 09 09 4c 42 20 2d 20 54 | 68 65 20 4c 6f 61 64 20 |..LB - T|he Load |
|00000760| 42 61 6c 61 6e 63 65 72 | 20 28 76 65 72 73 69 6f |Balancer| (versio|
|00000770| 6e 20 31 2e 32 29 0a 58 | 09 09 09 62 79 20 44 69 |n 1.2).X|...by Di|
|00000780| 6b 72 61 6e 20 4b 61 73 | 73 61 62 69 61 6e 0a 58 |kran Kas|sabian.X|
|00000790| 0a 58 09 09 20 20 20 20 | 20 20 55 6e 69 76 65 72 |.X.. | Univer|
|000007a0| 73 69 74 79 20 4f 66 20 | 52 6f 63 68 65 73 74 65 |sity Of |Rocheste|
|000007b0| 72 0a 58 09 09 44 65 70 | 61 72 74 6d 65 6e 74 20 |r.X..Dep|artment |
|000007c0| 6f 66 20 45 6c 65 63 74 | 72 69 63 61 6c 20 45 6e |of Elect|rical En|
|000007d0| 67 69 6e 65 65 72 69 6e | 67 0a 58 09 09 09 4d 61 |gineerin|g.X...Ma|
|000007e0| 72 63 68 20 33 2c 20 31 | 39 39 31 0a 58 0a 58 49 |rch 3, 1|991.X.XI|
|000007f0| 4e 53 54 41 4c 4c 41 54 | 49 4f 4e 20 4e 4f 54 45 |NSTALLAT|ION NOTE|
|00000800| 53 3a 0a 58 0a 58 0a 58 | 31 2e 20 43 48 4f 4f 53 |S:.X.X.X|1. CHOOS|
|00000810| 49 4e 47 20 41 20 53 45 | 52 56 45 52 0a 58 3d 3d |ING A SE|RVER.X==|
|00000820| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000830| 3d 3d 0a 58 54 68 65 20 | 6c 62 20 6c 6f 61 64 20 |==.XThe |lb load |
|00000840| 62 61 6c 61 6e 63 65 72 | 20 75 73 65 73 20 73 74 |balancer| uses st|
|00000850| 61 74 69 73 74 69 63 73 | 20 67 61 74 68 65 72 65 |atistics| gathere|
|00000860| 64 20 76 69 61 20 63 6f | 6e 6e 65 63 74 69 6f 6e |d via co|nnection|
|00000870| 20 77 69 74 68 0a 58 73 | 65 72 76 65 72 73 20 6f | with.Xs|ervers o|
|00000880| 6e 20 65 61 63 68 20 6f | 66 20 74 68 65 20 63 61 |n each o|f the ca|
|00000890| 6e 64 69 64 61 74 65 20 | 6d 61 63 68 69 6e 65 73 |ndidate |machines|
|000008a0| 2e 20 20 54 77 6f 20 73 | 65 72 76 65 72 73 20 61 |. Two s|ervers a|
|000008b0| 72 65 20 73 75 70 70 6f | 72 74 65 64 2c 0a 58 74 |re suppo|rted,.Xt|
|000008c0| 68 65 20 53 55 4e 20 72 | 73 74 61 74 64 2c 20 61 |he SUN r|statd, a|
|000008d0| 6e 64 20 44 61 76 65 20 | 43 75 72 72 79 27 73 20 |nd Dave |Curry's |
|000008e0| 73 74 61 74 73 72 76 2e | 20 20 54 68 65 20 69 6e |statsrv.| The in|
|000008f0| 73 74 61 6c 6c 65 72 20 | 6d 75 73 74 20 73 65 65 |staller |must see|
|00000900| 20 74 6f 0a 58 69 74 20 | 74 68 61 74 20 61 6c 6c | to.Xit |that all|
|00000910| 20 63 61 6e 64 69 64 61 | 74 65 20 6d 61 63 68 69 | candida|te machi|
|00000920| 6e 65 73 20 73 75 70 70 | 6f 72 74 20 74 68 65 20 |nes supp|ort the |
|00000930| 73 65 6c 65 63 74 65 64 | 20 73 65 72 76 65 72 20 |selected| server |
|00000940| 70 72 6f 67 72 61 6d 2e | 0a 58 49 6e 20 61 6e 20 |program.|.XIn an |
|00000950| 61 6c 6c 20 53 55 4e 20 | 65 6e 76 69 72 6f 6e 6d |all SUN |environm|
|00000960| 65 6e 74 2c 20 72 73 74 | 61 74 64 20 69 73 20 74 |ent, rst|atd is t|
|00000970| 68 65 20 62 65 74 74 65 | 72 20 63 68 6f 69 63 65 |he bette|r choice|
|00000980| 20 61 73 20 69 74 20 73 | 65 65 6d 73 20 74 6f 0a | as it s|eems to.|
|00000990| 58 62 65 20 73 6f 6d 65 | 77 68 61 74 20 66 61 73 |Xbe some|what fas|
|000009a0| 74 65 72 2e 20 20 49 6e | 20 6f 74 68 65 72 20 65 |ter. In| other e|
|000009b0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 73 2c 20 69 74 20 |nvironme|nts, it |
|000009c0| 6d 61 79 20 62 65 20 6e | 65 63 65 73 73 61 72 79 |may be n|ecessary|
|000009d0| 20 74 6f 20 75 73 65 0a | 58 74 68 65 20 73 74 61 | to use.|Xthe sta|
|000009e0| 74 73 72 76 20 73 65 72 | 76 65 72 2c 20 77 68 69 |tsrv ser|ver, whi|
|000009f0| 63 68 20 69 73 20 70 75 | 62 6c 69 63 20 64 6f 6d |ch is pu|blic dom|
|00000a00| 61 69 6e 2e 0a 58 0a 58 | 32 2e 20 42 55 49 4c 44 |ain..X.X|2. BUILD|
|00000a10| 49 4e 47 20 54 48 45 20 | 50 52 4f 47 52 41 4d 0a |ING THE |PROGRAM.|
|00000a20| 58 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |X=======|========|
|00000a30| 3d 3d 3d 3d 3d 3d 3d 3d | 0a 58 4f 6e 63 65 20 61 |========|.XOnce a|
|00000a40| 20 73 65 72 76 65 72 20 | 69 73 20 73 65 6c 65 63 | server |is selec|
|00000a50| 74 65 64 2c 20 74 68 65 | 20 4d 61 6b 65 66 69 6c |ted, the| Makefil|
|00000a60| 65 20 6d 75 73 74 20 62 | 65 20 65 64 69 74 65 64 |e must b|e edited|
|00000a70| 20 74 6f 20 72 65 66 6c | 65 63 74 20 74 68 65 20 | to refl|ect the |
|00000a80| 0a 58 63 68 6f 69 63 65 | 2e 20 20 49 66 20 72 73 |.Xchoice|. If rs|
|00000a90| 74 61 74 64 20 69 73 20 | 74 6f 20 62 65 20 75 73 |tatd is |to be us|
|00000aa0| 65 64 2c 20 65 64 69 74 | 20 74 68 65 20 4d 61 6b |ed, edit| the Mak|
|00000ab0| 65 66 69 6c 65 20 64 65 | 66 69 6e 69 74 69 6f 6e |efile de|finition|
|00000ac0| 20 66 6f 72 20 53 45 52 | 56 45 52 0a 58 74 6f 20 | for SER|VER.Xto |
|00000ad0| 62 65 20 27 53 45 52 56 | 45 52 3d 72 73 74 61 74 |be 'SERV|ER=rstat|
|00000ae0| 64 27 2e 20 20 49 66 20 | 74 68 65 20 73 74 61 74 |d'. If |the stat|
|00000af0| 73 72 76 20 73 65 72 76 | 65 72 20 69 73 20 74 6f |srv serv|er is to|
|00000b00| 20 62 65 20 75 73 65 64 | 2c 20 6d 61 6b 65 20 69 | be used|, make i|
|00000b10| 74 0a 58 27 53 45 52 56 | 45 52 3d 73 74 61 74 73 |t.X'SERV|ER=stats|
|00000b20| 72 76 27 2e 20 20 43 68 | 65 63 6b 20 74 68 65 20 |rv'. Ch|eck the |
|00000b30| 64 65 66 69 6e 65 73 20 | 69 6e 20 63 6f 6e 66 69 |defines |in confi|
|00000b40| 67 2e 68 2c 20 61 6e 64 | 20 63 68 6f 6f 73 65 20 |g.h, and| choose |
|00000b50| 74 68 65 20 6c 6f 63 61 | 74 69 6f 6e 0a 58 6f 66 |the loca|tion.Xof|
|00000b60| 20 74 68 65 20 63 6f 6e | 66 69 67 75 72 61 74 69 | the con|figurati|
|00000b70| 6f 6e 20 66 69 6c 65 2e | 20 20 52 65 6d 65 6d 62 |on file.| Rememb|
|00000b80| 65 72 20 74 68 61 74 20 | 65 76 65 72 79 20 6d 61 |er that |every ma|
|00000b90| 63 68 69 6e 65 20 74 68 | 61 74 20 77 61 6e 74 73 |chine th|at wants|
|00000ba0| 20 74 6f 0a 58 75 73 65 | 20 6c 62 20 6e 65 65 64 | to.Xuse| lb need|
|00000bb0| 73 20 74 6f 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |s to be |able to |
|00000bc0| 73 65 65 20 74 68 61 74 | 20 63 6f 6e 66 69 67 75 |see that| configu|
|00000bd0| 72 61 74 69 6f 6e 20 66 | 69 6c 65 2e 20 20 59 6f |ration f|ile. Yo|
|00000be0| 75 20 6d 61 79 20 63 68 | 6f 6f 73 65 0a 58 74 6f |u may ch|oose.Xto|
|00000bf0| 20 75 73 65 20 6d 75 6c | 74 69 70 6c 65 20 63 6f | use mul|tiple co|
|00000c00| 70 69 65 73 2c 20 6f 72 | 20 61 20 73 69 6e 67 6c |pies, or| a singl|
|00000c10| 65 20 63 6f 70 79 20 74 | 68 61 74 20 61 6c 6c 20 |e copy t|hat all |
|00000c20| 6d 61 63 68 69 6e 65 73 | 20 63 61 6e 20 73 65 65 |machines| can see|
|00000c30| 2e 20 20 4f 6e 63 65 0a | 58 74 68 65 20 4d 61 6b |. Once.|Xthe Mak|
|00000c40| 65 66 69 6c 65 20 61 6e | 64 20 63 6f 6e 66 69 67 |efile an|d config|
|00000c50| 2e 68 20 61 72 65 20 73 | 65 74 75 70 20 74 6f 20 |.h are s|etup to |
|00000c60| 79 6f 75 72 20 73 61 74 | 69 73 66 61 63 74 69 6f |your sat|isfactio|
|00000c70| 6e 2c 20 74 79 70 65 20 | 27 6d 61 6b 65 27 2e 0a |n, type |'make'..|
|00000c80| 58 54 68 65 20 70 72 6f | 67 72 61 6d 20 27 6c 62 |XThe pro|gram 'lb|
|00000c90| 27 20 77 69 6c 6c 20 62 | 65 20 62 75 69 6c 74 2e |' will b|e built.|
|00000ca0| 0a 58 0a 58 33 2e 20 57 | 52 49 54 49 4e 47 20 54 |.X.X3. W|RITING T|
|00000cb0| 48 45 20 43 4f 4e 46 49 | 47 55 52 41 54 49 4f 4e |HE CONFI|GURATION|
|00000cc0| 20 46 49 4c 45 0a 58 3d | 3d 3d 3d 3d 3d 3d 3d 3d | FILE.X=|========|
|00000cd0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000ce0| 3d 3d 3d 3d 3d 3d 3d 3d | 0a 58 54 68 65 20 63 6f |========|.XThe co|
|00000cf0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 66 69 6c 65 |nfigurat|ion file|
|00000d00| 20 63 6f 6e 74 61 69 6e | 73 20 69 6e 66 6f 72 6d | contain|s inform|
|00000d10| 61 74 69 6f 6e 20 6f 6e | 20 65 76 65 72 79 20 6d |ation on| every m|
|00000d20| 61 63 68 69 6e 65 20 6f | 6e 20 77 68 69 63 68 20 |achine o|n which |
|00000d30| 6c 62 0a 58 6d 61 79 20 | 73 74 61 72 74 20 6a 6f |lb.Xmay |start jo|
|00000d40| 62 73 2e 20 53 65 65 20 | 74 68 65 20 6d 61 6e 20 |bs. See |the man |
|00000d50| 70 61 67 65 20 6c 62 28 | 35 29 20 66 6f 72 20 64 |page lb(|5) for d|
|00000d60| 65 74 61 69 6c 73 20 6f | 6e 20 69 74 73 20 73 65 |etails o|n its se|
|00000d70| 74 75 70 2e 0a 58 0a 58 | 0a 58 34 2e 20 49 4e 53 |tup..X.X|.X4. INS|
|00000d80| 54 41 4c 4c 49 4e 47 20 | 54 48 45 20 46 49 4c 45 |TALLING |THE FILE|
|00000d90| 53 0a 58 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |S.X=====|========|
|00000da0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0a 58 49 6e 73 74 |========|==.XInst|
|00000db0| 61 6c 6c 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |all the |program |
|00000dc0| 6c 62 20 69 6e 20 61 20 | 6c 6f 63 61 74 69 6f 6e |lb in a |location|
|00000dd0| 20 77 69 74 68 69 6e 20 | 74 68 65 20 70 61 74 68 | within |the path|
|00000de0| 20 6f 66 20 74 68 65 20 | 75 73 65 72 73 20 72 65 | of the |users re|
|00000df0| 71 75 69 72 69 6e 67 0a | 58 69 74 2e 20 20 47 6f |quiring.|Xit. Go|
|00000e00| 6f 64 20 63 68 6f 69 63 | 65 73 20 77 6f 75 6c 64 |od choic|es would|
|00000e10| 20 69 6e 63 6c 75 64 65 | 20 2f 75 73 72 2f 6c 6f | include| /usr/lo|
|00000e20| 63 61 6c 2f 62 69 6e 20 | 6f 72 20 2f 75 73 72 2f |cal/bin |or /usr/|
|00000e30| 6e 65 77 2e 20 20 54 68 | 65 6e 20 69 6e 73 74 61 |new. Th|en insta|
|00000e40| 6c 6c 0a 58 74 68 65 20 | 63 6f 6e 66 69 67 75 72 |ll.Xthe |configur|
|00000e50| 61 74 69 6f 6e 20 66 69 | 6c 65 20 77 68 65 72 65 |ation fi|le where|
|00000e60| 76 65 72 20 74 68 65 20 | 63 6f 6e 66 69 67 2e 68 |ver the |config.h|
|00000e70| 20 66 69 6c 65 20 63 6c | 61 69 6d 65 64 20 69 74 | file cl|aimed it|
|00000e80| 20 77 6f 75 6c 64 20 62 | 65 2e 20 20 41 67 61 69 | would b|e. Agai|
|00000e90| 6e 2c 0a 58 72 65 6d 65 | 6d 62 65 72 20 74 68 61 |n,.Xreme|mber tha|
|00000ea0| 74 20 65 76 65 72 79 20 | 6d 61 63 68 69 6e 65 20 |t every |machine |
|00000eb0| 6e 65 65 64 73 20 74 6f | 20 68 61 76 65 20 72 65 |needs to| have re|
|00000ec0| 61 64 20 61 63 63 65 73 | 73 20 74 6f 20 74 68 69 |ad acces|s to thi|
|00000ed0| 73 20 66 69 6c 65 2e 20 | 20 46 69 6e 61 6c 6c 79 |s file. | Finally|
|00000ee0| 2c 0a 58 69 6e 73 74 61 | 6c 6c 20 74 68 65 20 6d |,.Xinsta|ll the m|
|00000ef0| 61 6e 20 70 61 67 65 73 | 20 6c 62 28 31 29 20 61 |an pages| lb(1) a|
|00000f00| 6e 64 20 6c 62 28 35 29 | 20 61 73 20 61 70 70 72 |nd lb(5)| as appr|
|00000f10| 6f 70 72 69 61 74 65 2e | 0a 58 0a 58 54 68 61 74 |opriate.|.X.XThat|
|00000f20| 27 73 20 61 6c 6c 21 0a | 58 0a 58 0a 58 44 65 6b |'s all!.|X.X.XDek|
|00000f30| 65 20 4b 61 73 73 61 62 | 69 61 6e 2c 20 33 2f 38 |e Kassab|ian, 3/8|
|00000f40| 2f 39 31 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |/91.END_|OF_FILE.|
|00000f50| 20 20 69 66 20 74 65 73 | 74 20 31 39 38 38 20 2d | if tes|t 1988 -|
|00000f60| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 49 4e 53 54 |ne `wc -|c <'INST|
|00000f70| 41 4c 4c 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |ALL'`; t|hen. |
|00000f80| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 49 4e |echo sha|r: \"'IN|
|00000f90| 53 54 41 4c 4c 27 5c 22 | 20 75 6e 70 61 63 6b 65 |STALL'\"| unpacke|
|00000fa0| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00000fb0| 65 21 0a 20 20 66 69 0a | 20 20 23 20 65 6e 64 20 |e!. fi.| # end |
|00000fc0| 6f 66 20 27 49 4e 53 54 | 41 4c 4c 27 0a 66 69 0a |of 'INST|ALL'.fi.|
|00000fd0| 69 66 20 74 65 73 74 20 | 2d 66 20 27 4d 61 6b 65 |if test |-f 'Make|
|00000fe0| 66 69 6c 65 27 20 2d 61 | 20 22 24 7b 31 7d 22 20 |file' -a| "${1}" |
|00000ff0| 21 3d 20 22 2d 63 22 20 | 3b 20 74 68 65 6e 20 0a |!= "-c" |; then .|
|00001000| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 57 69 6c | echo s|har: Wil|
|00001010| 6c 20 6e 6f 74 20 63 6c | 6f 62 62 65 72 20 65 78 |l not cl|obber ex|
|00001020| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 5c 22 27 4d |isting f|ile \"'M|
|00001030| 61 6b 65 66 69 6c 65 27 | 5c 22 0a 65 6c 73 65 0a |akefile'|\".else.|
|00001040| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 | echo s|har: Ext|
|00001050| 72 61 63 74 69 6e 67 20 | 5c 22 27 4d 61 6b 65 66 |racting |\"'Makef|
|00001060| 69 6c 65 27 5c 22 20 5c | 28 31 30 36 39 20 63 68 |ile'\" \|(1069 ch|
|00001070| 61 72 61 63 74 65 72 73 | 5c 29 0a 20 20 73 65 64 |aracters|\). sed|
|00001080| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 4d 61 6b 65 | "s/^X//|" >'Make|
|00001090| 66 69 6c 65 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |file' <<|'END_OF_|
|000010a0| 46 49 4c 45 27 0a 58 23 | 0a 58 23 20 4d 61 6b 65 |FILE'.X#|.X# Make|
|000010b0| 66 69 6c 65 20 66 6f 72 | 20 22 6c 62 22 2c 20 74 |file for| "lb", t|
|000010c0| 68 65 20 6c 6f 61 64 2d | 62 61 6c 61 6e 63 65 72 |he load-|balancer|
|000010d0| 0a 58 23 20 5e 44 65 6b | 65 20 4b 61 73 73 61 62 |.X# ^Dek|e Kassab|
|000010e0| 69 61 6e 20 36 2f 33 2f | 38 38 2c 20 20 6d 6f 64 |ian 6/3/|88, mod|
|000010f0| 73 20 61 6e 64 20 61 64 | 64 69 74 69 6f 6e 73 20 |s and ad|ditions |
|00001100| 33 2f 37 2f 38 39 0a 58 | 23 0a 58 53 45 52 56 45 |3/7/89.X|#.XSERVE|
|00001110| 52 3d 72 73 74 61 74 64 | 0a 58 23 0a 58 23 43 46 |R=rstatd|.X#.X#CF|
|00001120| 4c 41 47 53 3d 20 20 2d | 67 20 2d 66 36 38 38 38 |LAGS= -|g -f6888|
|00001130| 31 0a 58 43 46 4c 41 47 | 53 3d 20 20 20 2d 4f 20 |1.XCFLAG|S= -O |
|00001140| 0a 58 4c 44 46 4c 41 47 | 53 3d 20 20 2d 73 0a 58 |.XLDFLAG|S= -s.X|
|00001150| 23 50 52 49 4e 54 3d 20 | 20 20 20 70 74 72 6f 66 |#PRINT= | ptrof|
|00001160| 66 20 2d 6d 61 6e 0a 58 | 50 52 49 4e 54 3d 09 20 |f -man.X|PRINT=. |
|00001170| 20 74 72 6f 66 66 20 2d | 74 20 2d 6d 61 6e 20 0a | troff -|t -man .|
|00001180| 58 0a 58 53 52 43 53 3d | 09 20 20 72 73 64 63 6c |X.XSRCS=|. rsdcl|
|00001190| 6e 74 2e 63 20 73 72 76 | 63 6c 6e 74 2e 63 20 73 |nt.c srv|clnt.c s|
|000011a0| 74 5f 73 65 6e 64 72 65 | 63 76 2e 63 20 73 74 61 |t_sendre|cv.c sta|
|000011b0| 74 73 2e 68 20 63 6f 6e | 66 69 67 2e 68 0a 58 4d |ts.h con|fig.h.XM|
|000011c0| 41 4e 53 3d 09 20 20 6c | 62 2e 31 20 6c 62 2e 35 |ANS=. l|b.1 lb.5|
|000011d0| 0a 58 4f 42 4a 53 5f 53 | 52 56 3d 20 73 72 76 63 |.XOBJS_S|RV= srvc|
|000011e0| 6c 6e 74 2e 6f 20 73 74 | 5f 73 65 6e 64 72 65 63 |lnt.o st|_sendrec|
|000011f0| 76 2e 6f 0a 58 4f 42 4a | 53 5f 52 53 44 3d 20 72 |v.o.XOBJ|S_RSD= r|
|00001200| 73 64 63 6c 6e 74 2e 6f | 20 0a 58 4c 49 42 53 3d |sdclnt.o| .XLIBS=|
|00001210| 20 20 20 20 20 2d 6c 72 | 70 63 73 76 63 0a 58 0a | -lr|pcsvc.X.|
|00001220| 58 6c 62 3a 20 6c 62 2e | 24 28 53 45 52 56 45 52 |Xlb: lb.|$(SERVER|
|00001230| 29 0a 58 09 40 65 63 68 | 6f 20 22 6c 62 20 68 61 |).X.@ech|o "lb ha|
|00001240| 73 20 62 65 65 6e 20 62 | 75 69 6c 74 20 66 6f 72 |s been b|uilt for|
|00001250| 20 24 28 53 45 52 56 45 | 52 29 20 73 65 72 76 65 | $(SERVE|R) serve|
|00001260| 72 2e 22 0a 58 0a 58 6c | 62 2e 72 73 74 61 74 64 |r.".X.Xl|b.rstatd|
|00001270| 3a 20 24 28 4f 42 4a 53 | 5f 52 53 44 29 0a 58 09 |: $(OBJS|_RSD).X.|
|00001280| 24 28 43 43 29 20 24 28 | 43 46 4c 41 47 53 29 20 |$(CC) $(|CFLAGS) |
|00001290| 24 28 4c 44 46 4c 41 47 | 53 29 20 2d 6f 20 6c 62 |$(LDFLAG|S) -o lb|
|000012a0| 20 24 28 4f 42 4a 53 5f | 52 53 44 29 20 24 28 4c | $(OBJS_|RSD) $(L|
|000012b0| 49 42 53 29 0a 58 0a 58 | 6c 62 2e 73 74 61 74 73 |IBS).X.X|lb.stats|
|000012c0| 72 76 3a 20 24 28 4f 42 | 4a 53 5f 53 52 56 29 0a |rv: $(OB|JS_SRV).|
|000012d0| 58 09 24 28 43 43 29 20 | 24 28 43 46 4c 41 47 53 |X.$(CC) |$(CFLAGS|
|000012e0| 29 20 24 28 4c 44 46 4c | 41 47 53 29 20 2d 6f 20 |) $(LDFL|AGS) -o |
|000012f0| 6c 62 20 24 28 4f 42 4a | 53 5f 53 52 56 29 0a 58 |lb $(OBJ|S_SRV).X|
|00001300| 0a 58 74 61 67 73 3a 0a | 58 09 63 74 61 67 73 20 |.Xtags:.|X.ctags |
|00001310| 2a 2e 63 20 3e 20 74 61 | 67 73 0a 58 0a 58 63 6c |*.c > ta|gs.X.Xcl|
|00001320| 65 61 6e 3a 0a 58 09 72 | 6d 20 2d 66 20 63 6f 72 |ean:.X.r|m -f cor|
|00001330| 65 20 2a 2e 6f 0a 58 0a | 58 73 70 6f 74 6c 65 73 |e *.o.X.|Xspotles|
|00001340| 73 3a 0a 58 09 72 6d 20 | 2d 66 20 63 6f 72 65 20 |s:.X.rm |-f core |
|00001350| 6c 62 20 2a 2e 6f 0a 58 | 0a 58 6c 6f 76 65 3a 0a |lb *.o.X|.Xlove:.|
|00001360| 58 09 40 65 63 68 6f 20 | 27 6e 6f 74 20 77 61 72 |X.@echo |'not war|
|00001370| 3f 27 0a 58 0a 58 6a 6f | 6b 65 3a 20 0a 58 09 40 |?'.X.Xjo|ke: .X.@|
|00001380| 65 63 68 6f 20 27 57 68 | 61 74 20 64 6f 20 79 6f |echo 'Wh|at do yo|
|00001390| 75 20 77 61 6e 74 20 66 | 6f 72 20 6e 6f 74 68 69 |u want f|or nothi|
|000013a0| 6e 67 3f 27 0a 58 0a 58 | 73 68 61 72 3a 20 0a 58 |ng?'.X.X|shar: .X|
|000013b0| 09 40 73 68 61 72 20 4d | 61 6b 65 66 69 6c 65 20 |.@shar M|akefile |
|000013c0| 52 45 41 44 4d 45 20 49 | 4e 53 54 41 4c 4c 20 4f |README I|NSTALL O|
|000013d0| 54 48 45 52 5f 53 45 52 | 56 45 52 53 20 24 28 4d |THER_SER|VERS $(M|
|000013e0| 41 4e 53 29 20 24 28 53 | 52 43 53 29 20 3e 6c 62 |ANS) $(S|RCS) >lb|
|000013f0| 2e 73 68 61 72 0a 58 09 | 40 63 68 6d 6f 64 20 61 |.shar.X.|@chmod a|
|00001400| 2b 72 20 6c 62 2e 73 68 | 61 72 0a 58 09 40 65 63 |+r lb.sh|ar.X.@ec|
|00001410| 68 6f 20 22 53 48 41 52 | 20 66 69 6c 65 20 6c 62 |ho "SHAR| file lb|
|00001420| 2e 73 68 61 72 20 63 72 | 65 61 74 65 64 2e 22 0a |.shar cr|eated.".|
|00001430| 58 0a 58 68 61 72 64 63 | 6f 70 79 3a 0a 58 09 6c |X.Xhardc|opy:.X.l|
|00001440| 70 72 20 52 45 41 44 4d | 45 20 49 4e 53 54 41 4c |pr READM|E INSTAL|
|00001450| 4c 20 4f 54 48 45 52 5f | 53 45 52 56 45 52 53 20 |L OTHER_|SERVERS |
|00001460| 24 28 53 52 43 53 29 0a | 58 09 24 28 50 52 49 4e |$(SRCS).|X.$(PRIN|
|00001470| 54 29 20 24 28 4d 41 4e | 53 29 20 7c 20 6c 70 72 |T) $(MAN|S) | lpr|
|00001480| 20 2d 74 0a 58 0a 58 23 | 20 44 65 70 65 6e 64 65 | -t.X.X#| Depende|
|00001490| 6e 63 69 65 73 0a 58 6c | 62 6d 61 69 6e 2e 6f 3a |ncies.Xl|bmain.o:|
|000014a0| 20 09 6c 62 6d 61 69 6e | 2e 63 20 73 74 61 74 73 | .lbmain|.c stats|
|000014b0| 2e 68 20 63 6f 6e 66 69 | 67 2e 68 0a 58 73 74 5f |.h confi|g.h.Xst_|
|000014c0| 73 65 6e 64 72 65 63 76 | 2e 6f 3a 09 73 74 5f 73 |sendrecv|.o:.st_s|
|000014d0| 65 6e 64 72 65 63 76 2e | 63 20 73 74 61 74 73 2e |endrecv.|c stats.|
|000014e0| 68 20 63 6f 6e 66 69 67 | 2e 68 0a 58 72 73 64 63 |h config|.h.Xrsdc|
|000014f0| 6c 6e 74 2e 6f 3a 09 72 | 73 64 63 6c 6e 74 2e 63 |lnt.o:.r|sdclnt.c|
|00001500| 20 63 6f 6e 66 69 67 2e | 68 0a 45 4e 44 5f 4f 46 | config.|h.END_OF|
|00001510| 5f 46 49 4c 45 0a 20 20 | 69 66 20 74 65 73 74 20 |_FILE. |if test |
|00001520| 31 30 36 39 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 |1069 -ne| `wc -c |
|00001530| 3c 27 4d 61 6b 65 66 69 | 6c 65 27 60 3b 20 74 68 |<'Makefi|le'`; th|
|00001540| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|00001550| 3a 20 5c 22 27 4d 61 6b | 65 66 69 6c 65 27 5c 22 |: \"'Mak|efile'\"|
|00001560| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|00001570| 72 6f 6e 67 20 73 69 7a | 65 21 0a 20 20 66 69 0a |rong siz|e!. fi.|
|00001580| 20 20 23 20 65 6e 64 20 | 6f 66 20 27 4d 61 6b 65 | # end |of 'Make|
|00001590| 66 69 6c 65 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |file'.fi|.if test|
|000015a0| 20 2d 66 20 27 4f 54 48 | 45 52 5f 53 45 52 56 45 | -f 'OTH|ER_SERVE|
|000015b0| 52 53 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |RS' -a "|${1}" !=|
|000015c0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|000015d0| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|000015e0| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|000015f0| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 4f 54 48 |ting fil|e \"'OTH|
|00001600| 45 52 5f 53 45 52 56 45 | 52 53 27 5c 22 0a 65 6c |ER_SERVE|RS'\".el|
|00001610| 73 65 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |se. ech|o shar: |
|00001620| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 4f 54 |Extracti|ng \"'OT|
|00001630| 48 45 52 5f 53 45 52 56 | 45 52 53 27 5c 22 20 5c |HER_SERV|ERS'\" \|
|00001640| 28 31 32 32 34 20 63 68 | 61 72 61 63 74 65 72 73 |(1224 ch|aracters|
|00001650| 5c 29 0a 20 20 73 65 64 | 20 22 73 2f 5e 58 2f 2f |\). sed| "s/^X//|
|00001660| 22 20 3e 27 4f 54 48 45 | 52 5f 53 45 52 56 45 52 |" >'OTHE|R_SERVER|
|00001670| 53 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |S' <<'EN|D_OF_FIL|
|00001680| 45 27 0a 58 0a 58 57 48 | 41 54 3f 20 20 4e 6f 20 |E'.X.XWH|AT? No |
|00001690| 72 73 74 61 74 64 3f 20 | 20 4e 6f 20 73 74 61 74 |rstatd? | No stat|
|000016a0| 73 72 76 3f 20 20 46 65 | 61 72 20 6e 6f 74 2e 0a |srv? Fe|ar not..|
|000016b0| 58 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X-------|--------|
|000016c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 0a 58 4c |--------|---.X.XL|
|000016e0| 42 20 69 73 20 73 69 6d | 70 6c 65 20 65 6e 6f 75 |B is sim|ple enou|
|000016f0| 67 68 20 74 6f 20 6d 6f | 64 69 66 79 20 66 6f 72 |gh to mo|dify for|
|00001700| 20 75 73 65 20 77 69 74 | 68 20 6f 74 68 65 72 20 | use wit|h other |
|00001710| 73 65 72 76 65 72 73 2e | 20 20 54 68 69 73 20 70 |servers.| This p|
|00001720| 61 63 6b 61 67 65 0a 58 | 69 6e 63 6c 75 64 65 73 |ackage.X|includes|
|00001730| 20 63 6c 69 65 6e 74 20 | 70 72 6f 67 72 61 6d 73 | client |programs|
|00001740| 20 74 6f 20 74 61 6c 6b | 20 74 6f 20 72 73 74 61 | to talk| to rsta|
|00001750| 74 64 20 6f 72 20 73 74 | 61 74 73 72 76 2c 20 61 |td or st|atsrv, a|
|00001760| 6e 64 20 74 68 65 73 65 | 20 63 6c 69 65 6e 74 73 |nd these| clients|
|00001770| 0a 58 63 61 6e 20 62 65 | 20 75 73 65 64 20 61 73 |.Xcan be| used as|
|00001780| 20 74 65 6d 70 6c 61 74 | 65 73 20 66 6f 72 20 6f | templat|es for o|
|00001790| 74 68 65 72 73 2e 0a 58 | 0a 58 73 74 61 74 73 72 |thers..X|.Xstatsr|
|000017a0| 76 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 20 66 |v is ava|ilable f|
|000017b0| 72 6f 6d 20 63 6f 6d 70 | 2e 73 6f 75 72 63 65 73 |rom comp|.sources|
|000017c0| 2e 75 6e 69 78 20 61 72 | 63 68 69 76 65 20 73 65 |.unix ar|chive se|
|000017d0| 72 76 65 72 73 2e 0a 58 | 0a 58 2d 2d 2d 2d 2d 2d |rvers..X|.X------|
|000017e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001800| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001820| 2d 2d 2d 0a 58 46 72 6f | 6d 20 74 68 65 20 53 75 |---.XFro|m the Su|
|00001830| 6e 4f 53 20 72 73 74 61 | 74 64 20 6d 61 6e 75 61 |nOS rsta|td manua|
|00001840| 6c 20 70 61 67 65 3a 0a | 58 0a 58 20 20 72 73 74 |l page:.|X.X rst|
|00001850| 61 74 64 20 69 73 20 61 | 20 20 73 65 72 76 65 72 |atd is a| server|
|00001860| 20 20 77 68 69 63 68 20 | 20 72 65 74 75 72 6e 73 | which | returns|
|00001870| 20 20 70 65 72 66 6f 72 | 6d 61 6e 63 65 20 20 73 | perfor|mance s|
|00001880| 74 61 74 69 73 74 69 63 | 73 20 6f 62 74 61 69 6e |tatistic|s obtain|
|00001890| 65 64 20 20 0a 58 20 20 | 66 72 6f 6d 20 74 68 65 |ed .X |from the|
|000018a0| 20 6b 65 72 6e 65 6c 2e | 20 20 54 68 65 20 72 73 | kernel.| The rs|
|000018b0| 74 61 74 64 20 64 61 65 | 6d 6f 6e 20 69 73 20 6e |tatd dae|mon is n|
|000018c0| 6f 72 6d 61 6c 6c 79 20 | 69 6e 76 6f 6b 65 64 20 |ormally |invoked |
|000018d0| 62 79 20 69 6e 65 74 64 | 28 38 43 29 2e 0a 58 0a |by inetd|(8C)..X.|
|000018e0| 58 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X-------|--------|
|000018f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001900| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001910| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001920| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 58 54 68 65 20 |--------|--.XThe |
|00001930| 6f 70 65 6e 69 6e 67 20 | 70 61 72 61 67 72 61 70 |opening |paragrap|
|00001940| 68 20 66 72 6f 6d 20 44 | 61 76 65 20 43 75 72 72 |h from D|ave Curr|
|00001950| 79 27 73 20 73 74 61 74 | 73 72 76 20 52 45 41 44 |y's stat|srv READ|
|00001960| 4d 45 20 66 69 6c 65 3a | 0a 58 0a 58 20 20 54 68 |ME file:|.X.X Th|
|00001970| 69 73 20 69 73 20 61 20 | 72 65 6d 6f 74 65 20 73 |is is a |remote s|
|00001980| 74 61 74 69 73 74 69 63 | 73 20 73 65 72 76 65 72 |tatistic|s server|
|00001990| 20 61 73 20 64 65 73 63 | 72 69 62 65 64 20 69 6e | as desc|ribed in|
|000019a0| 20 52 46 43 39 39 36 2c | 20 22 53 74 61 74 69 73 | RFC996,| "Statis|
|000019b0| 74 69 63 73 0a 58 20 20 | 53 65 72 76 65 72 22 2c |tics.X |Server",|
|000019c0| 20 44 2e 20 4c 2e 20 4d | 69 6c 6c 73 2c 20 46 65 | D. L. M|ills, Fe|
|000019d0| 62 72 75 61 72 79 20 31 | 39 38 37 2e 20 20 57 69 |bruary 1|987. Wi|
|000019e0| 74 68 20 69 74 2c 20 79 | 6f 75 20 63 61 6e 20 63 |th it, y|ou can c|
|000019f0| 6f 6c 6c 65 63 74 20 74 | 68 69 6e 67 73 0a 58 20 |ollect t|hings.X |
|00001a00| 20 6c 69 6b 65 20 6c 6f | 61 64 20 61 76 65 72 61 | like lo|ad avera|
|00001a10| 67 65 73 2c 20 6e 75 6d | 62 65 72 20 6f 66 20 75 |ges, num|ber of u|
|00001a20| 73 65 72 73 2c 20 75 70 | 74 69 6d 65 2c 20 61 6e |sers, up|time, an|
|00001a30| 64 20 6e 65 74 77 6f 72 | 6b 20 73 74 61 74 69 73 |d networ|k statis|
|00001a40| 74 69 63 73 0a 58 20 20 | 66 72 6f 6d 20 72 65 6d |tics.X |from rem|
|00001a50| 6f 74 65 20 6d 61 63 68 | 69 6e 65 73 20 65 61 73 |ote mach|ines eas|
|00001a60| 69 6c 79 2e 20 20 28 44 | 61 76 69 64 20 43 75 72 |ily. (D|avid Cur|
|00001a70| 72 79 2c 20 64 61 76 79 | 40 72 69 61 63 73 2e 65 |ry, davy|@riacs.e|
|00001a80| 64 75 29 0a 58 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |du).X---|--------|
|00001a90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001aa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ab0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ac0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 58 |--------|------.X|
|00001ad0| 0a 58 20 20 20 20 20 20 | 5e 44 65 6b 65 20 4b 61 |.X |^Deke Ka|
|00001ae0| 73 73 61 62 69 61 6e 2c | 20 20 20 64 65 6b 65 40 |ssabian,| deke@|
|00001af0| 65 65 2e 72 6f 63 68 65 | 73 74 65 72 2e 65 64 75 |ee.roche|ster.edu|
|00001b00| 20 20 20 6f 72 20 20 20 | 75 72 2d 76 61 6c 68 61 | or |ur-valha|
|00001b10| 6c 6c 61 21 64 65 6b 65 | 0a 58 20 20 20 55 6e 69 |lla!deke|.X Uni|
|00001b20| 76 20 6f 66 20 52 6f 63 | 68 65 73 74 65 72 2c 20 |v of Roc|hester, |
|00001b30| 44 65 70 74 20 6f 66 20 | 45 45 2c 20 52 6f 63 68 |Dept of |EE, Roch|
|00001b40| 65 73 74 65 72 2c 20 4e | 59 20 31 34 36 32 37 20 |ester, N|Y 14627 |
|00001b50| 20 20 20 20 28 2b 31 20 | 37 31 36 2d 32 37 35 2d | (+1 |716-275-|
|00001b60| 33 31 30 36 29 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |3106).EN|D_OF_FIL|
|00001b70| 45 0a 20 20 69 66 20 74 | 65 73 74 20 31 32 32 34 |E. if t|est 1224|
|00001b80| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 4f 54 | -ne `wc| -c <'OT|
|00001b90| 48 45 52 5f 53 45 52 56 | 45 52 53 27 60 3b 20 74 |HER_SERV|ERS'`; t|
|00001ba0| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00001bb0| 72 3a 20 5c 22 27 4f 54 | 48 45 52 5f 53 45 52 56 |r: \"'OT|HER_SERV|
|00001bc0| 45 52 53 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |ERS'\" u|npacked |
|00001bd0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00001be0| 0a 20 20 66 69 0a 20 20 | 23 20 65 6e 64 20 6f 66 |. fi. |# end of|
|00001bf0| 20 27 4f 54 48 45 52 5f | 53 45 52 56 45 52 53 27 | 'OTHER_|SERVERS'|
|00001c00| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00001c10| 52 45 41 44 4d 45 27 20 | 2d 61 20 22 24 7b 31 7d |README' |-a "${1}|
|00001c20| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00001c30| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00001c40| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00001c50| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00001c60| 27 52 45 41 44 4d 45 27 | 5c 22 0a 65 6c 73 65 0a |'README'|\".else.|
|00001c70| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 | echo s|har: Ext|
|00001c80| 72 61 63 74 69 6e 67 20 | 5c 22 27 52 45 41 44 4d |racting |\"'READM|
|00001c90| 45 27 5c 22 20 5c 28 32 | 39 33 30 20 63 68 61 72 |E'\" \(2|930 char|
|00001ca0| 61 63 74 65 72 73 5c 29 | 0a 20 20 73 65 64 20 22 |acters\)|. sed "|
|00001cb0| 73 2f 5e 58 2f 2f 22 20 | 3e 27 52 45 41 44 4d 45 |s/^X//" |>'README|
|00001cc0| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|00001cd0| 27 0a 58 09 09 4c 42 20 | 2d 20 54 68 65 20 4c 6f |'.X..LB |- The Lo|
|00001ce0| 61 64 20 42 61 6c 61 6e | 63 65 72 20 28 76 65 72 |ad Balan|cer (ver|
|00001cf0| 73 69 6f 6e 20 31 2e 32 | 29 0a 58 09 09 09 62 79 |sion 1.2|).X...by|
|00001d00| 20 44 69 6b 72 61 6e 20 | 4b 61 73 73 61 62 69 61 | Dikran |Kassabia|
|00001d10| 6e 0a 58 0a 58 09 09 20 | 20 20 20 20 20 55 6e 69 |n.X.X.. | Uni|
|00001d20| 76 65 72 73 69 74 79 20 | 4f 66 20 52 6f 63 68 65 |versity |Of Roche|
|00001d30| 73 74 65 72 0a 58 09 09 | 44 65 70 61 72 74 6d 65 |ster.X..|Departme|
|00001d40| 6e 74 20 6f 66 20 45 6c | 65 63 74 72 69 63 61 6c |nt of El|ectrical|
|00001d50| 20 45 6e 67 69 6e 65 65 | 72 69 6e 67 0a 58 09 09 | Enginee|ring.X..|
|00001d60| 09 4d 61 72 63 68 20 33 | 2c 20 31 39 39 31 0a 58 |.March 3|, 1991.X|
|00001d70| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00001d80| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00001d90| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00001da0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00001db0| 5f 5f 5f 5f 5f 5f 5f 0a | 58 0a 58 57 68 61 74 20 |_______.|X.XWhat |
|00001dc0| 69 73 20 4c 42 3f 0a 58 | 0a 58 09 4c 42 20 69 73 |is LB?.X|.X.LB is|
|00001dd0| 20 61 20 6c 6f 61 64 2d | 62 61 6c 61 6e 63 69 6e | a load-|balancin|
|00001de0| 67 20 70 72 6f 67 72 61 | 6d 2e 20 20 49 74 20 63 |g progra|m. It c|
|00001df0| 61 6e 20 63 68 65 63 6b | 20 74 68 65 20 63 75 72 |an check| the cur|
|00001e00| 72 65 6e 74 0a 58 09 6c | 6f 61 64 20 6f 6e 20 76 |rent.X.l|oad on v|
|00001e10| 61 72 69 6f 75 73 20 6d | 61 63 68 69 6e 65 73 20 |arious m|achines |
|00001e20| 6f 6e 20 61 20 4c 41 4e | 2c 20 61 6e 64 20 66 69 |on a LAN|, and fi|
|00001e30| 6e 64 20 74 68 65 20 62 | 65 73 74 20 63 61 6e 64 |nd the b|est cand|
|00001e40| 69 64 61 74 65 0a 58 09 | 6d 61 63 68 69 6e 65 20 |idate.X.|machine |
|00001e50| 74 6f 20 61 63 63 65 70 | 74 20 61 20 6e 65 77 20 |to accep|t a new |
|00001e60| 6a 6f 62 20 74 6f 20 69 | 74 27 73 20 72 75 6e 20 |job to i|t's run |
|00001e70| 71 75 65 75 65 2e 20 20 | 41 64 64 69 74 69 6f 6e |queue. |Addition|
|00001e80| 61 6c 6c 79 2c 0a 58 09 | 69 74 20 63 61 6e 20 73 |ally,.X.|it can s|
|00001e90| 65 6e 64 20 74 68 65 20 | 6a 6f 62 20 74 6f 20 74 |end the |job to t|
|00001ea0| 68 61 74 20 6d 61 63 68 | 69 6e 65 20 75 73 69 6e |hat mach|ine usin|
|00001eb0| 67 20 72 73 68 28 31 29 | 2e 0a 58 0a 58 09 4c 42 |g rsh(1)|..X.X.LB|
|00001ec0| 20 77 6f 72 6b 73 20 62 | 65 73 74 20 69 6e 20 68 | works b|est in h|
|00001ed0| 6f 6d 6f 67 65 6e 65 6f | 75 73 20 65 6e 76 69 72 |omogeneo|us envir|
|00001ee0| 6f 6e 6d 65 6e 74 73 2c | 20 77 68 65 72 65 20 65 |onments,| where e|
|00001ef0| 61 63 68 20 6d 61 63 68 | 69 6e 65 0a 58 09 68 61 |ach mach|ine.X.ha|
|00001f00| 73 20 73 69 6d 69 6c 61 | 72 20 6f 72 20 69 64 65 |s simila|r or ide|
|00001f10| 6e 74 69 63 61 6c 20 66 | 69 6c 65 20 73 79 73 74 |ntical f|ile syst|
|00001f20| 65 6d 20 6c 61 79 6f 75 | 74 2e 20 20 48 65 72 65 |em layou|t. Here|
|00001f30| 20 61 74 20 74 68 65 0a | 58 09 55 6e 69 76 65 72 | at the.|X.Univer|
|00001f40| 73 69 74 79 20 6f 66 20 | 52 6f 63 68 65 73 74 65 |sity of |Rocheste|
|00001f50| 72 20 44 65 70 61 72 74 | 6d 65 6e 74 20 6f 66 20 |r Depart|ment of |
|00001f60| 45 6c 65 63 74 72 69 63 | 61 6c 20 45 6e 67 69 6e |Electric|al Engin|
|00001f70| 65 65 72 69 6e 67 2c 0a | 58 09 77 65 20 68 61 76 |eering,.|X.we hav|
|00001f80| 65 20 6e 65 61 72 6c 79 | 20 37 30 20 53 55 4e 20 |e nearly| 70 SUN |
|00001f90| 63 6f 6d 70 75 74 65 72 | 73 2c 20 77 68 69 63 68 |computer|s, which|
|00001fa0| 20 73 68 61 72 65 20 68 | 6f 6d 65 2d 64 69 72 65 | share h|ome-dire|
|00001fb0| 63 74 6f 72 69 65 73 0a | 58 09 61 6e 64 20 6c 6f |ctories.|X.and lo|
|00001fc0| 63 61 6c 20 62 69 6e 61 | 72 69 65 73 2e 20 20 57 |cal bina|ries. W|
|00001fd0| 68 65 6e 20 61 20 75 73 | 65 72 20 73 69 74 74 69 |hen a us|er sitti|
|00001fe0| 6e 67 20 61 74 20 61 20 | 73 6d 61 6c 6c 20 77 6f |ng at a |small wo|
|00001ff0| 72 6b 73 74 61 74 69 6f | 6e 0a 58 09 77 61 6e 74 |rkstatio|n.X.want|
|00002000| 73 20 74 6f 20 72 75 6e | 20 61 20 63 6f 6d 70 75 |s to run| a compu|
|00002010| 74 65 20 69 6e 74 65 6e | 73 69 76 65 20 6a 6f 62 |te inten|sive job|
|00002020| 2c 20 4c 42 20 68 65 6c | 70 73 20 74 6f 20 66 69 |, LB hel|ps to fi|
|00002030| 6e 64 20 61 20 6d 61 63 | 68 69 6e 65 0a 58 09 6f |nd a mac|hine.X.o|
|00002040| 6e 20 74 68 65 20 6e 65 | 74 77 6f 72 6b 20 74 68 |n the ne|twork th|
|00002050| 61 74 20 68 61 73 20 61 | 20 6c 6f 77 20 6c 6f 61 |at has a| low loa|
|00002060| 64 2c 20 6b 6e 6f 77 69 | 6e 67 20 74 68 61 74 20 |d, knowi|ng that |
|00002070| 74 68 61 74 20 6d 61 63 | 68 69 6e 65 0a 58 09 77 |that mac|hine.X.w|
|00002080| 69 6c 6c 20 61 6c 73 6f | 20 68 61 76 65 20 68 69 |ill also| have hi|
|00002090| 73 2f 68 65 72 20 68 6f | 6d 65 20 64 69 72 65 63 |s/her ho|me direc|
|000020a0| 74 6f 72 79 20 61 6e 64 | 20 72 65 71 75 69 72 65 |tory and| require|
|000020b0| 64 20 70 72 6f 67 72 61 | 6d 2e 0a 58 0a 58 48 6f |d progra|m..X.XHo|
|000020c0| 77 20 74 6f 20 69 6e 73 | 74 61 6c 6c 20 4c 42 3a |w to ins|tall LB:|
|000020d0| 0a 58 0a 58 09 41 20 73 | 65 70 61 72 61 74 65 20 |.X.X.A s|eparate |
|000020e0| 66 69 6c 65 2c 20 63 61 | 6c 6c 65 64 20 49 4e 53 |file, ca|lled INS|
|000020f0| 54 41 4c 4c 2c 20 69 73 | 20 69 6e 63 6c 75 64 65 |TALL, is| include|
|00002100| 64 20 77 69 74 68 20 64 | 65 74 61 69 6c 65 64 0a |d with d|etailed.|
|00002110| 58 09 69 6e 73 74 61 6c | 6c 61 74 69 6f 6e 20 6e |X.instal|lation n|
|00002120| 6f 74 65 73 2c 20 62 75 | 74 20 62 72 69 65 66 6c |otes, bu|t briefl|
|00002130| 79 2e 2e 2e 0a 58 0a 58 | 09 54 6f 20 69 6e 73 74 |y....X.X|.To inst|
|00002140| 61 6c 6c 20 6c 62 2c 20 | 75 6e 70 61 63 6b 20 74 |all lb, |unpack t|
|00002150| 68 65 20 73 68 61 72 20 | 66 69 6c 65 20 28 68 6d |he shar |file (hm|
|00002160| 6d 2c 20 49 20 67 75 65 | 73 73 20 79 6f 75 27 76 |m, I gue|ss you'v|
|00002170| 65 20 61 6c 72 65 61 64 | 79 0a 58 09 64 6f 6e 65 |e alread|y.X.done|
|00002180| 20 74 68 61 74 20 3a 2d | 29 2c 20 64 65 63 69 64 | that :-|), decid|
|00002190| 65 20 77 68 69 63 68 20 | 73 74 61 74 69 73 74 69 |e which |statisti|
|000021a0| 63 73 20 73 65 72 76 65 | 72 20 79 6f 75 20 77 61 |cs serve|r you wa|
|000021b0| 6e 74 20 74 6f 20 75 73 | 65 0a 58 09 28 72 73 74 |nt to us|e.X.(rst|
|000021c0| 61 74 64 20 6f 72 20 73 | 74 61 74 73 72 76 29 20 |atd or s|tatsrv) |
|000021d0| 61 6e 64 20 6d 61 6b 65 | 20 74 68 65 20 74 77 6f |and make| the two|
|000021e0| 20 73 6d 61 6c 6c 20 61 | 64 6a 75 73 74 6d 65 6e | small a|djustmen|
|000021f0| 74 73 20 74 6f 20 74 68 | 65 0a 58 09 4d 61 6b 65 |ts to th|e.X.Make|
|00002200| 66 69 6c 65 2c 20 74 68 | 65 6e 20 74 79 70 65 20 |file, th|en type |
|00002210| 22 6d 61 6b 65 22 2e 20 | 20 54 68 65 20 70 72 6f |"make". | The pro|
|00002220| 67 72 61 6d 20 27 6c 62 | 27 20 77 69 6c 6c 20 62 |gram 'lb|' will b|
|00002230| 65 20 70 72 6f 64 75 63 | 65 64 2e 0a 58 09 54 68 |e produc|ed..X.Th|
|00002240| 65 6e 20 6d 6f 76 65 20 | 27 6c 62 27 20 74 6f 20 |en move |'lb' to |
|00002250| 61 6e 20 61 70 70 72 6f | 70 72 69 61 74 65 20 64 |an appro|priate d|
|00002260| 69 72 65 63 74 6f 72 79 | 20 28 2f 75 73 72 2f 6c |irectory| (/usr/l|
|00002270| 6f 63 61 6c 2f 62 69 6e | 29 2c 0a 58 09 65 64 69 |ocal/bin|),.X.edi|
|00002280| 74 20 61 6e 64 20 69 6e | 73 74 61 6c 6c 20 74 68 |t and in|stall th|
|00002290| 65 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |e config|uration |
|000022a0| 66 69 6c 65 2c 20 61 6e | 64 20 79 6f 75 27 72 65 |file, an|d you're|
|000022b0| 20 72 65 61 64 79 20 74 | 6f 20 0a 58 09 67 6f 2e | ready t|o .X.go.|
|000022c0| 20 20 54 68 65 20 72 65 | 6c 65 76 61 6e 74 20 6d | The re|levant m|
|000022d0| 61 6e 20 70 61 67 65 73 | 20 61 72 65 20 69 6e 63 |an pages| are inc|
|000022e0| 6c 75 64 65 64 2c 20 61 | 6e 64 20 63 61 6e 20 62 |luded, a|nd can b|
|000022f0| 65 20 69 6e 73 74 61 6c | 6c 65 64 20 0a 58 09 69 |e instal|led .X.i|
|00002300| 6e 20 79 6f 75 72 20 6c | 6f 63 61 6c 20 6d 61 6e |n your l|ocal man|
|00002310| 20 70 61 67 65 20 64 69 | 72 65 63 74 6f 72 79 2e | page di|rectory.|
|00002320| 0a 58 0a 58 48 6f 77 20 | 74 6f 20 75 73 65 20 4c |.X.XHow |to use L|
|00002330| 42 3a 0a 58 0a 58 09 54 | 6f 20 75 73 65 20 6c 62 |B:.X.X.T|o use lb|
|00002340| 2c 20 6a 75 73 74 20 74 | 79 70 65 20 27 6c 62 20 |, just t|ype 'lb |
|00002350| 3c 63 6f 6d 6d 61 6e 64 | 2d 6c 69 6e 65 3e 27 20 |<command|-line>' |
|00002360| 61 74 20 79 6f 75 72 20 | 70 72 6f 6d 70 74 2c 20 |at your |prompt, |
|00002370| 77 68 65 72 65 0a 58 09 | 3c 63 6f 6d 6d 61 6e 64 |where.X.|<command|
|00002380| 20 6c 69 6e 65 3e 20 69 | 73 20 73 6f 6d 65 20 73 | line> i|s some s|
|00002390| 68 65 6c 6c 20 63 6f 6d | 6d 61 6e 64 20 79 6f 75 |hell com|mand you|
|000023a0| 20 6d 69 67 68 74 20 6e | 6f 72 6d 61 6c 6c 79 20 | might n|ormally |
|000023b0| 74 79 70 65 0a 58 09 61 | 74 20 79 6f 75 72 20 70 |type.X.a|t your p|
|000023c0| 72 6f 6d 70 74 2e 20 20 | 4c 42 20 77 69 6c 6c 20 |rompt. |LB will |
|000023d0| 72 65 61 64 20 61 20 63 | 6f 6e 66 69 67 75 72 61 |read a c|onfigura|
|000023e0| 74 69 6f 6e 20 66 69 6c | 65 20 74 68 61 74 20 74 |tion fil|e that t|
|000023f0| 65 6c 6c 73 0a 58 09 69 | 74 20 61 62 6f 75 74 20 |ells.X.i|t about |
|00002400| 74 68 65 20 63 61 6e 64 | 69 64 61 74 65 20 6d 61 |the cand|idate ma|
|00002410| 63 68 69 6e 65 73 2c 20 | 73 65 6c 65 63 74 20 6f |chines, |select o|
|00002420| 6e 65 2c 20 61 6e 64 20 | 74 68 65 6e 20 75 73 65 |ne, and |then use|
|00002430| 20 72 73 68 28 31 29 0a | 58 09 74 6f 20 72 75 6e | rsh(1).|X.to run|
|00002440| 20 3c 63 6f 6d 6d 61 6e | 64 2d 6c 69 6e 65 3e 20 | <comman|d-line> |
|00002450| 6f 6e 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |on the s|pecified|
|00002460| 20 6d 61 63 68 69 6e 65 | 2e 0a 58 0a 58 09 53 65 | machine|..X.X.Se|
|00002470| 65 20 74 68 65 20 6d 61 | 6e 20 70 61 67 65 20 66 |e the ma|n page f|
|00002480| 6f 72 20 6c 62 28 31 29 | 20 66 6f 72 20 6d 6f 72 |or lb(1)| for mor|
|00002490| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2e 0a 58 |e inform|ation..X|
|000024a0| 0a 58 53 70 65 63 69 61 | 6c 20 74 68 61 6e 6b 73 |.XSpecia|l thanks|
|000024b0| 20 74 6f 20 44 61 76 65 | 20 43 75 72 72 79 20 28 | to Dave| Curry (|
|000024c0| 64 61 76 79 40 72 69 61 | 63 73 2e 65 64 75 29 2c |davy@ria|cs.edu),|
|000024d0| 20 77 68 6f 73 65 20 73 | 74 61 74 73 72 76 20 73 | whose s|tatsrv s|
|000024e0| 65 72 76 65 72 20 63 61 | 6e 0a 58 62 65 20 75 73 |erver ca|n.Xbe us|
|000024f0| 65 64 20 61 73 20 61 6e | 20 6f 70 74 69 6f 6e 20 |ed as an| option |
|00002500| 74 6f 20 74 68 65 20 72 | 70 63 2e 72 73 74 61 74 |to the r|pc.rstat|
|00002510| 64 20 73 65 72 76 65 72 | 2e 20 20 48 65 20 77 61 |d server|. He wa|
|00002520| 73 20 6e 69 63 65 20 65 | 6e 6f 75 67 68 20 74 6f |s nice e|nough to|
|00002530| 20 6c 65 74 0a 58 6d 65 | 20 69 6e 63 6c 75 64 65 | let.Xme| include|
|00002540| 20 73 6f 6d 65 20 6f 66 | 20 68 69 73 20 63 6f 64 | some of| his cod|
|00002550| 65 20 77 69 74 68 20 74 | 68 69 73 20 70 61 63 6b |e with t|his pack|
|00002560| 61 67 65 2e 20 20 54 68 | 65 20 66 69 6c 65 73 20 |age. Th|e files |
|00002570| 73 74 5f 73 65 6e 64 72 | 65 63 76 2e 63 0a 58 61 |st_sendr|ecv.c.Xa|
|00002580| 6e 64 20 73 74 61 74 73 | 2e 68 20 61 72 65 20 64 |nd stats|.h are d|
|00002590| 69 72 65 63 74 6c 79 20 | 66 72 6f 6d 20 68 69 73 |irectly |from his|
|000025a0| 20 73 74 61 74 73 72 76 | 20 64 69 73 74 72 69 62 | statsrv| distrib|
|000025b0| 75 74 69 6f 6e 2e 0a 58 | 0a 58 54 68 69 73 20 76 |ution..X|.XThis v|
|000025c0| 65 72 73 69 6f 6e 20 6f | 66 20 6c 62 20 68 61 73 |ersion o|f lb has|
|000025d0| 20 62 65 65 6e 20 74 65 | 73 74 65 64 20 69 6e 20 | been te|sted in |
|000025e0| 6f 6e 6c 79 20 61 20 66 | 65 77 20 65 6e 76 69 72 |only a f|ew envir|
|000025f0| 6f 6e 6d 65 6e 74 73 2e | 20 20 49 74 20 77 6f 72 |onments.| It wor|
|00002600| 6b 73 20 6f 6e 20 0a 58 | 6f 75 72 20 53 75 6e 2d |ks on .X|our Sun-|
|00002610| 33 20 61 6e 64 20 53 75 | 6e 2d 34 20 63 6f 6d 70 |3 and Su|n-4 comp|
|00002620| 75 74 65 72 73 20 75 6e | 64 65 72 20 53 75 6e 4f |uters un|der SunO|
|00002630| 53 20 34 2e 31 2e 20 20 | 49 74 20 61 6c 73 6f 20 |S 4.1. |It also |
|00002640| 77 6f 72 6b 73 20 6f 6e | 20 6f 75 72 20 36 38 30 |works on| our 680|
|00002650| 33 30 0a 58 4e 65 58 54 | 20 43 75 62 65 73 20 75 |30.XNeXT| Cubes u|
|00002660| 6e 64 65 72 20 31 2e 30 | 61 20 4f 53 2e 20 20 50 |nder 1.0|a OS. P|
|00002670| 72 65 76 69 6f 75 73 20 | 76 65 72 73 69 6f 6e 73 |revious |versions|
|00002680| 20 72 61 6e 20 6f 6e 20 | 6f 75 72 20 56 61 78 20 | ran on |our Vax |
|00002690| 31 31 2f 37 35 30 20 75 | 6e 64 65 72 20 0a 58 4d |11/750 u|nder .XM|
|000026a0| 74 2e 58 69 6e 75 20 42 | 53 44 20 28 62 75 74 20 |t.Xinu B|SD (but |
|000026b0| 74 68 61 74 20 6d 61 63 | 68 69 6e 65 20 68 61 73 |that mac|hine has|
|000026c0| 20 73 69 6e 63 65 20 62 | 65 65 6e 20 72 65 74 69 | since b|een reti|
|000026d0| 72 65 64 29 2e 20 20 42 | 65 79 6f 6e 64 20 74 68 |red). B|eyond th|
|000026e0| 61 74 20 49 20 64 6f 6e | 27 74 20 0a 58 6b 6e 6f |at I don|'t .Xkno|
|000026f0| 77 2e 20 20 49 66 20 79 | 6f 75 20 70 6f 72 74 20 |w. If y|ou port |
|00002700| 69 74 20 74 6f 20 6f 74 | 68 65 72 20 6f 70 65 72 |it to ot|her oper|
|00002710| 61 74 69 6e 67 20 73 79 | 73 74 65 6d 73 20 61 6e |ating sy|stems an|
|00002720| 64 20 68 61 72 64 77 61 | 72 65 2c 20 73 65 6e 64 |d hardwa|re, send|
|00002730| 20 6d 65 20 74 68 65 20 | 0a 58 64 69 66 66 73 20 | me the |.Xdiffs |
|00002740| 73 6f 20 49 20 63 61 6e | 20 69 6e 63 6c 75 64 65 |so I can| include|
|00002750| 20 74 68 65 6d 20 69 6e | 20 74 68 65 20 6e 65 78 | them in| the nex|
|00002760| 74 20 72 65 6c 65 61 73 | 65 20 28 69 66 20 74 68 |t releas|e (if th|
|00002770| 65 72 65 20 69 73 20 6f | 6e 65 29 2e 0a 58 0a 58 |ere is o|ne)..X.X|
|00002780| 49 66 20 79 6f 75 20 68 | 61 76 65 20 63 6f 6d 6d |If you h|ave comm|
|00002790| 65 6e 74 73 2f 66 69 78 | 65 73 2f 62 75 67 2d 72 |ents/fix|es/bug-r|
|000027a0| 65 70 6f 72 74 73 2f 66 | 6c 61 6d 65 73 2c 20 73 |eports/f|lames, s|
|000027b0| 65 6e 64 20 27 65 6d 20 | 74 6f 20 6d 65 20 61 74 |end 'em |to me at|
|000027c0| 0a 58 64 65 6b 65 40 65 | 65 2e 72 6f 63 68 65 73 |.Xdeke@e|e.roches|
|000027d0| 74 65 72 2e 65 64 75 2e | 20 20 49 27 6c 6c 20 6d |ter.edu.| I'll m|
|000027e0| 61 6b 65 20 65 76 65 72 | 79 20 65 66 66 6f 72 74 |ake ever|y effort|
|000027f0| 20 74 6f 20 72 65 70 6c | 79 2c 20 61 6e 64 20 74 | to repl|y, and t|
|00002800| 6f 20 61 64 64 72 65 73 | 73 0a 58 79 6f 75 72 20 |o addres|s.Xyour |
|00002810| 63 6f 6e 63 65 72 6e 73 | 2c 20 62 75 74 20 63 61 |concerns|, but ca|
|00002820| 6e 27 74 20 61 6c 77 61 | 79 73 20 67 75 61 72 61 |n't alwa|ys guara|
|00002830| 6e 74 65 65 20 74 68 61 | 74 20 49 20 63 61 6e 20 |ntee tha|t I can |
|00002840| 62 65 20 71 75 69 63 6b | 20 61 62 6f 75 74 20 69 |be quick| about i|
|00002850| 74 2e 0a 58 0a 58 47 6f | 6f 64 20 6c 75 63 6b 20 |t..X.XGo|od luck |
|00002860| 77 69 74 68 20 6c 62 21 | 20 20 49 20 68 6f 70 65 |with lb!| I hope|
|00002870| 20 79 6f 75 20 66 69 6e | 64 20 69 74 20 75 73 65 | you fin|d it use|
|00002880| 66 75 6c 2e 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |ful..END|_OF_FILE|
|00002890| 0a 20 20 69 66 20 74 65 | 73 74 20 32 39 33 30 20 |. if te|st 2930 |
|000028a0| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 52 45 41 |-ne `wc |-c <'REA|
|000028b0| 44 4d 45 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |DME'`; t|hen. |
|000028c0| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 52 45 |echo sha|r: \"'RE|
|000028d0| 41 44 4d 45 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |ADME'\" |unpacked|
|000028e0| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|000028f0| 21 0a 20 20 66 69 0a 20 | 20 23 20 65 6e 64 20 6f |!. fi. | # end o|
|00002900| 66 20 27 52 45 41 44 4d | 45 27 0a 66 69 0a 69 66 |f 'READM|E'.fi.if|
|00002910| 20 74 65 73 74 20 2d 66 | 20 27 63 6f 6e 66 69 67 | test -f| 'config|
|00002920| 2e 68 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.h' -a "|${1}" !=|
|00002930| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00002940| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00002950| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00002960| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 63 6f 6e |ting fil|e \"'con|
|00002970| 66 69 67 2e 68 27 5c 22 | 0a 65 6c 73 65 0a 20 20 |fig.h'\"|.else. |
|00002980| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00002990| 63 74 69 6e 67 20 5c 22 | 27 63 6f 6e 66 69 67 2e |cting \"|'config.|
|000029a0| 68 27 5c 22 20 5c 28 37 | 33 30 20 63 68 61 72 61 |h'\" \(7|30 chara|
|000029b0| 63 74 65 72 73 5c 29 0a | 20 20 73 65 64 20 22 73 |cters\).| sed "s|
|000029c0| 2f 5e 58 2f 2f 22 20 3e | 27 63 6f 6e 66 69 67 2e |/^X//" >|'config.|
|000029d0| 68 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |h' <<'EN|D_OF_FIL|
|000029e0| 45 27 0a 58 2f 2a 09 09 | 09 09 09 09 09 2a 2f 0a |E'.X/*..|.....*/.|
|000029f0| 58 2f 2a 20 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |X/* Conf|iguratio|
|00002a00| 6e 20 70 61 72 61 6d 65 | 74 65 72 73 20 66 6f 72 |n parame|ters for|
|00002a10| 20 74 68 65 20 6c 6f 61 | 64 20 62 61 6c 61 6e 63 | the loa|d balanc|
|00002a20| 65 72 2c 20 27 6c 62 27 | 20 2a 2f 0a 58 2f 2a 20 |er, 'lb'| */.X/* |
|00002a30| 43 6f 70 79 72 69 67 68 | 74 20 28 63 29 20 31 39 |Copyrigh|t (c) 19|
|00002a40| 38 38 2c 20 31 39 38 39 | 20 55 6e 69 76 65 72 73 |88, 1989| Univers|
|00002a50| 69 74 79 20 6f 66 20 52 | 6f 63 68 65 73 74 65 72 |ity of R|ochester|
|00002a60| 20 20 20 20 20 2a 2f 0a | 58 2f 2a 20 44 65 70 61 | */.|X/* Depa|
|00002a70| 72 74 6d 65 6e 74 20 6f | 66 20 45 6c 65 63 74 72 |rtment o|f Electr|
|00002a80| 69 63 61 6c 20 45 6e 67 | 69 6e 65 65 72 69 6e 67 |ical Eng|ineering|
|00002a90| 2e 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002aa0| 20 2a 2f 0a 58 2f 2a 09 | 09 09 09 09 09 09 2a 2f | */.X/*.|......*/|
|00002ab0| 0a 58 0a 58 23 64 65 66 | 69 6e 65 09 43 4f 4e 46 |.X.X#def|ine.CONF|
|00002ac0| 49 47 46 49 4c 45 09 22 | 2f 75 73 72 2f 73 68 61 |IGFILE."|/usr/sha|
|00002ad0| 72 65 2f 6c 62 2e 63 6f | 6e 66 22 0a 58 23 64 65 |re/lb.co|nf".X#de|
|00002ae0| 66 69 6e 65 09 52 53 48 | 09 09 22 2f 75 73 72 2f |fine.RSH|.."/usr/|
|00002af0| 75 63 62 2f 72 73 68 22 | 0a 58 0a 58 23 64 65 66 |ucb/rsh"|.X.X#def|
|00002b00| 69 6e 65 20 6c 6f 61 64 | 61 76 67 28 73 70 2c 6e |ine load|avg(sp,n|
|00002b10| 29 20 20 28 28 28 66 6c | 6f 61 74 29 20 28 73 70 |) (((fl|oat) (sp|
|00002b20| 29 2d 3e 61 76 65 6e 72 | 75 6e 5b 6e 5d 29 20 2f |)->avenr|un[n]) /|
|00002b30| 20 32 35 36 2e 30 29 0a | 58 23 64 65 66 69 6e 65 | 256.0).|X#define|
|00002b40| 20 4d 41 58 4c 49 4e 45 | 09 09 32 35 35 09 09 2f | MAXLINE|..255../|
|00002b50| 2a 20 6c 61 72 67 65 73 | 74 20 6c 69 6e 65 20 69 |* larges|t line i|
|00002b60| 6e 20 63 6f 6e 66 69 67 | 20 66 69 6c 65 2a 2f 0a |n config| file*/.|
|00002b70| 58 23 64 65 66 69 6e 65 | 20 4d 41 58 53 48 42 55 |X#define| MAXSHBU|
|00002b80| 46 09 31 30 32 34 30 09 | 09 2f 2a 20 6d 61 78 20 |F.10240.|./* max |
|00002b90| 73 69 7a 65 20 6f 66 20 | 73 68 65 6c 6c 20 62 75 |size of |shell bu|
|00002ba0| 66 66 65 72 20 20 20 2a | 2f 0a 58 23 64 65 66 69 |ffer *|/.X#defi|
|00002bb0| 6e 65 20 4d 41 58 48 4f | 53 54 09 09 36 34 09 09 |ne MAXHO|ST..64..|
|00002bc0| 2f 2a 20 6c 6f 6e 67 65 | 73 74 20 61 6c 6c 6f 77 |/* longe|st allow|
|00002bd0| 61 62 6c 65 20 68 6f 73 | 74 6e 61 6d 65 20 2a 2f |able hos|tname */|
|00002be0| 0a 58 0a 58 23 69 66 20 | 75 33 62 20 7c 7c 20 75 |.X.X#if |u3b || u|
|00002bf0| 33 62 35 20 7c 7c 20 73 | 75 6e 0a 58 23 64 65 66 |3b5 || s|un.X#def|
|00002c00| 69 6e 65 20 4d 41 58 46 | 4c 4f 41 54 09 28 28 66 |ine MAXF|LOAT.((f|
|00002c10| 6c 6f 61 74 29 33 2e 34 | 30 32 38 32 33 34 36 36 |loat)3.4|02823466|
|00002c20| 33 38 35 32 38 38 36 30 | 65 2b 33 38 29 0a 58 23 |38528860|e+38).X#|
|00002c30| 65 6e 64 69 66 0a 58 0a | 58 23 69 66 20 70 64 70 |endif.X.|X#if pdp|
|00002c40| 31 31 20 7c 7c 20 76 61 | 78 0a 58 23 64 65 66 69 |11 || va|x.X#defi|
|00002c50| 6e 65 20 4d 41 58 46 4c | 4f 41 54 09 28 28 66 6c |ne MAXFL|OAT.((fl|
|00002c60| 6f 61 74 29 31 2e 37 30 | 31 34 31 31 37 33 33 31 |oat)1.70|14117331|
|00002c70| 39 32 36 34 34 32 39 39 | 65 2b 33 38 29 0a 58 23 |92644299|e+38).X#|
|00002c80| 65 6e 64 69 66 0a 58 0a | 58 23 69 66 6e 64 65 66 |endif.X.|X#ifndef|
|00002c90| 20 4d 41 58 46 4c 4f 41 | 54 0a 58 23 64 65 66 69 | MAXFLOA|T.X#defi|
|00002ca0| 6e 65 20 4d 41 58 46 4c | 4f 41 54 09 28 28 66 6c |ne MAXFL|OAT.((fl|
|00002cb0| 6f 61 74 29 31 2e 37 30 | 31 34 31 31 37 33 33 31 |oat)1.70|14117331|
|00002cc0| 39 32 36 34 34 32 39 39 | 65 2b 33 38 29 0a 58 23 |92644299|e+38).X#|
|00002cd0| 65 6e 64 69 66 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |endif.EN|D_OF_FIL|
|00002ce0| 45 0a 20 20 69 66 20 74 | 65 73 74 20 37 33 30 20 |E. if t|est 730 |
|00002cf0| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 63 6f 6e |-ne `wc |-c <'con|
|00002d00| 66 69 67 2e 68 27 60 3b | 20 74 68 65 6e 0a 20 20 |fig.h'`;| then. |
|00002d10| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00002d20| 63 6f 6e 66 69 67 2e 68 | 27 5c 22 20 75 6e 70 61 |config.h|'\" unpa|
|00002d30| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00002d40| 73 69 7a 65 21 0a 20 20 | 66 69 0a 20 20 23 20 65 |size!. |fi. # e|
|00002d50| 6e 64 20 6f 66 20 27 63 | 6f 6e 66 69 67 2e 68 27 |nd of 'c|onfig.h'|
|00002d60| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00002d70| 6c 62 2e 31 27 20 2d 61 | 20 22 24 7b 31 7d 22 20 |lb.1' -a| "${1}" |
|00002d80| 21 3d 20 22 2d 63 22 20 | 3b 20 74 68 65 6e 20 0a |!= "-c" |; then .|
|00002d90| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 57 69 6c | echo s|har: Wil|
|00002da0| 6c 20 6e 6f 74 20 63 6c | 6f 62 62 65 72 20 65 78 |l not cl|obber ex|
|00002db0| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 5c 22 27 6c |isting f|ile \"'l|
|00002dc0| 62 2e 31 27 5c 22 0a 65 | 6c 73 65 0a 20 20 65 63 |b.1'\".e|lse. ec|
|00002dd0| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00002de0| 69 6e 67 20 5c 22 27 6c | 62 2e 31 27 5c 22 20 5c |ing \"'l|b.1'\" \|
|00002df0| 28 32 35 32 31 20 63 68 | 61 72 61 63 74 65 72 73 |(2521 ch|aracters|
|00002e00| 5c 29 0a 20 20 73 65 64 | 20 22 73 2f 5e 58 2f 2f |\). sed| "s/^X//|
|00002e10| 22 20 3e 27 6c 62 2e 31 | 27 20 3c 3c 27 45 4e 44 |" >'lb.1|' <<'END|
|00002e20| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2e 74 72 20 7e |_OF_FILE|'.X.tr ~|
|00002e30| 20 5c 20 0a 58 2e 54 48 | 20 4c 42 20 31 20 22 6f | \ .X.TH| LB 1 "o|
|00002e40| 70 74 69 6f 6e 73 0a 58 | 2e 53 48 20 4e 41 4d 45 |ptions.X|.SH NAME|
|00002e50| 0a 58 4c 62 20 5c 2d 20 | 20 6c 6f 61 64 20 62 61 |.XLb \- | load ba|
|00002e60| 6c 61 6e 63 65 72 20 66 | 6f 72 20 68 6f 6d 6f 67 |lancer f|or homog|
|00002e70| 65 6e 65 6f 75 73 20 65 | 6e 76 69 72 6f 6e 6d 65 |eneous e|nvironme|
|00002e80| 6e 74 0a 58 2e 53 48 20 | 53 59 4e 4f 50 53 49 53 |nt.X.SH |SYNOPSIS|
|00002e90| 0a 58 2e 42 52 20 22 6c | 62 20 5b 20 2d 76 20 7c |.X.BR "l|b [ -v ||
|00002ea0| 20 2d 71 20 5d 20 3c 63 | 6f 6d 6d 61 6e 64 20 73 | -q ] <c|ommand s|
|00002eb0| 74 72 69 6e 67 3e 0a 58 | 2e 50 50 0a 58 2e 53 48 |tring>.X|.PP.X.SH|
|00002ec0| 20 44 45 53 43 52 49 50 | 54 49 4f 4e 0a 58 2e 49 | DESCRIP|TION.X.I|
|00002ed0| 20 6c 62 0a 58 66 69 6e | 64 73 20 74 68 65 20 62 | lb.Xfin|ds the b|
|00002ee0| 65 73 74 20 6d 61 63 68 | 69 6e 65 20 69 6e 20 74 |est mach|ine in t|
|00002ef0| 68 65 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 6f |he envir|onment o|
|00002f00| 6e 20 77 68 69 63 68 20 | 74 6f 20 72 75 6e 20 61 |n which |to run a|
|00002f10| 20 62 61 74 63 68 20 74 | 79 70 65 0a 58 63 6f 6d | batch t|ype.Xcom|
|00002f20| 70 75 74 65 20 74 61 73 | 6b 2e 20 20 54 68 69 73 |pute tas|k. This|
|00002f30| 20 69 73 20 64 6f 6e 65 | 20 62 79 20 63 6f 6d 70 | is done| by comp|
|00002f40| 61 72 69 6e 67 20 6c 6f | 61 64 20 61 76 65 72 61 |aring lo|ad avera|
|00002f50| 67 65 73 0a 58 61 6e 64 | 20 63 6f 6d 70 75 74 69 |ges.Xand| computi|
|00002f60| 6e 67 20 70 6f 77 65 72 | 20 66 6f 72 20 76 61 72 |ng power| for var|
|00002f70| 69 6f 75 73 20 6d 61 63 | 68 69 6e 65 73 2c 20 61 |ious mac|hines, a|
|00002f80| 6e 64 20 73 65 6c 65 63 | 74 69 6e 67 20 74 68 65 |nd selec|ting the|
|00002f90| 20 6d 61 63 68 69 6e 65 | 0a 58 62 65 73 74 20 61 | machine|.Xbest a|
|00002fa0| 62 6c 65 20 74 6f 20 61 | 63 63 65 70 74 20 74 68 |ble to a|ccept th|
|00002fb0| 65 20 63 6f 6d 70 75 74 | 65 20 74 61 73 6b 2e 0a |e comput|e task..|
|00002fc0| 58 2e 49 20 6c 62 0a 58 | 69 73 20 65 73 70 65 63 |X.I lb.X|is espec|
|00002fd0| 69 61 6c 6c 79 20 75 73 | 65 66 75 6c 20 69 6e 20 |ially us|eful in |
|00002fe0| 64 69 73 74 72 69 62 75 | 74 69 6e 67 20 63 6f 6d |distribu|ting com|
|00002ff0| 70 75 74 65 20 69 6e 74 | 65 6e 73 69 76 65 20 6a |pute int|ensive j|
|00003000| 6f 62 73 20 61 6d 6f 6e | 67 0a 58 74 68 65 20 6d |obs amon|g.Xthe m|
|00003010| 61 6e 79 20 63 6f 6d 70 | 75 74 65 72 73 20 69 6e |any comp|uters in|
|00003020| 20 61 20 68 6f 6d 6f 67 | 65 6e 65 6f 75 73 20 65 | a homog|eneous e|
|00003030| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2e 0a 58 2e 73 70 |nvironme|nt..X.sp|
|00003040| 0a 58 2e 53 48 20 4f 50 | 54 49 4f 4e 53 0a 58 57 |.X.SH OP|TIONS.XW|
|00003050| 69 74 68 20 6e 6f 20 6f | 70 74 69 6f 6e 73 2c 0a |ith no o|ptions,.|
|00003060| 58 2e 49 20 6c 62 0a 58 | 70 72 69 6e 74 73 20 61 |X.I lb.X|prints a|
|00003070| 20 6f 6e 65 20 6c 69 6e | 65 20 6f 75 74 70 75 74 | one lin|e output|
|00003080| 20 69 64 65 6e 74 69 66 | 79 69 6e 67 0a 58 74 68 | identif|ying.Xth|
|00003090| 65 20 73 65 6c 65 63 74 | 65 64 20 6d 61 63 68 69 |e select|ed machi|
|000030a0| 6e 65 20 61 6e 64 20 74 | 68 65 20 63 6f 6d 6d 61 |ne and t|he comma|
|000030b0| 6e 64 20 62 65 69 6e 67 | 20 73 75 62 6d 69 74 74 |nd being| submitt|
|000030c0| 65 64 2e 0a 58 2e 73 70 | 0a 58 2e 6e 66 0a 58 09 |ed..X.sp|.X.nf.X.|
|000030d0| 2d 76 09 76 65 72 62 6f | 73 65 20 6d 6f 64 65 3a |-v.verbo|se mode:|
|000030e0| 20 20 63 61 75 73 65 73 | 20 61 6e 20 65 78 63 65 | causes| an exce|
|000030f0| 73 73 69 76 65 20 61 6d | 6f 75 6e 74 20 6f 66 0a |ssive am|ount of.|
|00003100| 58 09 09 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 61 |X..infor|mation a|
|00003110| 62 6f 75 74 20 74 68 65 | 20 64 65 74 65 72 6d 69 |bout the| determi|
|00003120| 6e 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 62 65 |nation o|f the be|
|00003130| 73 74 0a 58 09 09 6d 61 | 63 68 69 6e 65 20 73 65 |st.X..ma|chine se|
|00003140| 6c 65 63 74 69 6f 6e 20 | 74 6f 20 62 65 20 70 72 |lection |to be pr|
|00003150| 69 6e 74 65 64 2e 0a 58 | 0a 58 09 2d 71 09 71 75 |inted..X|.X.-q.qu|
|00003160| 69 65 74 20 6d 6f 64 65 | 3a 20 20 63 61 75 73 65 |iet mode|: cause|
|00003170| 73 20 65 76 65 6e 20 74 | 68 65 20 75 73 75 61 6c |s even t|he usual|
|00003180| 20 6f 6e 65 20 6c 69 6e | 65 0a 58 09 09 6f 75 74 | one lin|e.X..out|
|00003190| 70 75 74 20 69 64 65 6e | 74 69 66 79 69 6e 67 20 |put iden|tifying |
|000031a0| 74 68 65 20 73 65 6c 65 | 63 74 65 64 20 6d 61 63 |the sele|cted mac|
|000031b0| 68 69 6e 65 20 74 6f 20 | 62 65 0a 58 09 09 65 6c |hine to |be.X..el|
|000031c0| 69 6d 69 6e 61 74 65 64 | 2e 20 20 54 68 65 20 6a |iminated|. The j|
|000031d0| 6f 62 20 77 69 6c 6c 20 | 62 65 20 73 65 6e 74 20 |ob will |be sent |
|000031e0| 74 6f 20 74 68 65 20 72 | 65 6d 6f 74 65 0a 58 09 |to the r|emote.X.|
|000031f0| 09 6d 61 63 68 69 6e 65 | 2c 20 62 75 74 20 79 6f |.machine|, but yo|
|00003200| 75 20 77 69 6c 6c 20 6e | 65 76 65 72 20 62 65 20 |u will n|ever be |
|00003210| 74 6f 6c 64 20 77 68 69 | 63 68 20 6d 61 63 68 69 |told whi|ch machi|
|00003220| 6e 65 0a 58 09 09 77 61 | 73 20 73 65 6c 65 63 74 |ne.X..wa|s select|
|00003230| 65 64 21 0a 58 2e 66 69 | 0a 58 2e 53 48 20 45 58 |ed!.X.fi|.X.SH EX|
|00003240| 41 4d 50 4c 45 53 0a 58 | 2e 6e 66 0a 58 2e 49 20 |AMPLES.X|.nf.X.I |
|00003250| 6c 62 0a 58 2e 66 69 0a | 58 09 54 68 69 73 20 67 |lb.X.fi.|X.This g|
|00003260| 69 76 65 73 20 74 68 65 | 20 6f 75 74 70 75 74 20 |ives the| output |
|00003270| 6f 66 20 6c 62 20 2d 76 | 2c 20 62 75 74 20 65 78 |of lb -v|, but ex|
|00003280| 65 63 75 74 65 73 20 6e | 6f 20 63 6f 6d 6d 61 6e |ecutes n|o comman|
|00003290| 64 0a 58 2e 73 70 0a 58 | 2e 6e 66 0a 58 2e 49 20 |d.X.sp.X|.nf.X.I |
|000032a0| 6c 62 20 66 6f 72 74 75 | 6e 65 0a 58 2e 66 69 0a |lb fortu|ne.X.fi.|
|000032b0| 58 09 54 68 69 73 20 65 | 78 65 63 75 74 65 73 20 |X.This e|xecutes |
|000032c0| 22 66 6f 72 74 75 6e 65 | 22 20 6f 6e 20 74 68 65 |"fortune|" on the|
|000032d0| 20 6c 65 61 73 74 20 6c | 6f 61 64 65 64 20 6d 61 | least l|oaded ma|
|000032e0| 63 68 69 6e 65 2e 0a 58 | 2e 73 70 0a 58 2e 6e 66 |chine..X|.sp.X.nf|
|000032f0| 0a 58 2e 49 20 6c 62 20 | 2d 76 20 66 6f 6f 62 61 |.X.I lb |-v fooba|
|00003300| 72 0a 58 2e 66 69 0a 58 | 09 54 68 69 73 20 65 78 |r.X.fi.X|.This ex|
|00003310| 65 63 75 74 65 73 20 22 | 66 6f 6f 62 61 72 22 20 |ecutes "|foobar" |
|00003320| 6f 6e 20 74 68 65 20 6c | 65 61 73 74 20 6c 6f 61 |on the l|east loa|
|00003330| 64 65 64 20 6d 61 63 68 | 69 6e 65 2c 20 61 6e 64 |ded mach|ine, and|
|00003340| 20 67 69 76 65 73 0a 58 | 76 65 72 62 6f 73 65 20 | gives.X|verbose |
|00003350| 6d 65 73 73 61 67 65 73 | 2e 0a 58 2e 73 70 0a 58 |messages|..X.sp.X|
|00003360| 2e 6e 66 0a 58 2e 49 20 | 6c 62 20 2d 71 20 6d 69 |.nf.X.I |lb -q mi|
|00003370| 6e 69 6d 6f 73 20 69 6e | 66 69 6c 65 0a 58 2e 66 |nimos in|file.X.f|
|00003380| 69 0a 58 09 54 68 69 73 | 20 65 78 65 63 75 74 65 |i.X.This| execute|
|00003390| 73 20 22 6d 69 6e 69 6d | 6f 73 20 69 6e 66 69 6c |s "minim|os infil|
|000033a0| 65 22 20 6f 6e 20 74 68 | 65 20 6c 65 61 73 74 20 |e" on th|e least |
|000033b0| 6c 6f 61 64 65 64 20 6d | 61 63 68 69 6e 65 2c 0a |loaded m|achine,.|
|000033c0| 58 61 6e 64 20 67 69 76 | 65 73 20 6e 6f 20 6d 65 |Xand giv|es no me|
|000033d0| 73 73 61 67 65 73 2e 0a | 58 2e 73 70 0a 58 2e 6e |ssages..|X.sp.X.n|
|000033e0| 66 0a 58 2e 49 20 6c 62 | 20 27 73 70 69 63 65 3c |f.X.I lb| 'spice<|
|000033f0| 69 6e 66 69 6c 65 3e 6f | 75 74 66 69 6c 65 27 0a |infile>o|utfile'.|
|00003400| 58 2e 66 69 0a 58 09 54 | 68 69 73 20 69 73 20 61 |X.fi.X.T|his is a|
|00003410| 6e 20 69 6d 70 6f 72 74 | 61 6e 74 20 65 78 61 6d |n import|ant exam|
|00003420| 70 6c 65 2e 20 20 48 65 | 72 65 2c 20 61 20 70 72 |ple. He|re, a pr|
|00003430| 6f 67 72 61 6d 20 63 61 | 6c 6c 65 64 20 22 73 70 |ogram ca|lled "sp|
|00003440| 69 63 65 22 20 69 73 0a | 58 62 65 69 6e 67 20 72 |ice" is.|Xbeing r|
|00003450| 75 6e 20 77 69 74 68 20 | 72 65 64 69 72 65 63 74 |un with |redirect|
|00003460| 65 64 20 69 6e 70 75 74 | 20 61 6e 64 20 6f 75 74 |ed input| and out|
|00003470| 70 75 74 2e 20 41 6e 79 | 74 69 6d 65 20 72 65 64 |put. Any|time red|
|00003480| 69 72 65 63 74 69 6f 6e | 20 69 73 20 0a 58 64 65 |irection| is .Xde|
|00003490| 73 69 72 65 64 20 69 6e | 20 75 73 69 6e 67 0a 58 |sired in| using.X|
|000034a0| 2e 49 20 6c 62 2c 0a 58 | 74 68 65 20 70 6f 72 74 |.I lb,.X|the port|
|000034b0| 69 6f 6e 20 75 73 69 6e | 67 20 72 65 64 69 72 65 |ion usin|g redire|
|000034c0| 63 74 69 6f 6e 20 6d 75 | 73 74 20 62 65 20 71 75 |ction mu|st be qu|
|000034d0| 6f 74 65 64 20 74 6f 20 | 61 76 6f 69 64 20 69 6e |oted to |avoid in|
|000034e0| 74 65 72 70 72 65 74 61 | 74 69 6f 6e 20 61 74 0a |terpreta|tion at.|
|000034f0| 58 74 68 65 20 6f 72 69 | 67 69 6e 61 74 69 6e 67 |Xthe ori|ginating|
|00003500| 20 73 68 65 6c 6c 2e 20 | 20 54 68 65 20 71 75 6f | shell. | The quo|
|00003510| 74 65 64 20 73 74 72 69 | 6e 67 20 69 6e 20 74 68 |ted stri|ng in th|
|00003520| 69 73 20 65 78 61 6d 70 | 6c 65 20 61 6c 6c 6f 77 |is examp|le allow|
|00003530| 73 20 66 6f 72 20 74 68 | 65 0a 58 72 65 64 69 72 |s for th|e.Xredir|
|00003540| 65 63 74 69 6f 6e 20 74 | 6f 20 74 61 6b 65 20 70 |ection t|o take p|
|00003550| 6c 61 63 65 20 6f 6e 20 | 74 68 65 20 72 65 6d 6f |lace on |the remo|
|00003560| 74 65 20 6d 61 63 68 69 | 6e 65 2e 0a 58 2e 73 70 |te machi|ne..X.sp|
|00003570| 0a 58 2e 6e 66 0a 58 2e | 53 48 20 46 49 4c 45 53 |.X.nf.X.|SH FILES|
|00003580| 0a 58 2e 66 69 0a 58 2e | 49 20 6c 62 0a 58 61 6c |.X.fi.X.|I lb.Xal|
|00003590| 73 6f 20 72 65 71 75 69 | 72 65 73 20 74 68 65 20 |so requi|res the |
|000035a0| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 66 69 |configur|ation fi|
|000035b0| 6c 65 0a 58 2e 49 20 6c | 62 2e 63 6f 6e 66 0a 58 |le.X.I l|b.conf.X|
|000035c0| 77 68 69 63 68 20 6c 69 | 73 74 73 20 6d 61 63 68 |which li|sts mach|
|000035d0| 69 6e 65 73 20 74 6f 20 | 62 65 0a 58 63 6f 6e 73 |ines to |be.Xcons|
|000035e0| 69 64 65 72 65 64 2c 20 | 61 6e 64 20 73 6f 6d 65 |idered, |and some|
|000035f0| 20 62 61 73 69 63 20 69 | 6e 66 6f 72 6d 61 74 69 | basic i|nformati|
|00003600| 6f 6e 20 61 62 6f 75 74 | 20 74 68 65 6d 2e 20 20 |on about| them. |
|00003610| 53 65 65 20 74 68 65 20 | 6d 61 6e 75 61 6c 0a 58 |See the |manual.X|
|00003620| 70 61 67 65 20 6c 62 28 | 35 29 20 66 6f 72 20 6d |page lb(|5) for m|
|00003630| 6f 72 65 20 6f 6e 20 74 | 68 65 20 63 6f 6e 66 69 |ore on t|he confi|
|00003640| 67 75 72 61 74 69 6f 6e | 20 66 69 6c 65 2e 0a 58 |guration| file..X|
|00003650| 2e 6e 66 0a 58 2e 53 48 | 20 43 41 56 45 41 54 53 |.nf.X.SH| CAVEATS|
|00003660| 0a 58 2e 66 69 0a 58 2e | 73 70 0a 58 2e 49 20 6c |.X.fi.X.|sp.X.I l|
|00003670| 62 0a 58 73 68 6f 75 6c | 64 20 72 65 61 6c 6c 79 |b.Xshoul|d really|
|00003680| 20 75 73 65 0a 58 2e 49 | 20 63 73 68 20 6a 6f 62 | use.X.I| csh job|
|00003690| 20 63 6f 6e 74 72 6f 6c | 0a 58 73 6f 20 74 68 61 | control|.Xso tha|
|000036a0| 74 20 74 68 65 20 75 73 | 65 72 20 6d 61 79 20 74 |t the us|er may t|
|000036b0| 72 61 63 6b 20 74 68 65 | 20 70 72 6f 67 72 65 73 |rack the| progres|
|000036c0| 73 20 6f 66 20 74 68 65 | 20 73 75 62 6d 69 74 74 |s of the| submitt|
|000036d0| 65 64 20 6a 6f 62 2e 20 | 20 4d 61 79 62 65 20 69 |ed job. | Maybe i|
|000036e0| 6e 0a 58 74 68 65 20 6e | 65 78 74 20 76 65 72 73 |n.Xthe n|ext vers|
|000036f0| 69 6f 6e 2e 0a 58 2e 73 | 70 0a 58 2e 6e 66 0a 58 |ion..X.s|p.X.nf.X|
|00003700| 2e 53 48 20 4e 4f 54 45 | 53 0a 58 54 68 69 73 20 |.SH NOTE|S.XThis |
|00003710| 70 72 6f 67 72 61 6d 20 | 69 73 20 73 74 69 6c 6c |program |is still|
|00003720| 20 75 6e 64 65 72 20 64 | 65 76 65 6c 6f 70 6d 65 | under d|evelopme|
|00003730| 6e 74 2e 20 20 53 65 6e | 64 20 0a 58 64 65 73 63 |nt. Sen|d .Xdesc|
|00003740| 72 69 70 74 69 6f 6e 73 | 20 6f 66 20 70 72 6f 62 |riptions| of prob|
|00003750| 6c 65 6d 73 20 61 6e 64 | 2f 6f 72 20 63 6f 6d 6d |lems and|/or comm|
|00003760| 65 6e 74 73 20 74 6f 20 | 64 65 6b 65 40 65 65 2e |ents to |deke@ee.|
|00003770| 72 6f 63 68 65 73 74 65 | 72 2e 65 64 75 0a 58 28 |rocheste|r.edu.X(|
|00003780| 61 6c 73 6f 20 2e 2e 2e | 21 72 6f 63 68 65 73 74 |also ...|!rochest|
|00003790| 65 72 21 75 72 2d 76 61 | 6c 68 61 6c 6c 61 21 64 |er!ur-va|lhalla!d|
|000037a0| 65 6b 65 29 2e 0a 58 2e | 53 48 20 41 55 54 48 4f |eke)..X.|SH AUTHO|
|000037b0| 52 0a 58 2e 6e 66 0a 58 | 44 69 6b 72 61 6e 20 4b |R.X.nf.X|Dikran K|
|000037c0| 61 73 73 61 62 69 61 6e | 2c 0a 58 55 6e 69 76 65 |assabian|,.XUnive|
|000037d0| 72 73 69 74 79 20 6f 66 | 20 52 6f 63 68 65 73 74 |rsity of| Rochest|
|000037e0| 65 72 20 44 65 70 74 2e | 20 6f 66 20 45 6c 65 63 |er Dept.| of Elec|
|000037f0| 74 72 69 63 61 6c 20 45 | 6e 67 69 6e 65 65 72 69 |trical E|ngineeri|
|00003800| 6e 67 0a 58 52 6f 63 68 | 65 73 74 65 72 2c 20 4e |ng.XRoch|ester, N|
|00003810| 59 20 31 34 36 32 37 20 | 28 37 31 36 29 20 32 37 |Y 14627 |(716) 27|
|00003820| 35 2d 33 31 30 36 0a 58 | 2e 53 48 20 22 53 45 45 |5-3106.X|.SH "SEE|
|00003830| 20 41 4c 53 4f 22 0a 58 | 72 73 74 61 74 64 28 38 | ALSO".X|rstatd(8|
|00003840| 29 2c 20 73 74 61 74 73 | 72 76 28 38 29 2c 20 77 |), stats|rv(8), w|
|00003850| 28 31 29 2c 20 75 70 74 | 69 6d 65 28 31 29 2c 20 |(1), upt|ime(1), |
|00003860| 6c 62 28 35 29 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |lb(5).EN|D_OF_FIL|
|00003870| 45 0a 20 20 69 66 20 74 | 65 73 74 20 32 35 32 31 |E. if t|est 2521|
|00003880| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 6c 62 | -ne `wc| -c <'lb|
|00003890| 2e 31 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |.1'`; th|en. e|
|000038a0| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 6c 62 2e |cho shar|: \"'lb.|
|000038b0| 31 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |1'\" unp|acked wi|
|000038c0| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 20 |th wrong| size!. |
|000038d0| 20 66 69 0a 20 20 23 20 | 65 6e 64 20 6f 66 20 27 | fi. # |end of '|
|000038e0| 6c 62 2e 31 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |lb.1'.fi|.if test|
|000038f0| 20 2d 66 20 27 6c 62 2e | 35 27 20 2d 61 20 22 24 | -f 'lb.|5' -a "$|
|00003900| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00003910| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00003920| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00003930| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00003940| 20 5c 22 27 6c 62 2e 35 | 27 5c 22 0a 65 6c 73 65 | \"'lb.5|'\".else|
|00003950| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |. echo |shar: Ex|
|00003960| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 6c 62 2e 35 |tracting| \"'lb.5|
|00003970| 27 5c 22 20 5c 28 32 30 | 36 33 20 63 68 61 72 61 |'\" \(20|63 chara|
|00003980| 63 74 65 72 73 5c 29 0a | 20 20 73 65 64 20 22 73 |cters\).| sed "s|
|00003990| 2f 5e 58 2f 2f 22 20 3e | 27 6c 62 2e 35 27 20 3c |/^X//" >|'lb.5' <|
|000039a0| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|000039b0| 2e 74 72 20 7e 20 5c 20 | 0a 58 2e 54 48 20 4c 42 |.tr ~ \ |.X.TH LB|
|000039c0| 20 35 20 22 6c 69 6d 69 | 74 0a 58 2e 53 48 20 4e | 5 "limi|t.X.SH N|
|000039d0| 41 4d 45 0a 58 4c 62 2e | 63 6f 6e 66 20 5c 2d 20 |AME.XLb.|conf \- |
|000039e0| 20 6c 6f 61 64 20 62 61 | 6c 61 6e 63 65 72 20 63 | load ba|lancer c|
|000039f0| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 66 69 6c |onfigura|tion fil|
|00003a00| 65 20 66 6f 72 20 6c 62 | 28 31 29 0a 58 2e 66 69 |e for lb|(1).X.fi|
|00003a10| 0a 58 2e 53 48 20 44 45 | 53 43 52 49 50 54 49 4f |.X.SH DE|SCRIPTIO|
|00003a20| 4e 0a 58 54 68 69 73 20 | 66 69 6c 65 20 63 6f 6e |N.XThis |file con|
|00003a30| 74 61 69 6e 73 20 69 6e | 66 6f 72 6d 61 74 69 6f |tains in|formatio|
|00003a40| 6e 20 61 62 6f 75 74 20 | 6c 6f 63 61 6c 20 6d 61 |n about |local ma|
|00003a50| 63 68 69 6e 65 73 20 72 | 65 63 6f 67 6e 69 7a 65 |chines r|ecognize|
|00003a60| 64 20 62 79 0a 58 2e 49 | 52 20 6c 62 20 28 31 29 |d by.X.I|R lb (1)|
|00003a70| 2e 0a 58 54 68 65 20 66 | 6f 72 6d 61 74 20 63 6f |..XThe f|ormat co|
|00003a80| 6e 73 69 73 74 73 20 6f | 66 20 73 69 6e 67 6c 65 |nsists o|f single|
|00003a90| 20 6c 69 6e 65 20 65 6e | 74 72 69 65 73 20 77 69 | line en|tries wi|
|00003aa0| 74 68 20 74 68 72 65 65 | 20 66 69 65 6c 64 73 2e |th three| fields.|
|00003ab0| 20 54 68 65 0a 58 66 69 | 65 6c 64 73 20 61 72 65 | The.Xfi|elds are|
|00003ac0| 0a 58 2e 49 20 6d 61 63 | 68 69 6e 65 2d 6e 61 6d |.X.I mac|hine-nam|
|00003ad0| 65 2c 0a 58 2e 49 20 70 | 6f 77 65 72 2d 66 61 63 |e,.X.I p|ower-fac|
|00003ae0| 74 6f 72 2c 0a 58 61 6e | 64 0a 58 2e 49 20 6c 6f |tor,.Xan|d.X.I lo|
|00003af0| 61 64 2d 6c 69 6d 69 74 | 2e 0a 58 2e 73 70 0a 58 |ad-limit|..X.sp.X|
|00003b00| 2e 49 20 6d 61 63 68 69 | 6e 65 2d 6e 61 6d 65 0a |.I machi|ne-name.|
|00003b10| 58 69 73 20 61 20 6c 65 | 67 61 6c 20 6f 72 20 72 |Xis a le|gal or r|
|00003b20| 65 63 6f 67 6e 69 7a 65 | 64 20 68 6f 73 74 6e 61 |ecognize|d hostna|
|00003b30| 6d 65 20 77 68 69 63 68 | 20 69 73 20 74 6f 20 62 |me which| is to b|
|00003b40| 65 20 61 20 63 61 6e 64 | 69 64 61 74 65 20 66 6f |e a cand|idate fo|
|00003b50| 72 20 6a 6f 62 73 0a 58 | 69 6e 69 74 69 61 74 65 |r jobs.X|initiate|
|00003b60| 64 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 75 73 |d throug|h the us|
|00003b70| 65 20 6f 66 20 6c 62 28 | 31 29 2e 20 20 54 68 69 |e of lb(|1). Thi|
|00003b80| 73 20 6d 61 63 68 69 6e | 65 20 6d 75 73 74 20 73 |s machin|e must s|
|00003b90| 75 70 70 6f 72 74 20 74 | 68 65 0a 58 73 74 61 74 |upport t|he.Xstat|
|00003ba0| 69 73 74 69 63 73 20 73 | 65 72 76 65 72 20 70 72 |istics s|erver pr|
|00003bb0| 6f 74 6f 63 6f 6c 20 75 | 73 65 64 20 62 79 20 6c |otocol u|sed by l|
|00003bc0| 62 28 31 29 2e 0a 58 2e | 73 70 0a 58 2e 49 20 70 |b(1)..X.|sp.X.I p|
|00003bd0| 6f 77 65 72 2d 66 61 63 | 74 6f 72 0a 58 69 73 20 |ower-fac|tor.Xis |
|00003be0| 61 20 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |a floati|ng point|
|00003bf0| 20 76 61 6c 75 65 2c 20 | 61 6e 64 20 68 61 73 20 | value, |and has |
|00003c00| 6d 65 61 6e 69 6e 67 20 | 6f 6e 6c 79 20 62 79 20 |meaning |only by |
|00003c10| 63 6f 6d 70 61 72 69 73 | 6f 6e 20 74 6f 0a 58 74 |comparis|on to.Xt|
|00003c20| 68 65 20 70 6f 77 65 72 | 2d 66 61 63 74 6f 72 73 |he power|-factors|
|00003c30| 20 6f 66 20 6f 74 68 65 | 72 20 6d 61 63 68 69 6e | of othe|r machin|
|00003c40| 65 73 2e 20 20 54 68 65 | 20 6d 61 63 68 69 6e 65 |es. The| machine|
|00003c50| 73 20 77 69 74 68 20 74 | 68 65 20 6c 61 72 67 65 |s with t|he large|
|00003c60| 72 0a 58 70 6f 77 65 72 | 2d 66 61 63 74 6f 72 73 |r.Xpower|-factors|
|00003c70| 20 77 69 6c 6c 20 62 65 | 20 70 72 65 66 65 72 72 | will be| preferr|
|00003c80| 65 64 20 74 6f 20 74 68 | 6f 73 65 20 77 69 74 68 |ed to th|ose with|
|00003c90| 20 73 6d 61 6c 6c 65 72 | 20 70 6f 77 65 72 2d 66 | smaller| power-f|
|00003ca0| 61 63 74 6f 72 73 2e 0a | 58 2e 73 70 0a 58 2e 49 |actors..|X.sp.X.I|
|00003cb0| 20 6c 6f 61 64 2d 6c 69 | 6d 69 74 0a 58 73 70 65 | load-li|mit.Xspe|
|00003cc0| 63 69 66 69 65 73 20 74 | 68 65 20 6c 6f 61 64 2d |cifies t|he load-|
|00003cd0| 61 76 65 72 61 67 65 20 | 62 65 79 6f 6e 64 20 77 |average |beyond w|
|00003ce0| 68 69 63 68 20 6a 6f 62 | 73 20 73 68 6f 75 6c 64 |hich job|s should|
|00003cf0| 20 6e 6f 74 20 62 65 20 | 73 65 6e 74 0a 58 74 6f | not be |sent.Xto|
|00003d00| 20 74 68 61 74 20 6d 61 | 63 68 69 6e 65 2e 0a 58 | that ma|chine..X|
|00003d10| 2e 73 70 0a 58 2e 53 48 | 20 53 41 4d 50 4c 45 20 |.sp.X.SH| SAMPLE |
|00003d20| 46 49 4c 45 0a 58 2e 6e | 66 0a 58 23 20 6c 62 2e |FILE.X.n|f.X# lb.|
|00003d30| 63 6f 6e 66 0a 58 23 0a | 58 23 20 54 68 65 20 66 |conf.X#.|X# The f|
|00003d40| 6f 72 6d 61 74 20 6f 66 | 20 74 68 69 73 20 66 69 |ormat of| this fi|
|00003d50| 6c 65 20 69 73 20 3c 6d | 61 63 68 69 6e 65 3e 20 |le is <m|achine> |
|00003d60| 3c 73 66 61 63 74 6f 72 | 3e 20 3c 6c 69 6d 69 74 |<sfactor|> <limit|
|00003d70| 3e 0a 58 2e 74 61 20 2e | 38 69 0a 58 23 20 77 68 |>.X.ta .|8i.X# wh|
|00003d80| 65 72 65 09 3c 6d 61 63 | 68 69 6e 65 3e 20 69 73 |ere.<mac|hine> is|
|00003d90| 20 61 20 6c 65 67 61 6c | 20 6d 61 63 68 69 6e 65 | a legal| machine|
|00003da0| 20 6e 61 6d 65 0a 58 23 | 09 3c 73 66 61 63 74 6f | name.X#|.<sfacto|
|00003db0| 72 3e 20 69 73 20 74 68 | 61 74 20 6d 61 63 68 69 |r> is th|at machi|
|00003dc0| 6e 65 73 20 73 65 6c 65 | 63 74 69 6f 6e 20 66 61 |nes sele|ction fa|
|00003dd0| 63 74 6f 72 0a 58 23 09 | 3c 6c 69 6d 69 74 3e 20 |ctor.X#.|<limit> |
|00003de0| 20 20 69 73 20 74 68 65 | 20 6c 6f 61 64 20 6c 69 | is the| load li|
|00003df0| 6d 69 74 20 66 6f 72 20 | 74 68 61 74 20 6d 61 63 |mit for |that mac|
|00003e00| 68 69 6e 65 0a 58 23 0a | 58 2e 74 61 20 32 2e 32 |hine.X#.|X.ta 2.2|
|00003e10| 69 20 33 2e 32 69 0a 58 | 23 20 20 4d 41 43 48 49 |i 3.2i.X|# MACHI|
|00003e20| 4e 45 09 53 46 41 43 54 | 4f 52 09 4c 49 4d 49 54 |NE.SFACT|OR.LIMIT|
|00003e30| 0a 58 62 72 61 68 6d 73 | 2e 66 75 62 61 72 2e 63 |.Xbrahms|.fubar.c|
|00003e40| 6f 6d 09 32 30 30 09 33 | 2e 30 0a 58 6d 6f 7a 61 |om.200.3|.0.Xmoza|
|00003e50| 72 74 2e 66 75 62 61 72 | 2e 63 6f 6d 09 31 35 30 |rt.fubar|.com.150|
|00003e60| 09 32 2e 35 0a 58 63 68 | 6f 70 69 6e 2e 66 75 62 |.2.5.Xch|opin.fub|
|00003e70| 61 72 2e 63 6f 6d 09 31 | 32 30 09 32 2e 35 0a 58 |ar.com.1|20.2.5.X|
|00003e80| 62 61 63 68 2e 66 75 62 | 61 72 2e 63 6f 6d 09 31 |bach.fub|ar.com.1|
|00003e90| 30 30 09 31 2e 35 0a 58 | 2e 73 70 0a 58 2e 66 69 |00.1.5.X|.sp.X.fi|
|00003ea0| 0a 58 4c 69 6e 65 73 20 | 62 65 67 69 6e 6e 69 6e |.XLines |beginnin|
|00003eb0| 67 20 77 69 74 68 20 0a | 58 2e 42 20 23 20 0a 58 |g with .|X.B # .X|
|00003ec0| 61 72 65 20 63 6f 6d 6d | 65 6e 74 73 2e 0a 58 2e |are comm|ents..X.|
|00003ed0| 73 70 0a 58 49 6e 20 74 | 68 69 73 20 65 78 61 6d |sp.XIn t|his exam|
|00003ee0| 70 6c 65 2c 20 62 72 61 | 68 6d 73 2e 66 75 62 61 |ple, bra|hms.fuba|
|00003ef0| 72 2e 63 6f 6d 20 69 73 | 20 70 72 65 66 65 72 72 |r.com is| preferr|
|00003f00| 65 64 20 74 6f 20 6d 6f | 7a 61 72 74 2e 66 75 62 |ed to mo|zart.fub|
|00003f10| 61 72 2e 63 6f 6d 2c 20 | 77 68 69 63 68 0a 58 69 |ar.com, |which.Xi|
|00003f20| 73 20 70 72 65 66 65 72 | 72 65 64 20 74 6f 20 63 |s prefer|red to c|
|00003f30| 68 6f 70 69 6e 2e 66 75 | 62 61 72 2e 63 6f 6d 2c |hopin.fu|bar.com,|
|00003f40| 20 69 66 20 74 68 65 69 | 72 20 6c 6f 61 64 73 20 | if thei|r loads |
|00003f50| 61 72 65 20 65 78 61 63 | 74 6c 79 20 65 71 75 61 |are exac|tly equa|
|00003f60| 6c 2e 20 20 49 6e 0a 58 | 70 72 61 63 74 69 63 65 |l. In.X|practice|
|00003f70| 2c 20 74 68 65 20 6c 6f | 61 64 20 61 76 65 72 61 |, the lo|ad avera|
|00003f80| 67 65 20 28 6e 75 6d 62 | 65 72 20 6f 66 20 6a 6f |ge (numb|er of jo|
|00003f90| 62 73 20 69 6e 20 74 68 | 65 20 72 75 6e 20 71 75 |bs in th|e run qu|
|00003fa0| 65 75 65 20 6f 76 65 72 | 20 74 68 65 20 6c 61 73 |eue over| the las|
|00003fb0| 74 0a 58 6d 69 6e 75 74 | 65 29 20 69 73 20 63 6f |t.Xminut|e) is co|
|00003fc0| 6d 70 61 72 65 64 20 74 | 6f 20 74 68 65 20 6c 6f |mpared t|o the lo|
|00003fd0| 61 64 2d 6c 69 6d 69 74 | 20 61 6e 64 20 74 68 65 |ad-limit| and the|
|00003fe0| 6e 20 64 69 76 69 64 65 | 64 20 62 79 20 74 68 65 |n divide|d by the|
|00003ff0| 20 70 6f 77 65 72 2d 66 | 61 63 74 6f 72 2c 0a 58 | power-f|actor,.X|
|00004000| 66 6f 72 20 65 61 63 68 | 20 6d 61 63 68 69 6e 65 |for each| machine|
|00004010| 20 6c 69 73 74 65 64 2e | 20 20 49 66 20 74 68 65 | listed.| If the|
|00004020| 20 6c 6f 61 64 20 61 76 | 65 72 61 67 65 20 65 78 | load av|erage ex|
|00004030| 63 65 65 64 73 20 74 68 | 65 20 6c 6f 61 64 2d 6c |ceeds th|e load-l|
|00004040| 69 6d 69 74 2c 20 74 68 | 61 74 0a 58 6d 61 63 68 |imit, th|at.Xmach|
|00004050| 69 6e 65 20 77 69 6c 6c | 20 6e 6f 74 20 62 65 20 |ine will| not be |
|00004060| 63 6f 6e 73 69 64 65 72 | 65 64 2e 20 20 57 68 65 |consider|ed. Whe|
|00004070| 6e 20 61 6c 6c 20 6d 61 | 63 68 69 6e 65 73 20 6c |n all ma|chines l|
|00004080| 69 73 74 65 64 20 68 61 | 76 65 20 62 65 65 6e 20 |isted ha|ve been |
|00004090| 63 6f 6e 73 69 64 65 72 | 65 64 2c 0a 58 74 68 65 |consider|ed,.Xthe|
|000040a0| 20 6f 6e 65 20 77 69 74 | 68 20 74 68 65 20 73 6d | one wit|h the sm|
|000040b0| 61 6c 6c 65 73 74 20 76 | 61 6c 75 65 20 6f 66 20 |allest v|alue of |
|000040c0| 28 6c 6f 61 64 2d 61 76 | 65 72 61 67 65 2f 70 6f |(load-av|erage/po|
|000040d0| 77 65 72 2d 66 61 63 74 | 6f 72 29 20 77 69 6c 6c |wer-fact|or) will|
|000040e0| 20 62 65 0a 58 73 65 6c | 65 63 74 65 64 2e 0a 58 | be.Xsel|ected..X|
|000040f0| 2e 73 70 0a 58 2e 53 48 | 20 22 53 45 45 20 41 4c |.sp.X.SH| "SEE AL|
|00004100| 53 4f 22 0a 58 6c 62 28 | 31 29 2c 20 77 28 31 29 |SO".Xlb(|1), w(1)|
|00004110| 2c 20 75 70 74 69 6d 65 | 28 31 29 0a 58 2e 53 48 |, uptime|(1).X.SH|
|00004120| 20 4e 4f 54 45 53 0a 58 | 54 68 65 72 65 20 61 72 | NOTES.X|There ar|
|00004130| 65 20 6c 69 6d 69 74 73 | 20 74 6f 20 74 68 65 20 |e limits| to the |
|00004140| 6c 69 6e 65 2d 6c 65 6e | 67 74 68 20 61 6e 64 20 |line-len|gth and |
|00004150| 74 68 65 20 68 6f 73 74 | 6e 61 6d 65 20 6c 65 6e |the host|name len|
|00004160| 67 74 68 2c 20 77 68 69 | 63 68 20 61 72 65 0a 58 |gth, whi|ch are.X|
|00004170| 73 65 74 20 69 6e 20 74 | 68 65 20 66 69 6c 65 20 |set in t|he file |
|00004180| 63 6f 6e 66 69 67 2e 68 | 20 77 68 65 6e 20 6c 62 |config.h| when lb|
|00004190| 28 31 29 20 69 73 20 62 | 75 69 6c 74 2e 20 20 42 |(1) is b|uilt. B|
|000041a0| 79 20 64 65 66 61 75 6c | 74 2c 20 74 68 65 73 65 |y defaul|t, these|
|000041b0| 20 61 72 65 0a 58 32 35 | 35 20 61 6e 64 20 36 34 | are.X25|5 and 64|
|000041c0| 20 72 65 73 70 65 63 74 | 69 76 65 6c 79 2c 20 62 | respect|ively, b|
|000041d0| 75 74 20 6d 61 79 20 62 | 65 20 74 77 65 61 6b 65 |ut may b|e tweake|
|000041e0| 64 20 61 74 20 74 68 65 | 20 69 6e 73 74 61 6c 6c |d at the| install|
|000041f0| 65 72 73 20 64 69 73 63 | 72 65 74 69 6f 6e 2e 0a |ers disc|retion..|
|00004200| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 20 20 69 66 |END_OF_F|ILE. if|
|00004210| 20 74 65 73 74 20 32 30 | 36 33 20 2d 6e 65 20 60 | test 20|63 -ne `|
|00004220| 77 63 20 2d 63 20 3c 27 | 6c 62 2e 35 27 60 3b 20 |wc -c <'|lb.5'`; |
|00004230| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00004240| 61 72 3a 20 5c 22 27 6c | 62 2e 35 27 5c 22 20 75 |ar: \"'l|b.5'\" u|
|00004250| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00004260| 6e 67 20 73 69 7a 65 21 | 0a 20 20 66 69 0a 20 20 |ng size!|. fi. |
|00004270| 23 20 65 6e 64 20 6f 66 | 20 27 6c 62 2e 35 27 0a |# end of| 'lb.5'.|
|00004280| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 72 |fi.if te|st -f 'r|
|00004290| 73 64 63 6c 6e 74 2e 63 | 27 20 2d 61 20 22 24 7b |sdclnt.c|' -a "${|
|000042a0| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|000042b0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|000042c0| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|000042d0| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|000042e0| 5c 22 27 72 73 64 63 6c | 6e 74 2e 63 27 5c 22 0a |\"'rsdcl|nt.c'\".|
|000042f0| 65 6c 73 65 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |else. e|cho shar|
|00004300| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00004310| 72 73 64 63 6c 6e 74 2e | 63 27 5c 22 20 5c 28 35 |rsdclnt.|c'\" \(5|
|00004320| 35 39 38 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |598 char|acters\)|
|00004330| 0a 20 20 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |. sed "|s/^X//" |
|00004340| 3e 27 72 73 64 63 6c 6e | 74 2e 63 27 20 3c 3c 27 |>'rsdcln|t.c' <<'|
|00004350| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 2f 2a |END_OF_F|ILE'.X/*|
|00004360| 0a 58 20 2a 20 43 6f 70 | 79 72 69 67 68 74 20 28 |.X * Cop|yright (|
|00004370| 63 29 20 31 39 38 39 2c | 31 39 39 30 2c 31 39 39 |c) 1989,|1990,199|
|00004380| 31 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 |1 Univer|sity of |
|00004390| 52 6f 63 68 65 73 74 65 | 72 0a 58 20 2a 20 44 65 |Rocheste|r.X * De|
|000043a0| 70 61 72 74 6d 65 6e 74 | 20 6f 66 20 45 6c 65 63 |partment| of Elec|
|000043b0| 74 72 69 63 61 6c 20 45 | 6e 67 69 6e 65 65 72 69 |trical E|ngineeri|
|000043c0| 6e 67 0a 58 20 2a 20 41 | 6c 6c 20 72 69 67 68 74 |ng.X * A|ll right|
|000043d0| 73 20 72 65 73 65 72 76 | 65 64 2e 0a 58 20 2a 0a |s reserv|ed..X *.|
|000043e0| 58 20 2a 20 52 65 64 69 | 73 74 72 69 62 75 74 69 |X * Redi|stributi|
|000043f0| 6f 6e 20 61 6e 64 20 75 | 73 65 20 69 6e 20 73 6f |on and u|se in so|
|00004400| 75 72 63 65 20 61 6e 64 | 20 62 69 6e 61 72 79 20 |urce and| binary |
|00004410| 66 6f 72 6d 73 20 61 72 | 65 20 70 65 72 6d 69 74 |forms ar|e permit|
|00004420| 74 65 64 0a 58 20 2a 20 | 70 72 6f 76 69 64 65 64 |ted.X * |provided|
|00004430| 20 74 68 61 74 20 74 68 | 65 20 61 62 6f 76 65 20 | that th|e above |
|00004440| 63 6f 70 79 72 69 67 68 | 74 20 6e 6f 74 69 63 65 |copyrigh|t notice|
|00004450| 20 61 6e 64 20 74 68 69 | 73 20 70 61 72 61 67 72 | and thi|s paragr|
|00004460| 61 70 68 20 61 72 65 0a | 58 20 2a 20 64 75 70 6c |aph are.|X * dupl|
|00004470| 69 63 61 74 65 64 20 69 | 6e 20 61 6c 6c 20 73 75 |icated i|n all su|
|00004480| 63 68 20 66 6f 72 6d 73 | 20 61 6e 64 20 74 68 61 |ch forms| and tha|
|00004490| 74 20 61 6e 79 20 64 6f | 63 75 6d 65 6e 74 61 74 |t any do|cumentat|
|000044a0| 69 6f 6e 2c 0a 58 20 2a | 20 61 64 76 65 72 74 69 |ion,.X *| adverti|
|000044b0| 73 69 6e 67 20 6d 61 74 | 65 72 69 61 6c 73 2c 20 |sing mat|erials, |
|000044c0| 61 6e 64 20 6f 74 68 65 | 72 20 6d 61 74 65 72 69 |and othe|r materi|
|000044d0| 61 6c 73 20 72 65 6c 61 | 74 65 64 20 74 6f 20 73 |als rela|ted to s|
|000044e0| 75 63 68 0a 58 20 2a 20 | 64 69 73 74 72 69 62 75 |uch.X * |distribu|
|000044f0| 74 69 6f 6e 20 61 6e 64 | 20 75 73 65 20 61 63 6b |tion and| use ack|
|00004500| 6e 6f 77 6c 65 64 67 65 | 20 74 68 61 74 20 74 68 |nowledge| that th|
|00004510| 65 20 73 6f 66 74 77 61 | 72 65 20 77 61 73 20 64 |e softwa|re was d|
|00004520| 65 76 65 6c 6f 70 65 64 | 0a 58 20 2a 20 61 74 20 |eveloped|.X * at |
|00004530| 74 68 65 20 55 6e 69 76 | 65 72 73 69 74 79 20 6f |the Univ|ersity o|
|00004540| 66 20 52 6f 63 68 65 73 | 74 65 72 2e 0a 58 20 2a |f Roches|ter..X *|
|00004550| 0a 58 20 2a 20 54 48 49 | 53 20 53 4f 46 54 57 41 |.X * THI|S SOFTWA|
|00004560| 52 45 20 49 53 20 50 52 | 4f 56 49 44 45 44 20 60 |RE IS PR|OVIDED `|
|00004570| 60 41 53 20 49 53 27 27 | 20 41 4e 44 20 57 49 54 |`AS IS''| AND WIT|
|00004580| 48 4f 55 54 20 41 4e 59 | 20 45 58 50 52 45 53 53 |HOUT ANY| EXPRESS|
|00004590| 20 4f 52 0a 58 20 2a 20 | 49 4d 50 4c 49 45 44 20 | OR.X * |IMPLIED |
|000045a0| 57 41 52 52 41 4e 54 49 | 45 53 2c 20 49 4e 43 4c |WARRANTI|ES, INCL|
|000045b0| 55 44 49 4e 47 2c 20 57 | 49 54 48 4f 55 54 20 4c |UDING, W|ITHOUT L|
|000045c0| 49 4d 49 54 41 54 49 4f | 4e 2c 20 54 48 45 20 49 |IMITATIO|N, THE I|
|000045d0| 4d 50 4c 49 45 44 0a 58 | 20 2a 20 57 41 52 52 41 |MPLIED.X| * WARRA|
|000045e0| 4e 54 49 45 53 20 4f 46 | 20 4d 45 52 43 48 41 4e |NTIES OF| MERCHAN|
|000045f0| 54 49 42 49 4c 49 54 59 | 20 41 4e 44 20 46 49 54 |TIBILITY| AND FIT|
|00004600| 4e 45 53 53 20 46 4f 52 | 20 41 20 50 41 52 54 49 |NESS FOR| A PARTI|
|00004610| 43 55 4c 41 52 20 50 55 | 52 50 4f 53 45 2e 0a 58 |CULAR PU|RPOSE..X|
|00004620| 20 2a 2f 0a 58 0a 58 2f | 2a 0a 58 20 2a 20 72 73 | */.X.X/|*.X * rs|
|00004630| 64 63 6c 6e 74 2e 63 20 | 20 66 6f 72 20 74 68 65 |dclnt.c | for the|
|00004640| 20 27 6c 62 27 20 6c 6f | 61 64 20 62 61 6c 61 6e | 'lb' lo|ad balan|
|00004650| 63 65 72 20 0a 58 20 2a | 20 20 20 2d 44 65 6b 65 |cer .X *| -Deke|
|00004660| 20 4b 61 73 73 61 62 69 | 61 6e 2c 20 55 6e 69 76 | Kassabi|an, Univ|
|00004670| 65 72 73 69 74 79 20 6f | 66 20 52 6f 63 68 65 73 |ersity o|f Roches|
|00004680| 74 65 72 20 45 45 20 44 | 65 70 61 72 74 6d 65 6e |ter EE D|epartmen|
|00004690| 74 0a 58 20 2a 20 20 20 | 28 20 64 65 6b 65 40 65 |t.X * |( deke@e|
|000046a0| 65 2e 72 6f 63 68 65 73 | 74 65 72 2e 65 64 75 20 |e.roches|ter.edu |
|000046b0| 29 20 20 28 37 31 36 29 | 20 32 37 35 2d 33 31 30 |) (716)| 275-310|
|000046c0| 36 0a 58 20 2a 0a 58 20 | 2a 20 24 52 65 76 69 73 |6.X *.X |* $Revis|
|000046d0| 69 6f 6e 3a 20 31 2e 32 | 20 24 0a 58 20 2a 20 24 |ion: 1.2| $.X * $|
|000046e0| 41 75 74 68 6f 72 3a 20 | 64 65 6b 65 20 24 0a 58 |Author: |deke $.X|
|000046f0| 20 2a 20 24 44 61 74 65 | 3a 20 39 31 2f 30 33 2f | * $Date|: 91/03/|
|00004700| 30 33 20 31 37 3a 35 32 | 3a 33 36 20 24 0a 58 20 |03 17:52|:36 $.X |
|00004710| 2a 20 24 4c 6f 67 3a 09 | 72 73 64 63 6c 6e 74 2e |* $Log:.|rsdclnt.|
|00004720| 63 2c 76 20 24 0a 58 20 | 2a 20 52 65 76 69 73 69 |c,v $.X |* Revisi|
|00004730| 6f 6e 20 31 2e 32 20 20 | 39 31 2f 30 33 2f 30 33 |on 1.2 |91/03/03|
|00004740| 20 20 31 37 3a 35 32 3a | 33 36 20 20 64 65 6b 65 | 17:52:|36 deke|
|00004750| 0a 58 20 2a 20 63 68 61 | 6e 67 65 64 20 73 74 61 |.X * cha|nged sta|
|00004760| 74 73 20 74 6f 20 6c 73 | 74 61 74 73 20 74 6f 20 |ts to ls|tats to |
|00004770| 61 76 6f 69 64 20 6e 61 | 6d 65 20 63 6c 61 73 68 |avoid na|me clash|
|00004780| 3a 20 72 65 71 75 69 72 | 65 64 20 62 79 20 63 68 |: requir|ed by ch|
|00004790| 61 6e 67 65 20 69 6e 20 | 72 73 74 61 74 2e 68 0a |ange in |rstat.h.|
|000047a0| 58 20 2a 0a 58 20 2a 2f | 0a 58 0a 58 23 69 6e 63 |X *.X */|.X.X#inc|
|000047b0| 6c 75 64 65 20 3c 73 74 | 64 69 6f 2e 68 3e 0a 58 |lude <st|dio.h>.X|
|000047c0| 23 69 6e 63 6c 75 64 65 | 20 3c 72 70 63 2f 72 70 |#include| <rpc/rp|
|000047d0| 63 2e 68 3e 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |c.h>.X#i|nclude <|
|000047e0| 72 70 63 73 76 63 2f 72 | 73 74 61 74 2e 68 3e 0a |rpcsvc/r|stat.h>.|
|000047f0| 58 23 69 6e 63 6c 75 64 | 65 20 22 63 6f 6e 66 69 |X#includ|e "confi|
|00004800| 67 2e 68 22 0a 58 0a 58 | 6d 61 69 6e 28 61 72 67 |g.h".X.X|main(arg|
|00004810| 63 2c 20 61 72 67 76 2c | 20 65 6e 76 70 29 0a 58 |c, argv,| envp).X|
|00004820| 69 6e 74 20 61 72 67 63 | 3b 0a 58 63 68 61 72 20 |int argc|;.Xchar |
|00004830| 2a 61 72 67 76 5b 5d 3b | 0a 58 63 68 61 72 20 2a |*argv[];|.Xchar *|
|00004840| 65 6e 76 70 5b 5d 3b 0a | 58 7b 0a 58 0a 58 73 74 |envp[];.|X{.X.Xst|
|00004850| 72 75 63 74 20 73 74 61 | 74 73 74 69 6d 65 20 6c |ruct sta|tstime l|
|00004860| 73 74 61 74 73 3b 0a 58 | 46 49 4c 45 20 2a 66 64 |stats;.X|FILE *fd|
|00004870| 2c 2a 66 6f 70 65 6e 28 | 29 3b 0a 58 63 68 61 72 |,*fopen(|);.Xchar|
|00004880| 20 2a 66 67 65 74 73 28 | 29 3b 0a 58 69 6e 74 20 | *fgets(|);.Xint |
|00004890| 67 65 74 73 74 61 74 73 | 28 29 3b 0a 58 0a 58 69 |getstats|();.X.Xi|
|000048a0| 6e 74 20 73 74 61 72 74 | 2c 20 09 09 09 2f 2a 20 |nt start|, .../* |
|000048b0| 77 68 65 72 65 20 69 6e | 20 74 68 65 20 61 72 67 |where in| the arg|
|000048c0| 76 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 62 65 |v the co|mmand be|
|000048d0| 67 69 6e 73 20 2a 2f 0a | 58 20 20 20 20 70 70 67 |gins */.|X ppg|
|000048e0| 72 70 2c 09 09 09 2f 2a | 20 70 61 72 65 6e 74 20 |rp,.../*| parent |
|000048f0| 70 72 6f 63 65 73 73 20 | 67 72 6f 75 70 09 09 09 |process |group...|
|00004900| 2a 2f 0a 58 20 20 20 20 | 63 6f 6d 6d 61 6e 64 2c |*/.X |command,|
|00004910| 09 09 09 2f 2a 20 77 68 | 65 74 68 65 72 20 74 68 |.../* wh|ether th|
|00004920| 65 72 65 20 69 73 20 61 | 20 63 6f 6d 6d 61 6e 64 |ere is a| command|
|00004930| 20 09 09 2a 2f 0a 58 20 | 20 20 20 76 65 72 62 6f | ..*/.X | verbo|
|00004940| 73 65 5f 6d 6f 64 65 2c | 20 09 09 2f 2a 20 61 6c |se_mode,| ../* al|
|00004950| 6c 20 70 6f 73 73 69 62 | 6c 65 20 6f 75 74 70 75 |l possib|le outpu|
|00004960| 74 09 09 09 2a 2f 0a 58 | 20 20 20 20 71 75 69 65 |t...*/.X| quie|
|00004970| 74 5f 6d 6f 64 65 3b 09 | 09 09 2f 2a 20 6e 6f 20 |t_mode;.|../* no |
|00004980| 6f 75 74 70 75 74 09 09 | 09 09 2a 2f 0a 58 0a 58 |output..|..*/.X.X|
|00004990| 63 68 61 72 20 2a 70 61 | 74 68 3d 52 53 48 3b 0a |char *pa|th=RSH;.|
|000049a0| 58 0a 58 63 68 61 72 20 | 2a 64 69 72 2c 2a 70 6e |X.Xchar |*dir,*pn|
|000049b0| 61 6d 65 3b 0a 58 63 68 | 61 72 20 2a 63 6d 64 5f |ame;.Xch|ar *cmd_|
|000049c0| 65 78 65 63 5b 4d 41 58 | 53 48 42 55 46 5d 2c 09 |exec[MAX|SHBUF],.|
|000049d0| 2f 2a 20 63 6f 6d 6d 61 | 6e 64 20 74 6f 20 65 78 |/* comma|nd to ex|
|000049e0| 65 63 75 74 65 20 28 6c | 6f 63 61 6c 29 09 09 2a |ecute (l|ocal)..*|
|000049f0| 2f 0a 58 20 20 20 20 20 | 2a 72 63 6d 64 5f 65 78 |/.X |*rcmd_ex|
|00004a00| 65 63 5b 4d 41 58 53 48 | 42 55 46 5d 2c 09 2f 2a |ec[MAXSH|BUF],./*|
|00004a10| 20 63 6f 6d 6d 61 6e 64 | 20 74 6f 20 65 78 65 63 | command| to exec|
|00004a20| 75 74 65 20 28 72 65 6d | 6f 74 65 29 09 09 2a 2f |ute (rem|ote)..*/|
|00004a30| 0a 58 20 20 20 20 20 64 | 62 75 66 5b 4d 41 58 53 |.X d|buf[MAXS|
|00004a40| 48 42 55 46 5d 2c 09 09 | 2f 2a 20 77 6f 72 6b 69 |HBUF],..|/* worki|
|00004a50| 6e 67 20 64 69 72 65 63 | 74 6f 72 79 20 70 6c 61 |ng direc|tory pla|
|00004a60| 63 65 68 6f 6c 64 65 72 | 09 2a 2f 0a 58 20 20 20 |ceholder|.*/.X |
|00004a70| 20 20 68 6f 73 74 5b 4d | 41 58 48 4f 53 54 5d 2c | host[M|AXHOST],|
|00004a80| 09 09 2f 2a 20 68 6f 73 | 74 6e 61 6d 65 20 70 6c |../* hos|tname pl|
|00004a90| 61 63 65 68 6f 6c 64 65 | 72 09 09 09 2a 2f 0a 58 |aceholde|r...*/.X|
|00004aa0| 20 20 20 20 20 62 65 73 | 74 5f 68 6f 73 74 5b 4d | bes|t_host[M|
|00004ab0| 41 58 48 4f 53 54 5d 2c | 09 2f 2a 20 68 6f 73 74 |AXHOST],|./* host|
|00004ac0| 6e 61 6d 65 20 70 6c 61 | 63 65 68 6f 6c 64 65 72 |name pla|ceholder|
|00004ad0| 09 09 09 2a 2f 0a 58 20 | 20 20 20 20 66 65 6e 74 |...*/.X | fent|
|00004ae0| 72 79 5b 4d 41 58 4c 49 | 4e 45 5d 3b 09 09 2f 2a |ry[MAXLI|NE];../*|
|00004af0| 20 66 69 6c 65 20 62 75 | 66 66 65 72 20 2a 2f 0a | file bu|ffer */.|
|00004b00| 58 0a 58 66 6c 6f 61 74 | 20 6d 79 5f 73 66 61 63 |X.Xfloat| my_sfac|
|00004b10| 74 6f 72 2c 0a 58 20 20 | 20 20 20 20 62 65 73 74 |tor,.X | best|
|00004b20| 5f 73 66 61 63 74 6f 72 | 2c 0a 58 20 20 20 20 20 |_sfactor|,.X |
|00004b30| 20 66 61 63 74 6f 72 2c | 20 6c 69 6d 69 74 2c 09 | factor,| limit,.|
|00004b40| 09 2f 2a 20 66 69 6c 65 | 20 76 61 72 69 61 62 6c |./* file| variabl|
|00004b50| 65 73 09 09 09 2a 2f 0a | 58 20 20 20 20 20 20 6c |es...*/.|X l|
|00004b60| 6f 61 64 3b 0a 58 0a 58 | 09 70 6e 61 6d 65 20 3d |oad;.X.X|.pname =|
|00004b70| 20 2a 61 72 67 76 3b 09 | 09 09 2f 2a 20 4e 61 6d | *argv;.|../* Nam|
|00004b80| 65 20 6f 66 20 74 68 69 | 73 20 70 72 6f 67 72 61 |e of thi|s progra|
|00004b90| 6d 20 20 2a 2f 0a 58 09 | 76 65 72 62 6f 73 65 5f |m */.X.|verbose_|
|00004ba0| 6d 6f 64 65 3d 30 2c 71 | 75 69 65 74 5f 6d 6f 64 |mode=0,q|uiet_mod|
|00004bb0| 65 3d 30 3b 09 2f 2a 20 | 44 65 66 61 75 6c 74 20 |e=0;./* |Default |
|00004bc0| 69 73 20 6e 65 69 74 68 | 65 72 20 20 20 20 2a 2f |is neith|er */|
|00004bd0| 0a 58 09 62 65 73 74 5f | 73 66 61 63 74 6f 72 3d |.X.best_|sfactor=|
|00004be0| 4d 41 58 46 4c 4f 41 54 | 3b 09 20 09 2f 2a 20 50 |MAXFLOAT|;. ./* P|
|00004bf0| 72 61 63 74 69 63 61 6c | 6c 79 20 69 6e 66 69 6e |ractical|ly infin|
|00004c00| 69 74 79 21 20 2a 2f 0a | 58 20 09 63 6f 6d 6d 61 |ity! */.|X .comma|
|00004c10| 6e 64 3d 31 3b 09 09 09 | 2f 2a 20 54 68 65 72 65 |nd=1;...|/* There|
|00004c20| 20 69 73 20 61 20 63 6f | 6d 6d 61 6e 64 09 20 2a | is a co|mmand. *|
|00004c30| 2f 0a 58 0a 58 20 2f 2a | 20 43 68 65 63 6b 20 61 |/.X.X /*| Check a|
|00004c40| 72 67 75 6d 65 6e 74 73 | 2e 20 0a 58 20 20 2a 0a |rguments|. .X *.|
|00004c50| 58 20 20 2a 20 69 66 20 | 61 72 67 63 3d 31 20 74 |X * if |argc=1 t|
|00004c60| 68 65 6e 20 76 65 72 62 | 6f 73 65 3d 59 20 61 6e |hen verb|ose=Y an|
|00004c70| 64 20 63 6f 6d 6d 61 6e | 64 3d 4e 55 4c 4c 0a 58 |d comman|d=NULL.X|
|00004c80| 20 20 2a 20 69 66 20 61 | 72 67 63 3e 3d 32 20 63 | * if a|rgc>=2 c|
|00004c90| 68 65 63 6b 20 66 6f 72 | 20 66 6c 61 67 73 3a 0a |heck for| flags:.|
|00004ca0| 58 20 20 2a 20 20 20 20 | 2d 76 3d 76 65 72 62 6f |X * |-v=verbo|
|00004cb0| 73 65 20 28 66 75 6c 6c | 20 6f 75 74 70 75 74 29 |se (full| output)|
|00004cc0| 2c 20 20 2d 71 3d 71 75 | 69 65 74 20 28 64 6f 6e |, -q=qu|iet (don|
|00004cd0| 27 74 20 6f 75 74 70 75 | 74 20 6d 61 63 68 69 6e |'t outpu|t machin|
|00004ce0| 65 20 73 65 6c 65 63 74 | 69 6f 6e 29 0a 58 20 20 |e select|ion).X |
|00004cf0| 2a 20 20 20 20 77 69 74 | 68 20 6e 6f 20 66 6c 61 |* wit|h no fla|
|00004d00| 67 73 2c 20 6f 6e 6c 79 | 20 6d 61 63 68 69 6e 65 |gs, only| machine|
|00004d10| 20 73 65 6c 65 63 74 69 | 6f 6e 20 77 69 6c 6c 20 | selecti|on will |
|00004d20| 62 65 20 6f 75 74 70 75 | 74 0a 58 20 20 2a 20 20 |be outpu|t.X * |
|00004d30| 20 20 54 68 65 20 61 62 | 6f 76 65 20 66 6c 61 67 | The ab|ove flag|
|00004d40| 73 20 61 72 65 20 6d 75 | 74 75 61 6c 6c 79 20 65 |s are mu|tually e|
|00004d50| 78 63 6c 75 73 69 76 65 | 2e 20 20 76 20 6f 76 65 |xclusive|. v ove|
|00004d60| 72 72 69 64 65 73 20 71 | 0a 58 20 20 2a 0a 58 20 |rrides q|.X *.X |
|00004d70| 20 2a 20 20 20 20 41 64 | 64 69 74 69 6f 6e 61 6c | * Ad|ditional|
|00004d80| 20 61 72 67 75 6d 65 6e | 74 73 20 61 72 65 20 74 | argumen|ts are t|
|00004d90| 61 6b 65 6e 20 74 6f 20 | 62 65 20 61 20 63 6f 6d |aken to |be a com|
|00004da0| 6d 61 6e 64 2e 20 20 4e | 6f 20 73 61 6e 69 74 79 |mand. N|o sanity|
|00004db0| 20 63 68 65 63 6b 69 6e | 67 0a 58 20 20 2a 20 20 | checkin|g.X * |
|00004dc0| 20 20 77 69 6c 6c 20 62 | 65 20 64 6f 6e 65 2e 20 | will b|e done. |
|00004dd0| 20 57 68 65 6e 20 61 20 | 6d 61 63 68 69 6e 65 20 | When a |machine |
|00004de0| 69 73 20 73 65 6c 65 63 | 74 65 64 2c 20 74 68 65 |is selec|ted, the|
|00004df0| 20 63 6f 6d 6d 61 6e 64 | 20 77 69 6c 6c 20 62 65 | command| will be|
|00004e00| 20 73 65 6e 74 0a 58 20 | 20 2a 20 20 20 20 74 6f | sent.X | * to|
|00004e10| 20 74 68 61 74 20 6d 61 | 63 68 69 6e 65 20 61 73 | that ma|chine as|
|00004e20| 20 61 20 73 68 65 6c 6c | 20 63 6f 6d 6d 61 6e 64 | a shell| command|
|00004e30| 2e 0a 58 20 20 2a 0a 58 | 20 20 2a 2f 0a 58 0a 58 |..X *.X| */.X.X|
|00004e40| 20 69 66 20 28 61 72 67 | 63 20 3d 3d 20 31 29 20 | if (arg|c == 1) |
|00004e50| 7b 0a 58 09 63 6f 6d 6d | 61 6e 64 3d 30 3b 09 09 |{.X.comm|and=0;..|
|00004e60| 09 2f 2a 20 6e 6f 20 63 | 6f 6d 6d 61 6e 64 20 74 |./* no c|ommand t|
|00004e70| 6f 20 65 78 65 63 75 74 | 65 20 2a 2f 0a 58 09 76 |o execut|e */.X.v|
|00004e80| 65 72 62 6f 73 65 5f 6d | 6f 64 65 3d 31 3b 09 09 |erbose_m|ode=1;..|
|00004e90| 09 2f 2a 20 76 65 72 62 | 6f 73 65 20 6d 6f 64 65 |./* verb|ose mode|
|00004ea0| 09 09 20 2a 2f 0a 58 20 | 7d 0a 58 20 65 6c 73 65 |.. */.X |}.X else|
|00004eb0| 20 7b 0a 58 20 20 20 20 | 20 73 74 61 72 74 3d 31 | {.X | start=1|
|00004ec0| 3b 0a 58 20 20 20 20 20 | 69 66 28 21 73 74 72 63 |;.X |if(!strc|
|00004ed0| 6d 70 28 61 72 67 76 5b | 31 5d 2c 22 2d 71 22 29 |mp(argv[|1],"-q")|
|00004ee0| 29 7b 0a 58 20 20 20 20 | 20 20 71 75 69 65 74 5f |){.X | quiet_|
|00004ef0| 6d 6f 64 65 3d 31 3b 09 | 09 09 2f 2a 20 71 75 69 |mode=1;.|../* qui|
|00004f00| 65 74 20 6d 6f 64 65 20 | 2d 20 6e 6f 20 6f 75 74 |et mode |- no out|
|00004f10| 70 75 74 20 2a 2f 0a 58 | 20 20 20 20 20 20 73 74 |put */.X| st|
|00004f20| 61 72 74 3d 32 3b 0a 58 | 20 20 20 20 20 20 69 66 |art=2;.X| if|
|00004f30| 28 61 72 67 63 20 3d 3d | 20 32 29 20 65 78 69 74 |(argc ==| 2) exit|
|00004f40| 28 30 29 3b 09 09 2f 2a | 20 4e 6f 20 63 6f 6d 6d |(0);../*| No comm|
|00004f50| 61 6e 64 2c 20 6e 6f 20 | 6f 75 74 70 75 74 21 20 |and, no |output! |
|00004f60| 2a 2f 0a 58 20 20 20 20 | 20 7d 20 0a 58 20 20 20 |*/.X | } .X |
|00004f70| 20 20 69 66 28 21 73 74 | 72 63 6d 70 28 61 72 67 | if(!st|rcmp(arg|
|00004f80| 76 5b 31 5d 2c 22 2d 76 | 22 29 29 7b 0a 58 20 20 |v[1],"-v|")){.X |
|00004f90| 20 20 20 20 76 65 72 62 | 6f 73 65 5f 6d 6f 64 65 | verb|ose_mode|
|00004fa0| 3d 31 3b 09 09 09 2f 2a | 20 76 65 72 62 6f 73 65 |=1;.../*| verbose|
|00004fb0| 20 6d 6f 64 65 09 09 20 | 2a 2f 0a 58 20 20 20 20 | mode.. |*/.X |
|00004fc0| 20 20 73 74 61 72 74 3d | 32 3b 0a 58 20 20 20 20 | start=|2;.X |
|00004fd0| 20 20 69 66 28 61 72 67 | 63 20 3d 3d 20 32 29 20 | if(arg|c == 2) |
|00004fe0| 63 6f 6d 6d 61 6e 64 3d | 30 3b 09 09 2f 2a 20 4e |command=|0;../* N|
|00004ff0| 6f 20 63 6f 6d 6d 61 6e | 64 20 2d 20 76 65 72 62 |o comman|d - verb|
|00005000| 6f 73 65 20 20 20 2a 2f | 0a 58 20 20 20 20 20 7d |ose */|.X }|
|00005010| 20 0a 58 20 7d 0a 58 20 | 69 66 28 63 6f 6d 6d 61 | .X }.X |if(comma|
|00005020| 6e 64 29 7b 0a 58 09 66 | 6f 72 28 20 3b 20 73 74 |nd){.X.f|or( ; st|
|00005030| 61 72 74 3c 61 72 67 63 | 20 3b 20 73 74 61 72 74 |art<argc| ; start|
|00005040| 2b 2b 29 7b 0a 58 09 20 | 20 20 20 73 74 72 63 61 |++){.X. | strca|
|00005050| 74 28 63 6d 64 5f 65 78 | 65 63 2c 22 20 22 29 3b |t(cmd_ex|ec," ");|
|00005060| 20 73 74 72 63 61 74 28 | 63 6d 64 5f 65 78 65 63 | strcat(|cmd_exec|
|00005070| 2c 61 72 67 76 5b 73 74 | 61 72 74 5d 29 3b 0a 58 |,argv[st|art]);.X|
|00005080| 09 7d 0a 58 20 7d 0a 58 | 0a 58 0a 58 20 69 66 28 |.}.X }.X|.X.X if(|
|00005090| 28 66 64 3d 66 6f 70 65 | 6e 28 43 4f 4e 46 49 47 |(fd=fope|n(CONFIG|
|000050a0| 46 49 4c 45 2c 22 72 22 | 29 29 3d 3d 30 29 7b 0a |FILE,"r"|))==0){.|
|000050b0| 58 09 20 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |X. fprin|tf(stder|
|000050c0| 72 2c 22 45 72 72 6f 72 | 20 6f 70 65 6e 69 6e 67 |r,"Error| opening|
|000050d0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 66 | configu|ration f|
|000050e0| 69 6c 65 5c 6e 22 29 3b | 0a 58 09 20 65 78 69 74 |ile\n");|.X. exit|
|000050f0| 28 31 29 3b 0a 58 20 7d | 0a 58 0a 58 09 77 68 69 |(1);.X }|.X.X.whi|
|00005100| 6c 65 28 28 66 67 65 74 | 73 28 66 65 6e 74 72 79 |le((fget|s(fentry|
|00005110| 2c 4d 41 58 4c 49 4e 45 | 2c 66 64 29 29 21 3d 4e |,MAXLINE|,fd))!=N|
|00005120| 55 4c 4c 29 7b 0a 58 09 | 20 20 20 73 73 63 61 6e |ULL){.X.| sscan|
|00005130| 66 28 66 65 6e 74 72 79 | 2c 22 25 73 20 25 66 20 |f(fentry|,"%s %f |
|00005140| 25 66 22 2c 68 6f 73 74 | 2c 26 66 61 63 74 6f 72 |%f",host|,&factor|
|00005150| 2c 26 6c 69 6d 69 74 29 | 3b 0a 58 09 20 20 20 69 |,&limit)|;.X. i|
|00005160| 66 28 66 65 6e 74 72 79 | 5b 30 5d 3d 3d 27 23 27 |f(fentry|[0]=='#'|
|00005170| 29 20 63 6f 6e 74 69 6e | 75 65 3b 20 09 2f 2a 69 |) contin|ue; ./*i|
|00005180| 67 6e 6f 72 65 20 63 6f | 6d 6d 65 6e 74 73 2a 2f |gnore co|mments*/|
|00005190| 0a 58 09 09 0a 58 09 20 | 20 20 69 66 28 76 65 72 |.X...X. | if(ver|
|000051a0| 62 6f 73 65 5f 6d 6f 64 | 65 29 0a 58 09 20 20 20 |bose_mod|e).X. |
|000051b0| 20 20 20 70 72 69 6e 74 | 66 28 22 5c 6e 48 4f 53 | print|f("\nHOS|
|000051c0| 54 3d 25 73 5c 74 46 41 | 43 54 4f 52 3d 25 2e 32 |T=%s\tFA|CTOR=%.2|
|000051d0| 66 5c 74 4c 49 4d 49 54 | 3d 25 2e 32 66 5c 6e 22 |f\tLIMIT|=%.2f\n"|
|000051e0| 2c 68 6f 73 74 2c 66 61 | 63 74 6f 72 2c 6c 69 6d |,host,fa|ctor,lim|
|000051f0| 69 74 29 3b 0a 58 09 20 | 20 20 0a 58 09 20 20 20 |it);.X. | .X. |
|00005200| 69 66 28 67 65 74 73 74 | 61 74 73 28 68 6f 73 74 |if(getst|ats(host|
|00005210| 2c 26 6c 73 74 61 74 73 | 29 20 21 3d 30 29 7b 0a |,&lstats|) !=0){.|
|00005220| 58 09 09 6c 6f 61 64 3d | 4d 41 58 46 4c 4f 41 54 |X..load=|MAXFLOAT|
|00005230| 3b 09 09 09 2f 2a 20 73 | 6b 69 70 20 74 68 69 73 |;.../* s|kip this|
|00005240| 20 6f 6e 65 20 2a 2f 0a | 58 09 20 20 20 7d 20 0a | one */.|X. } .|
|00005250| 58 09 20 20 20 65 6c 73 | 65 20 7b 0a 58 09 09 6c |X. els|e {.X..l|
|00005260| 6f 61 64 3d 6c 6f 61 64 | 61 76 67 28 26 6c 73 74 |oad=load|avg(&lst|
|00005270| 61 74 73 2c 30 29 3b 09 | 0a 58 09 20 20 20 7d 0a |ats,0);.|.X. }.|
|00005280| 58 0a 58 09 20 20 20 69 | 66 28 20 6c 6f 61 64 20 |X.X. i|f( load |
|00005290| 3e 20 6c 69 6d 69 74 29 | 7b 0a 58 09 20 20 20 20 |> limit)|{.X. |
|000052a0| 20 20 69 66 28 76 65 72 | 62 6f 73 65 5f 6d 6f 64 | if(ver|bose_mod|
|000052b0| 65 29 20 70 72 69 6e 74 | 66 28 22 48 6f 73 74 20 |e) print|f("Host |
|000052c0| 25 73 20 69 73 20 6f 76 | 65 72 20 64 65 66 69 6e |%s is ov|er defin|
|000052d0| 65 64 20 6c 69 6d 69 74 | 5c 6e 22 2c 68 6f 73 74 |ed limit|\n",host|
|000052e0| 29 3b 0a 58 09 20 20 20 | 20 20 20 63 6f 6e 74 69 |);.X. | conti|
|000052f0| 6e 75 65 3b 0a 58 09 20 | 20 20 20 20 20 7d 0a 58 |nue;.X. | }.X|
|00005300| 0a 58 09 20 20 20 6d 79 | 5f 73 66 61 63 74 6f 72 |.X. my|_sfactor|
|00005310| 3d 31 30 30 2a 28 6c 6f | 61 64 2f 66 61 63 74 6f |=100*(lo|ad/facto|
|00005320| 72 29 3b 0a 58 0a 58 09 | 20 20 20 69 66 28 76 65 |r);.X.X.| if(ve|
|00005330| 72 62 6f 73 65 5f 6d 6f | 64 65 29 0a 58 09 09 70 |rbose_mo|de).X..p|
|00005340| 72 69 6e 74 66 28 22 4c | 6f 61 64 20 61 76 67 3d |rintf("L|oad avg=|
|00005350| 25 2e 33 66 5c 74 53 65 | 6c 65 63 74 69 6f 6e 20 |%.3f\tSe|lection |
|00005360| 66 61 63 74 6f 72 3d 25 | 2e 33 66 5c 6e 22 2c 0a |factor=%|.3f\n",.|
|00005370| 58 09 09 09 6c 6f 61 64 | 2c 6d 79 5f 73 66 61 63 |X...load|,my_sfac|
|00005380| 74 6f 72 29 3b 0a 58 0a | 58 09 20 20 20 69 66 28 |tor);.X.|X. if(|
|00005390| 62 65 73 74 5f 73 66 61 | 63 74 6f 72 3e 6d 79 5f |best_sfa|ctor>my_|
|000053a0| 73 66 61 63 74 6f 72 29 | 7b 0a 58 09 09 62 65 73 |sfactor)|{.X..bes|
|000053b0| 74 5f 73 66 61 63 74 6f | 72 3d 6d 79 5f 73 66 61 |t_sfacto|r=my_sfa|
|000053c0| 63 74 6f 72 3b 0a 58 09 | 09 73 74 72 63 70 79 28 |ctor;.X.|.strcpy(|
|000053d0| 62 65 73 74 5f 68 6f 73 | 74 2c 68 6f 73 74 29 3b |best_hos|t,host);|
|000053e0| 0a 58 09 20 20 20 7d 0a | 58 09 7d 20 2f 2a 65 6e |.X. }.|X.} /*en|
|000053f0| 64 77 68 69 6c 65 20 2a | 2f 0a 58 0a 58 20 20 20 |dwhile *|/.X.X |
|00005400| 20 69 66 28 76 65 72 62 | 6f 73 65 5f 6d 6f 64 65 | if(verb|ose_mode|
|00005410| 29 0a 58 20 20 20 20 20 | 20 20 70 72 69 6e 74 66 |).X | printf|
|00005420| 28 22 53 65 6c 65 63 74 | 65 64 20 68 6f 73 74 3a |("Select|ed host:|
|00005430| 20 3c 25 73 3e 20 66 61 | 63 74 6f 72 3d 3c 25 2e | <%s> fa|ctor=<%.|
|00005440| 33 66 3e 5c 6e 22 2c 62 | 65 73 74 5f 68 6f 73 74 |3f>\n",b|est_host|
|00005450| 2c 62 65 73 74 5f 73 66 | 61 63 74 6f 72 29 3b 0a |,best_sf|actor);.|
|00005460| 58 0a 58 20 20 20 20 69 | 66 28 63 6f 6d 6d 61 6e |X.X i|f(comman|
|00005470| 64 29 7b 0a 58 09 20 20 | 20 20 73 70 72 69 6e 74 |d){.X. | sprint|
|00005480| 66 28 72 63 6d 64 5f 65 | 78 65 63 2c 22 28 63 64 |f(rcmd_e|xec,"(cd|
|00005490| 20 25 73 3b 25 73 29 22 | 2c 67 65 74 77 64 28 64 | %s;%s)"|,getwd(d|
|000054a0| 62 75 66 29 2c 63 6d 64 | 5f 65 78 65 63 29 3b 0a |buf),cmd|_exec);.|
|000054b0| 58 09 20 20 20 20 69 66 | 28 21 71 75 69 65 74 5f |X. if|(!quiet_|
|000054c0| 6d 6f 64 65 29 7b 20 2f | 2a 20 70 72 69 6e 74 20 |mode){ /|* print |
|000054d0| 69 66 20 6e 6f 74 20 71 | 75 69 65 74 5f 6d 6f 64 |if not q|uiet_mod|
|000054e0| 65 20 2a 2f 0a 58 09 20 | 20 20 20 20 20 20 70 72 |e */.X. | pr|
|000054f0| 69 6e 74 66 28 22 5c 6e | 72 73 68 20 25 73 20 25 |intf("\n|rsh %s %|
|00005500| 73 20 26 5c 6e 22 2c 62 | 65 73 74 5f 68 6f 73 74 |s &\n",b|est_host|
|00005510| 2c 72 63 6d 64 5f 65 78 | 65 63 29 3b 20 0a 58 09 |,rcmd_ex|ec); .X.|
|00005520| 20 20 20 20 7d 0a 58 09 | 20 20 20 20 70 70 67 72 | }.X.| ppgr|
|00005530| 70 20 3d 20 67 65 74 70 | 67 72 70 28 67 65 74 70 |p = getp|grp(getp|
|00005540| 70 69 64 28 29 29 3b 0a | 58 09 20 20 20 20 69 66 |pid());.|X. if|
|00005550| 20 28 66 6f 72 6b 28 29 | 29 0a 58 09 09 65 78 69 | (fork()|).X..exi|
|00005560| 74 28 30 29 3b 0a 58 09 | 20 20 20 20 69 66 28 73 |t(0);.X.| if(s|
|00005570| 65 74 70 67 72 70 28 67 | 65 74 70 69 64 28 29 2c |etpgrp(g|etpid(),|
|00005580| 20 70 70 67 72 70 29 29 | 20 0a 58 09 09 70 65 72 | ppgrp))| .X..per|
|00005590| 72 6f 72 28 22 73 74 65 | 70 67 72 70 22 29 3b 0a |ror("ste|pgrp");.|
|000055a0| 58 09 20 20 20 20 65 78 | 65 63 6c 65 28 70 61 74 |X. ex|ecle(pat|
|000055b0| 68 2c 70 61 74 68 2c 62 | 65 73 74 5f 68 6f 73 74 |h,path,b|est_host|
|000055c0| 2c 72 63 6d 64 5f 65 78 | 65 63 2c 28 63 68 61 72 |,rcmd_ex|ec,(char|
|000055d0| 20 2a 29 30 2c 65 6e 76 | 70 29 3b 20 65 78 69 74 | *)0,env|p); exit|
|000055e0| 28 30 29 3b 0a 58 09 20 | 20 20 20 70 65 72 72 6f |(0);.X. | perro|
|000055f0| 72 28 22 22 29 3b 0a 58 | 20 20 20 20 7d 0a 58 65 |r("");.X| }.Xe|
|00005600| 78 69 74 28 30 29 3b 0a | 58 7d 0a 58 0a 58 67 65 |xit(0);.|X}.X.Xge|
|00005610| 74 73 74 61 74 73 28 68 | 6f 73 74 6e 61 6d 65 2c |tstats(h|ostname,|
|00005620| 6c 73 74 61 74 73 29 0a | 58 63 68 61 72 20 2a 68 |lstats).|Xchar *h|
|00005630| 6f 73 74 6e 61 6d 65 3b | 0a 58 73 74 72 75 63 74 |ostname;|.Xstruct|
|00005640| 20 73 74 61 74 73 74 69 | 6d 65 20 2a 6c 73 74 61 | statsti|me *lsta|
|00005650| 74 73 3b 0a 58 7b 0a 58 | 69 6e 74 20 63 3b 0a 58 |ts;.X{.X|int c;.X|
|00005660| 20 20 20 20 63 3d 72 73 | 74 61 74 28 68 6f 73 74 | c=rs|tat(host|
|00005670| 6e 61 6d 65 2c 6c 73 74 | 61 74 73 29 3b 09 2f 2a |name,lst|ats);./*|
|00005680| 20 72 73 74 61 74 20 73 | 65 65 6d 73 20 74 6f 20 | rstat s|eems to |
|00005690| 72 65 74 75 72 6e 3a 09 | 20 20 20 20 2a 2f 0a 58 |return:.| */.X|
|000056a0| 09 09 09 09 2f 2a 09 30 | 20 20 6f 6e 20 73 75 63 |..../*.0| on suc|
|000056b0| 63 65 73 73 09 09 20 20 | 20 20 2a 2f 0a 58 09 09 |cess.. | */.X..|
|000056c0| 09 09 2f 2a 09 31 33 20 | 6f 6e 20 68 6f 73 74 6e |../*.13 |on hostn|
|000056d0| 61 6d 65 20 6c 6f 6f 6b | 75 70 20 66 61 69 6c 20 |ame look|up fail |
|000056e0| 20 2a 2f 0a 58 09 09 09 | 09 2f 2a 09 31 34 20 6f | */.X...|./*.14 o|
|000056f0| 6e 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 74 69 6d |n connec|tion tim|
|00005700| 65 6f 75 74 20 20 20 20 | 2a 2f 0a 58 09 09 09 09 |eout |*/.X....|
|00005710| 2f 2a 09 31 35 20 6f 6e | 20 22 72 73 74 61 74 20 |/*.15 on| "rstat |
|00005720| 6e 6f 74 20 73 75 70 70 | 6f 72 74 65 64 22 20 2a |not supp|orted" *|
|00005730| 2f 0a 58 20 20 20 20 2f | 2a 20 20 49 20 63 68 6f |/.X /|* I cho|
|00005740| 73 65 20 74 6f 20 67 65 | 6e 65 72 61 74 65 20 6d |se to ge|nerate m|
|00005750| 79 20 6f 77 6e 20 65 72 | 72 6f 72 20 6d 65 73 73 |y own er|ror mess|
|00005760| 61 67 65 73 2e 20 20 70 | 65 72 72 6f 72 28 29 20 |ages. p|error() |
|00005770| 64 69 64 6e 27 74 20 2a | 2f 0a 58 20 20 20 20 2f |didn't *|/.X /|
|00005780| 2a 09 67 69 76 65 20 65 | 72 72 6f 72 20 6d 65 73 |*.give e|rror mes|
|00005790| 73 61 67 65 73 20 49 20 | 6c 69 6b 65 64 2e 20 20 |sages I |liked. |
|000057a0| 53 77 69 74 63 68 20 62 | 61 63 6b 20 74 6f 20 70 |Switch b|ack to p|
|000057b0| 65 72 72 6f 72 20 69 66 | 20 79 6f 75 20 20 2a 2f |error if| you */|
|000057c0| 0a 58 20 20 20 20 2f 2a | 09 63 61 72 65 20 74 6f |.X /*|.care to|
|000057d0| 2e 09 09 09 09 09 09 20 | 20 20 20 2a 2f 0a 58 0a |....... | */.X.|
|000057e0| 58 20 20 20 20 73 77 69 | 74 63 68 28 63 29 7b 0a |X swi|tch(c){.|
|000057f0| 58 09 63 61 73 65 20 30 | 3a 0a 58 09 09 62 72 65 |X.case 0|:.X..bre|
|00005800| 61 6b 3b 0a 58 09 63 61 | 73 65 20 31 33 3a 0a 58 |ak;.X.ca|se 13:.X|
|00005810| 09 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|00005820| 2c 22 72 73 74 61 74 20 | 65 72 72 6f 72 20 28 25 |,"rstat |error (%|
|00005830| 64 29 3a 20 22 2c 63 29 | 3b 0a 58 09 09 66 70 72 |d): ",c)|;.X..fpr|
|00005840| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 22 68 6f 73 |intf(std|err,"hos|
|00005850| 74 20 25 73 20 69 73 20 | 75 6e 6b 6e 6f 77 6e 2e |t %s is |unknown.|
|00005860| 5c 6e 22 2c 68 6f 73 74 | 6e 61 6d 65 29 3b 0a 58 |\n",host|name);.X|
|00005870| 09 09 62 72 65 61 6b 3b | 0a 58 09 63 61 73 65 20 |..break;|.X.case |
|00005880| 31 34 3a 0a 58 09 09 66 | 70 72 69 6e 74 66 28 73 |14:.X..f|printf(s|
|00005890| 74 64 65 72 72 2c 22 72 | 73 74 61 74 20 65 72 72 |tderr,"r|stat err|
|000058a0| 6f 72 20 28 25 64 29 3a | 20 22 2c 63 29 3b 0a 58 |or (%d):| ",c);.X|
|000058b0| 09 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|000058c0| 2c 22 68 6f 73 74 20 25 | 73 20 69 73 20 64 6f 77 |,"host %|s is dow|
|000058d0| 6e 20 6f 72 20 75 6e 72 | 65 61 63 68 61 62 6c 65 |n or unr|eachable|
|000058e0| 2e 5c 6e 22 2c 68 6f 73 | 74 6e 61 6d 65 29 3b 0a |.\n",hos|tname);.|
|000058f0| 58 09 09 62 72 65 61 6b | 3b 0a 58 09 63 61 73 65 |X..break|;.X.case|
|00005900| 20 31 35 3a 0a 58 09 09 | 66 70 72 69 6e 74 66 28 | 15:.X..|fprintf(|
|00005910| 73 74 64 65 72 72 2c 22 | 72 73 74 61 74 20 65 72 |stderr,"|rstat er|
|00005920| 72 6f 72 20 28 25 64 29 | 3a 20 22 2c 63 29 3b 0a |ror (%d)|: ",c);.|
|00005930| 58 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |X..fprin|tf(stder|
|00005940| 72 2c 22 68 6f 73 74 20 | 25 73 20 64 6f 65 73 20 |r,"host |%s does |
|00005950| 6e 6f 74 20 73 75 70 70 | 6f 72 74 20 70 72 6f 74 |not supp|ort prot|
|00005960| 6f 63 6f 6c 2e 5c 6e 22 | 2c 68 6f 73 74 6e 61 6d |ocol.\n"|,hostnam|
|00005970| 65 29 3b 0a 58 09 09 62 | 72 65 61 6b 3b 0a 58 09 |e);.X..b|reak;.X.|
|00005980| 64 65 66 61 75 6c 74 3a | 0a 58 09 09 66 70 72 69 |default:|.X..fpri|
|00005990| 6e 74 66 28 73 74 64 65 | 72 72 2c 22 72 73 74 61 |ntf(stde|rr,"rsta|
|000059a0| 74 20 65 72 72 6f 72 20 | 28 25 64 29 3a 20 22 2c |t error |(%d): ",|
|000059b0| 63 29 3b 0a 58 09 20 20 | 20 20 20 20 20 20 66 70 |c);.X. | fp|
|000059c0| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 22 75 6e |rintf(st|derr,"un|
|000059d0| 6b 6e 6f 77 6e 20 65 72 | 72 6f 72 5c 6e 22 29 3b |known er|ror\n");|
|000059e0| 0a 58 09 09 62 72 65 61 | 6b 3b 0a 58 20 20 20 20 |.X..brea|k;.X |
|000059f0| 7d 0a 58 20 20 20 20 72 | 65 74 75 72 6e 28 63 29 |}.X r|eturn(c)|
|00005a00| 3b 0a 58 7d 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |;.X}.END|_OF_FILE|
|00005a10| 0a 20 20 69 66 20 74 65 | 73 74 20 35 35 39 38 20 |. if te|st 5598 |
|00005a20| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 72 73 64 |-ne `wc |-c <'rsd|
|00005a30| 63 6c 6e 74 2e 63 27 60 | 3b 20 74 68 65 6e 0a 20 |clnt.c'`|; then. |
|00005a40| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00005a50| 27 72 73 64 63 6c 6e 74 | 2e 63 27 5c 22 20 75 6e |'rsdclnt|.c'\" un|
|00005a60| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00005a70| 67 20 73 69 7a 65 21 0a | 20 20 66 69 0a 20 20 23 |g size!.| fi. #|
|00005a80| 20 65 6e 64 20 6f 66 20 | 27 72 73 64 63 6c 6e 74 | end of |'rsdclnt|
|00005a90| 2e 63 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |.c'.fi.i|f test -|
|00005aa0| 66 20 27 73 72 76 63 6c | 6e 74 2e 63 27 20 2d 61 |f 'srvcl|nt.c' -a|
|00005ab0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00005ac0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00005ad0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00005ae0| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00005af0| 69 6c 65 20 5c 22 27 73 | 72 76 63 6c 6e 74 2e 63 |ile \"'s|rvclnt.c|
|00005b00| 27 5c 22 0a 65 6c 73 65 | 0a 20 20 65 63 68 6f 20 |'\".else|. echo |
|00005b10| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00005b20| 20 5c 22 27 73 72 76 63 | 6c 6e 74 2e 63 27 5c 22 | \"'srvc|lnt.c'\"|
|00005b30| 20 5c 28 35 38 37 35 20 | 63 68 61 72 61 63 74 65 | \(5875 |characte|
|00005b40| 72 73 5c 29 0a 20 20 73 | 65 64 20 22 73 2f 5e 58 |rs\). s|ed "s/^X|
|00005b50| 2f 2f 22 20 3e 27 73 72 | 76 63 6c 6e 74 2e 63 27 |//" >'sr|vclnt.c'|
|00005b60| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00005b70| 0a 58 2f 2a 0a 58 20 2a | 20 43 6f 70 79 72 69 67 |.X/*.X *| Copyrig|
|00005b80| 68 74 20 28 63 29 20 31 | 39 38 39 2c 20 55 6e 69 |ht (c) 1|989, Uni|
|00005b90| 76 65 72 73 69 74 79 20 | 6f 66 20 52 6f 63 68 65 |versity |of Roche|
|00005ba0| 73 74 65 72 0a 58 20 2a | 20 44 65 70 61 72 74 6d |ster.X *| Departm|
|00005bb0| 65 6e 74 20 6f 66 20 45 | 6c 65 63 74 72 69 63 61 |ent of E|lectrica|
|00005bc0| 6c 20 45 6e 67 69 6e 65 | 65 72 69 6e 67 0a 58 20 |l Engine|ering.X |
|00005bd0| 2a 20 41 6c 6c 20 72 69 | 67 68 74 73 20 72 65 73 |* All ri|ghts res|
|00005be0| 65 72 76 65 64 2e 0a 58 | 20 2a 0a 58 20 2a 20 52 |erved..X| *.X * R|
|00005bf0| 65 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 61 6e |edistrib|ution an|
|00005c00| 64 20 75 73 65 20 69 6e | 20 73 6f 75 72 63 65 20 |d use in| source |
|00005c10| 61 6e 64 20 62 69 6e 61 | 72 79 20 66 6f 72 6d 73 |and bina|ry forms|
|00005c20| 20 61 72 65 20 70 65 72 | 6d 69 74 74 65 64 0a 58 | are per|mitted.X|
|00005c30| 20 2a 20 70 72 6f 76 69 | 64 65 64 20 74 68 61 74 | * provi|ded that|
|00005c40| 20 74 68 65 20 61 62 6f | 76 65 20 63 6f 70 79 72 | the abo|ve copyr|
|00005c50| 69 67 68 74 20 6e 6f 74 | 69 63 65 20 61 6e 64 20 |ight not|ice and |
|00005c60| 74 68 69 73 20 70 61 72 | 61 67 72 61 70 68 20 61 |this par|agraph a|
|00005c70| 72 65 0a 58 20 2a 20 64 | 75 70 6c 69 63 61 74 65 |re.X * d|uplicate|
|00005c80| 64 20 69 6e 20 61 6c 6c | 20 73 75 63 68 20 66 6f |d in all| such fo|
|00005c90| 72 6d 73 20 61 6e 64 20 | 74 68 61 74 20 61 6e 79 |rms and |that any|
|00005ca0| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 2c 0a | documen|tation,.|
|00005cb0| 58 20 2a 20 61 64 76 65 | 72 74 69 73 69 6e 67 20 |X * adve|rtising |
|00005cc0| 6d 61 74 65 72 69 61 6c | 73 2c 20 61 6e 64 20 6f |material|s, and o|
|00005cd0| 74 68 65 72 20 6d 61 74 | 65 72 69 61 6c 73 20 72 |ther mat|erials r|
|00005ce0| 65 6c 61 74 65 64 20 74 | 6f 20 73 75 63 68 0a 58 |elated t|o such.X|
|00005cf0| 20 2a 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 | * distr|ibution |
|00005d00| 61 6e 64 20 75 73 65 20 | 61 63 6b 6e 6f 77 6c 65 |and use |acknowle|
|00005d10| 64 67 65 20 74 68 61 74 | 20 74 68 65 20 73 6f 66 |dge that| the sof|
|00005d20| 74 77 61 72 65 20 77 61 | 73 20 64 65 76 65 6c 6f |tware wa|s develo|
|00005d30| 70 65 64 0a 58 20 2a 20 | 61 74 20 74 68 65 20 55 |ped.X * |at the U|
|00005d40| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 20 52 6f 63 |niversit|y of Roc|
|00005d50| 68 65 73 74 65 72 2e 0a | 58 20 2a 0a 58 20 2a 20 |hester..|X *.X * |
|00005d60| 54 48 49 53 20 53 4f 46 | 54 57 41 52 45 20 49 53 |THIS SOF|TWARE IS|
|00005d70| 20 50 52 4f 56 49 44 45 | 44 20 60 60 41 53 20 49 | PROVIDE|D ``AS I|
|00005d80| 53 27 27 20 41 4e 44 20 | 57 49 54 48 4f 55 54 20 |S'' AND |WITHOUT |
|00005d90| 41 4e 59 20 45 58 50 52 | 45 53 53 20 4f 52 0a 58 |ANY EXPR|ESS OR.X|
|00005da0| 20 2a 20 49 4d 50 4c 49 | 45 44 20 57 41 52 52 41 | * IMPLI|ED WARRA|
|00005db0| 4e 54 49 45 53 2c 20 49 | 4e 43 4c 55 44 49 4e 47 |NTIES, I|NCLUDING|
|00005dc0| 2c 20 57 49 54 48 4f 55 | 54 20 4c 49 4d 49 54 41 |, WITHOU|T LIMITA|
|00005dd0| 54 49 4f 4e 2c 20 54 48 | 45 20 49 4d 50 4c 49 45 |TION, TH|E IMPLIE|
|00005de0| 44 0a 58 20 2a 20 57 41 | 52 52 41 4e 54 49 45 53 |D.X * WA|RRANTIES|
|00005df0| 20 4f 46 20 4d 45 52 43 | 48 41 4e 54 49 42 49 4c | OF MERC|HANTIBIL|
|00005e00| 49 54 59 20 41 4e 44 20 | 46 49 54 4e 45 53 53 20 |ITY AND |FITNESS |
|00005e10| 46 4f 52 20 41 20 50 41 | 52 54 49 43 55 4c 41 52 |FOR A PA|RTICULAR|
|00005e20| 20 50 55 52 50 4f 53 45 | 2e 0a 58 20 2a 2f 0a 58 | PURPOSE|..X */.X|
|00005e30| 0a 58 2f 2a 20 73 72 76 | 63 6c 6e 74 2e 63 20 76 |.X/* srv|clnt.c v|
|00005e40| 65 72 73 69 6f 6e 20 31 | 2e 31 20 20 33 2f 37 2f |ersion 1|.1 3/7/|
|00005e50| 38 39 0a 58 20 2a 20 66 | 6f 72 20 74 68 65 20 27 |89.X * f|or the '|
|00005e60| 6c 62 27 20 6c 6f 61 64 | 20 62 61 6c 61 6e 63 65 |lb' load| balance|
|00005e70| 72 20 2d 20 62 79 20 44 | 65 6b 65 20 4b 61 73 73 |r - by D|eke Kass|
|00005e80| 61 62 69 61 6e 0a 58 20 | 2a 0a 58 20 2a 20 20 20 |abian.X |*.X * |
|00005e90| 2d 44 65 6b 65 20 4b 61 | 73 73 61 62 69 61 6e 2c |-Deke Ka|ssabian,|
|00005ea0| 20 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 52 | Univers|ity of R|
|00005eb0| 6f 63 68 65 73 74 65 72 | 20 45 45 20 44 65 70 61 |ochester| EE Depa|
|00005ec0| 72 74 6d 65 6e 74 0a 58 | 20 2a 20 20 20 28 20 64 |rtment.X| * ( d|
|00005ed0| 65 6b 65 40 65 65 2e 72 | 6f 63 68 65 73 74 65 72 |eke@ee.r|ochester|
|00005ee0| 2e 65 64 75 20 29 20 20 | 28 37 31 36 29 20 32 37 |.edu ) |(716) 27|
|00005ef0| 35 2d 33 31 30 36 0a 58 | 20 2a 2f 0a 58 0a 58 23 |5-3106.X| */.X.X#|
|00005f00| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 70 61 72 |include |<sys/par|
|00005f10| 61 6d 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |am.h>.X#|include |
|00005f20| 3c 73 79 73 2f 73 6f 63 | 6b 65 74 2e 68 3e 0a 58 |<sys/soc|ket.h>.X|
|00005f30| 23 69 6e 63 6c 75 64 65 | 20 3c 6e 65 74 69 6e 65 |#include| <netine|
|00005f40| 74 2f 69 6e 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |t/in.h>.|X#includ|
|00005f50| 65 20 3c 6e 65 74 64 62 | 2e 68 3e 0a 58 23 69 6e |e <netdb|.h>.X#in|
|00005f60| 63 6c 75 64 65 20 3c 73 | 74 64 69 6f 2e 68 3e 0a |clude <s|tdio.h>.|
|00005f70| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 72 69 6e |X#includ|e <strin|
|00005f80| 67 2e 68 3e 0a 58 23 69 | 6e 63 6c 75 64 65 20 22 |g.h>.X#i|nclude "|
|00005f90| 73 74 61 74 73 2e 68 22 | 0a 58 23 69 6e 63 6c 75 |stats.h"|.X#inclu|
|00005fa0| 64 65 20 22 63 6f 6e 66 | 69 67 2e 68 22 0a 58 0a |de "conf|ig.h".X.|
|00005fb0| 58 63 68 61 72 20 2a 70 | 6e 61 6d 65 3b 0a 58 73 |Xchar *p|name;.Xs|
|00005fc0| 68 6f 72 74 09 73 65 72 | 76 65 72 20 3d 20 30 3b |hort.ser|ver = 0;|
|00005fd0| 09 09 09 2f 2a 20 69 6e | 64 69 63 61 74 65 73 20 |.../* in|dicates |
|00005fe0| 77 65 20 61 72 65 6e 27 | 74 20 73 65 72 76 65 72 |we aren'|t server|
|00005ff0| 09 2a 2f 0a 58 73 74 72 | 75 63 74 09 73 6f 63 6b |.*/.Xstr|uct.sock|
|00006000| 61 64 64 72 5f 69 6e 20 | 73 69 6e 3b 09 09 2f 2a |addr_in |sin;../*|
|00006010| 20 61 64 64 72 65 73 73 | 20 6f 66 20 72 65 6d 6f | address| of remo|
|00006020| 74 65 20 68 6f 73 74 09 | 2a 2f 0a 58 0a 58 6d 61 |te host.|*/.X.Xma|
|00006030| 69 6e 28 61 72 67 63 2c | 20 61 72 67 76 2c 20 65 |in(argc,| argv, e|
|00006040| 6e 76 70 29 0a 58 69 6e | 74 20 61 72 67 63 3b 0a |nvp).Xin|t argc;.|
|00006050| 58 63 68 61 72 20 2a 2a | 61 72 67 76 3b 0a 58 63 |Xchar **|argv;.Xc|
|00006060| 68 61 72 20 2a 2a 65 6e | 76 70 3b 0a 58 7b 0a 58 |har **en|vp;.X{.X|
|00006070| 09 46 49 4c 45 20 2a 66 | 64 2c 2a 66 6f 70 65 6e |.FILE *f|d,*fopen|
|00006080| 28 29 3b 0a 58 0a 58 69 | 6e 74 20 73 74 61 72 74 |();.X.Xi|nt start|
|00006090| 2c 20 09 09 09 2f 2a 20 | 77 68 65 72 65 20 69 6e |, .../* |where in|
|000060a0| 20 74 68 65 20 61 72 67 | 76 20 74 68 65 20 63 6f | the arg|v the co|
|000060b0| 6d 6d 61 6e 64 20 62 65 | 67 69 6e 73 20 2a 2f 0a |mmand be|gins */.|
|000060c0| 58 20 20 20 20 70 70 67 | 72 70 2c 09 09 09 2f 2a |X ppg|rp,.../*|
|000060d0| 20 70 61 72 65 6e 74 20 | 70 72 6f 63 65 73 73 20 | parent |process |
|000060e0| 67 72 6f 75 70 09 09 09 | 2a 2f 0a 58 20 20 20 20 |group...|*/.X |
|000060f0| 63 6f 6d 6d 61 6e 64 2c | 09 09 09 2f 2a 20 77 68 |command,|.../* wh|
|00006100| 65 74 68 65 72 20 74 68 | 65 72 65 20 69 73 20 61 |ether th|ere is a|
|00006110| 20 63 6f 6d 6d 61 6e 64 | 20 09 09 2a 2f 0a 58 20 | command| ..*/.X |
|00006120| 20 20 20 76 65 72 62 6f | 73 65 5f 6d 6f 64 65 2c | verbo|se_mode,|
|00006130| 20 09 09 2f 2a 20 61 6c | 6c 20 70 6f 73 73 69 62 | ../* al|l possib|
|00006140| 6c 65 20 6f 75 74 70 75 | 74 09 09 09 2a 2f 0a 58 |le outpu|t...*/.X|
|00006150| 20 20 20 20 71 75 69 65 | 74 5f 6d 6f 64 65 3b 09 | quie|t_mode;.|
|00006160| 09 09 2f 2a 20 6e 6f 20 | 6f 75 74 70 75 74 09 09 |../* no |output..|
|00006170| 09 09 2a 2f 0a 58 0a 58 | 63 68 61 72 20 2a 70 61 |..*/.X.X|char *pa|
|00006180| 74 68 3d 52 53 48 3b 0a | 58 0a 58 63 68 61 72 20 |th=RSH;.|X.Xchar |
|00006190| 2a 64 69 72 3b 0a 58 63 | 68 61 72 20 2a 63 6d 64 |*dir;.Xc|har *cmd|
|000061a0| 5f 65 78 65 63 5b 4d 41 | 58 53 48 42 55 46 5d 2c |_exec[MA|XSHBUF],|
|000061b0| 09 2f 2a 20 63 6f 6d 6d | 61 6e 64 20 74 6f 20 65 |./* comm|and to e|
|000061c0| 78 65 63 75 74 65 20 28 | 6c 6f 63 61 6c 29 09 09 |xecute (|local)..|
|000061d0| 2a 2f 0a 58 20 20 20 20 | 20 2a 72 63 6d 64 5f 65 |*/.X | *rcmd_e|
|000061e0| 78 65 63 5b 4d 41 58 53 | 48 42 55 46 5d 2c 09 2f |xec[MAXS|HBUF],./|
|000061f0| 2a 20 63 6f 6d 6d 61 6e | 64 20 74 6f 20 65 78 65 |* comman|d to exe|
|00006200| 63 75 74 65 20 28 72 65 | 6d 6f 74 65 29 09 09 2a |cute (re|mote)..*|
|00006210| 2f 0a 58 20 20 20 20 20 | 64 62 75 66 5b 4d 41 58 |/.X |dbuf[MAX|
|00006220| 53 48 42 55 46 5d 2c 09 | 09 2f 2a 20 77 6f 72 6b |SHBUF],.|./* work|
|00006230| 69 6e 67 20 64 69 72 65 | 63 74 6f 72 79 20 70 6c |ing dire|ctory pl|
|00006240| 61 63 65 68 6f 6c 64 65 | 72 09 2a 2f 0a 58 20 20 |aceholde|r.*/.X |
|00006250| 20 20 20 68 6f 73 74 5b | 4d 41 58 48 4f 53 54 5d | host[|MAXHOST]|
|00006260| 2c 09 09 2f 2a 20 68 6f | 73 74 6e 61 6d 65 20 70 |,../* ho|stname p|
|00006270| 6c 61 63 65 68 6f 6c 64 | 65 72 09 09 09 2a 2f 0a |lacehold|er...*/.|
|00006280| 58 20 20 20 20 20 62 65 | 73 74 5f 68 6f 73 74 5b |X be|st_host[|
|00006290| 4d 41 58 48 4f 53 54 5d | 2c 09 2f 2a 20 68 6f 73 |MAXHOST]|,./* hos|
|000062a0| 74 6e 61 6d 65 20 70 6c | 61 63 65 68 6f 6c 64 65 |tname pl|aceholde|
|000062b0| 72 09 09 09 2a 2f 0a 58 | 20 20 20 20 20 66 65 6e |r...*/.X| fen|
|000062c0| 74 72 79 5b 4d 41 58 4c | 49 4e 45 5d 3b 09 09 2f |try[MAXL|INE];../|
|000062d0| 2a 20 66 69 6c 65 20 65 | 6e 74 72 79 20 20 20 20 |* file e|ntry |
|000062e0| 20 20 20 20 20 20 20 20 | 20 09 09 2a 2f 0a 58 0a | | ..*/.X.|
|000062f0| 58 66 6c 6f 61 74 20 6d | 79 5f 73 66 61 63 74 6f |Xfloat m|y_sfacto|
|00006300| 72 2c 0a 58 20 20 20 20 | 20 20 62 65 73 74 5f 73 |r,.X | best_s|
|00006310| 66 61 63 74 6f 72 2c 0a | 58 20 20 20 20 20 20 6c |factor,.|X l|
|00006320| 6f 61 64 2c 0a 58 20 20 | 20 20 20 20 66 61 63 74 |oad,.X | fact|
|00006330| 6f 72 2c 6c 69 6d 69 74 | 3b 09 09 2f 2a 20 66 69 |or,limit|;../* fi|
|00006340| 6c 65 20 76 61 72 69 61 | 62 6c 65 73 09 09 09 2a |le varia|bles...*|
|00006350| 2f 0a 58 0a 58 09 69 6e | 74 20 73 6f 63 6b 74 79 |/.X.X.in|t sockty|
|00006360| 70 65 3b 0a 58 09 72 65 | 67 69 73 74 65 72 20 69 |pe;.X.re|gister i|
|00006370| 6e 74 20 73 3b 0a 58 09 | 63 68 61 72 20 62 75 66 |nt s;.X.|char buf|
|00006380| 5b 31 30 32 34 30 5d 3b | 0a 58 09 73 74 72 75 63 |[10240];|.X.struc|
|00006390| 74 20 68 6f 73 74 65 6e | 74 20 2a 68 70 3b 0a 58 |t hosten|t *hp;.X|
|000063a0| 09 73 74 72 75 63 74 20 | 73 65 72 76 65 6e 74 20 |.struct |servent |
|000063b0| 2a 73 70 3b 0a 58 09 63 | 68 61 72 20 2a 73 65 72 |*sp;.X.c|har *ser|
|000063c0| 76 74 79 70 65 3b 0a 58 | 09 73 74 72 75 63 74 20 |vtype;.X|.struct |
|000063d0| 68 6f 73 74 65 6e 74 20 | 2a 67 65 74 68 6f 73 74 |hostent |*gethost|
|000063e0| 62 79 6e 61 6d 65 28 29 | 3b 0a 58 09 73 74 72 75 |byname()|;.X.stru|
|000063f0| 63 74 20 73 65 72 76 65 | 6e 74 20 2a 67 65 74 73 |ct serve|nt *gets|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.