LED blinking on your switch
April 9, 2008
Did you ever have the problem that you didn’t know to which switch port a given ethernet port /cable is connected to? Wouldn’t it be cool if the LED of the switch port would blink so you know which one is the correct one?
You’re lucky – it is possible with Linux. There are even two ways. With some chipsets ethtool -p eth0
works but not with all. But following script also helps in any case:
#/bin/bash
# usage example: blink.sh eth0
while true ; do
ifconfig $1 down
sleep 2
ifconfig $1 up
sleep 2
done
Put that script into /usr/local/sbin/blink.sh
and set the execution permissions. Call it with the device as parameter. Don’t set the blinking below 2sec as it is possible that the connection negation takes up to that amount of time.
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Powered by WordPress
Entries and comments feeds.
Valid XHTML and CSS.
35 queries. 0.062 seconds.