ALINK="#FF0000">

"Linux Gazette...making Linux just a little more fun!"


A Visual Packet Monitor

By Larry Ayers


Introduction

For the past few years I've used internal modems, but I still miss the flickering lights on the first modem I ever used, an external unit which seemed fast at the time. One of these lights indicated incoming data-packets while another showed the outgoing. The advantages of these inobtrusive lights were that they didn't occupy screen real-estate and they could be monitored with peripheral vision.

Recently Matthew Bevan released a new version of NetLED, a small utility which monitors any of several interfaces such as PPP, SLIP, or ethernet using the keyboard's light emitting diodes (LEDs). This is a great idea, since these LEDs aren't particularly useful in their native state. I've never had any use for the Caps Lock key, or its LED; I like to have that key generate the Escape key key-code (easing VI mode-switching), which leaves its LED open for alternate uses such as NetLED.

NetLED is a tiny program (meant to be run as a daemon) which can be left running even when a network interface is inactive. The command syntax is simple:

netled [console] [interface]

As an example, I use it to monitor activity on a dial-in PPP connection:

netled console ppp0

The console parameter, if just "console" is specified, allows the LEDs to flash on all consoles, while ppp0 tells the program to monitor the first PPP device. Substitute eth0 in order to monitor the first ethernet device.

A strongly worded warning in the README file encourages the user to follow the recommended syntax:

     NOTE: DO NOT PREPEND /DEV/ TO ANY OF THE DEVICES!!!
     I MOCK ANYONE WHO ASKS ME HOW TO FIX THEIR COMPUTER
     WHEN THEY ARE DOING THIS!

     PROPER: netled console lo
     NOT: netled /dev/console /dev/loop0

I'm curious as to the nature of the dire consequences implied by this warning, but not curious enough to try it!

NetLED can be started manually (I've aliased  'netled console ppp0'  to  'led') or it could be started in either an init script or as an addition to a PPP start-up script.

If you would like to try it out, the source code can be obtained from this WWW site:

http://mars.ark.com/~mbevan/netled/.


Last modified: Sat May 1 12:15:07 CDT 1999


Copyright © 1999, Larry Ayers
Published in Issue 41 of Linux Gazette, May 1999


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next