NAME
tleds, xtleds - Blinks keyboard LEDs indicating incoming and outgoing network packets.
SYNOPSIS
tleds [-bchkqv ] [-d N ] interface_name
xtleds [-bchkqv ] [-d N ] interface_name
DESCRIPTION
These programs help you monitor network traffic. They blink Scroll-Lock LED (Light Emitting Diode) when a network packet leaves the machine, and NumLock LED when one is received.
tleds can be started on Virtual Terminal (VT) without X-libraries (Xlib) installed. After started, the user can switch to X and tleds will be able to blink LEDs if there is "Xleds 2 3" in the Keyboard section of the /etc/X11/XF86Config.
xtleds can be started/run both on X and VT, and needs libX11.so You will need the line "Xleds 2 3" in the XF86Config (see also BUGS)
tleds and xtleds when started from VT, and run as non root, need their tty to do ioctl(2) to change LEDs, so also when running in the background and ignoring SIGHUP, one cannot exit from the VT or tleds will exit itself.
When run as EUID root, tleds and xtleds can run in the background without tty. Will use ioctl(2) of /dev/console and therefore can be started for example in boot-up script, eg. in /etc/rc.d/rc.local (see the last EXAMPLE) If you want to have correct CapsLockLED in VTs, use the -c option.
If you want to use xtleds with XFree v3.2 or v3.3, I suggest you run tleds instead as EUID root so you won't have to disable XKEYBOARD extension. (XkbDisable)
PARAMETER
interface_name is the name of your interface which you want to monitor. You can check your interface devices simply with cat(1). cat /proc/net/dev
-b Don't run on the background. Usefull when debugging and profiling.
-c Can be set only when running EUID root. Will fix CapsLock LEDs in VTs. Without this also the CapsLock LED is detached from actual keyboard flags (see setleds(1) why). Processing CapsLock will take little more CPU time, so if you mainly use X, you won't need this.
-d {N}
Set update delay in milliseconds. N must be between 1 and 10000 ms. Without -d the default for eth* (ethernet) device is 100 ms and 200 ms for others like: ppp* (Point to Point Protocol), sl* (SLIP) and lo (loopback).
-h Gives short help.
-k Kills an old tleds process running.
-q Is pretty quiet. Doesn't tell you in the start what it will do.
-v Gives version information.
tleds ppp0
Starts tleds in the background and with 200 ms (default) update delay. PPP (Point to Poing Protocol) interface #0 is monitored.
tleds -d 100 ppp0
Starts monitoring the interface ppp0 updating every 100 ms.
tleds -qd 50 eth0
Blinks LEDs looking what comes and goes from eth0 (ethernet) every 50 ms. Starts quietly.
tleds -c eth1
On eth1 and update delay is 100 ms (default). Will be able to indicate correct CapsLock state in VTs because the -c flag, IF started as EUID root.
xtleds -vbd 200 lo
Loopback device (lo) and shows version information, delay 200 ms. Runs using X-Windows if started from xterm, and VT (ioctl) if started in VT. Doesn't fork itself in the background. You can test this on an other xterm window: ping -c 20 localhost
tleds -k
Kills the beast, tleds/xtleds, runnning if there is such.
echo "/usr/bin/tleds -qcd 50 eth0" >>/etc/rc.d/rc.local (Done as EUID root) Will start tleds in the boot-up, running always in the backgroud. Starts quietly. Shows correct CapsLock state with CapsLock LED in VTs. Will monitor eth0 with 50 ms update delays.
FILES
/proc/net/dev
/tmp/tleds.pid
/var/run/tleds.pid
/etc/X11/XF86Config
AUTHOR
tleds and xtleds was made by Jouni Lohikoski <Jouni.Lohikoski@iki.fi>.
COPYRIGHT
Copyrighted and released under GNU General Public License (GPL).
URL
<URL:http://www.iki.fi/Jouni.Lohikoski/tleds.html>
SEE ALSO
setleds(1), xset(1), XF86Config(4), console_ioctl(4)
BUGS
I hope not. Please e-mail me when you find them. xtleds on XFree v3.2 and v3.3 doesn't work unless you put "XkbDisable" in the Keyboard section of XF86Config. Will get SIGSEGV if tried to monitor network device which doesn't support /proc filesystem, eg. dummy.
One comment: kernel should enable deattach LEDs separately. Now it's all or none, and these programs has to do some hacks with -c option.
DATE
Version 1.00 released on The Judgment Day, 29th August 1997