metalab.unc.edu/pub/Linux/system/status/led-stat.txt -> www.ibiblio.org/pub/Linux/system/status/led-stat.txt
I responded explaining how I used the parallel port to control a sort-of "performance meter". Here's the story: Last year, at school (WPI), Silicon Graphics brought this huge 18-wheel truck that is basically a demonstrationmobile. I'm relatively young (17 at the time), and I'd never seen a computer this big before: It looked like an oversized refrigerator, with cooling ducts running in and out of it! On the front of this beast, was a little LCD backlit readout about the size of my HP-48G's display. It was labeled "CPU Activity", and had a little bar chart showing how hard each processor was working. I thought it would be cool to have one of these mounted on my Linux box :) I finally got a computer of my own this past November, and finally got to run Linux on my own, instead of administering it for a number of people on my floor. I had a Shack attack, and went to Radio Shack, and picked up the following items: a breadboard, a 10-bar LED, breadboard wires, and a package of assorted resistors. Side note: While at the Shack with a few of my suitemates, we were way in back in the component section (the only good part of the store any more), and were approached by a lady who thought we were employees there :). Please contact him for more info, or if you want to use it in a progrm of your own. What I ended up doing was reading the output of 'ps aux', and summing up the %CPU column. I then converted that into a number representing how many LEDs should light, and blast it at the printer port. NOTE: I wrote and built this thing in a bout 90 minutes, so it's quick and dirty, and not at all as elegant as I hoped it to be. This program is covered under the GNU copyleft agreement. If you improve upon this, post it here, so everyone else can see!
|