| Presenting... | Afghan Hound in Hypertext - a total waste of bandwidth production. |
led_stat: A gateway monitor using keyboard leds. |
| Games | Quake | Wibble | Computers | Home I | Home II |
The firewall/gateway in the corner won't boot without a keyboard. (No, there's nothing in the BIOS to change it.) So...how about using an old keyboard controller...and using the leds to show some status indicators?
Good idea? Well, that's what I thought.
So this marvellous software was written. The scroll lock led shows if the modem has carrier. The numlock/capslock leds flash once for every 500 bytes going over the ethernet/ppp interfaces.
See a funky demo. (Needs NN4/M18/NN6 sort of javascript (better on NN4) - or IE4/5 for Solaris *shrug*.)
0.9.0: First release.
0.9.0: First release.
'statserial' (on which the carrier detect code is based) seems to get confused by pppd opening and closing the modem device. I've got round this by cunningly re-opening the device every time, which is probably a performance hit. *sigh*
Parsing /proc/net/dev is probably the least portably way of getting the network device stats. Suggestions welcome.
Autoconf/Automake? - Not for something this small and unportable. Maybe next time.
'ppp0' and 'eth0' are only suggestions. 'eth1', 'tun2', 'lo': They'll all work if you have a different network configuration.
Written by Afghan Hound. Mail led-stat@afghanhound.org.uk if you want.
Copyright (C) 2000 Afghan Hound Software
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Also by this author: If you've enjoyed this
page, you're probably insane. Why not try one of these as well?
| ||
| Comments? Links About | Last modified 03:42 pm, 29/04/03 |