Brian D. Chase (chasebd@nextwork.rose-hulman.edu)
22 Jan 1995

This is my own version of the meter program for driving the LED display 
that's described in the led-stat.txt file (included in this archive).  
I know of two other programs to drive the display -- the first being the 
one in led-stat.txt and the 2nd being written in C++.  The C++ version
looked to be some improvement on the original, but it immediately errored 
out on my friend's machine even after a recompile.  Next I compiled the 
original version which worked but spawning off a ps every .75 secs 
to collect CPU usage tended to adversely affect the CPU usage of my 
friend's 386SX/16 :-)  This was a bad thing. The code was an ugly hack 
but I don't hold that against it.  The idea is great.

I ended up doing a re-write in C. (C++ and low level I/O just seem sort 
of silly to me.  It's like writing microcontroller software for your 
toaster in ADA).  Much of the organisation of the program is different, 
it determines the number of lights to turn on using different info, but 
the effect is the same (or similiar I guess).  Most noteably, this program 
impacts your system a lot less than the previous versions.   Okay, maybe 
if you've a 486DX4/100 then spawning off ps's every 3/4ths of a second 
doesn't even cause your machine to slow down a nano-sec, but for those of 
you with less studly systems, I'm sure you'll apreciate this kinder version.

Other nice features include lots of command line options for customizing 
how the program runs.  Read the man pages or run meter with the -h option 
for more info.  I would like to note that since the system load averages 
only get updated every 1 sec (at least I heard that somewhere) it would 
be silly to tell the program to check the load averages at intervals much 
less than 1 sec (1,000,000 usecs) even though you're more than welcome to
provide any reasonable value that fits into at int.  Beware of shooting 
your system in the foot by telling it use parallel I/O ports that aren't 
legitimate addresses.  0x378 is what LPT1 usually is and 0x278 is where 
LPT2 can be found (displays run from LPT2 haven't been tested yet, 
please e-mail if you have any problems).  You can give the program any 
address you want to use with the the -p option but I'm guessing that 
using say... your ethernet I/O address would be a confusing thing if not 
a BAD thing.  If you are brave and/or bored, please feel free to use all 
sorts of values.  E-mail me if you have any interesting results.

I'd like to extend my thanks to Joseph Vigneau for bringing the initial 
idea to light, to mystery person damian@wpi.edu for writing the nifty 
port_out code, to Lige Hensley for putting together the LED circuit and 
providing an unused parallel port to test things on, and to Bruce Calder 
and Lige again for creating Cylon '95 -- running on an Atari 800  (with 
features soon to be incorporated into meter... keep your eyes open for 
the next version.  Muuuhh ha ha ha).

-brian.
