LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Network cable disconnect alert (https://www.linuxquestions.org/questions/linux-software-2/network-cable-disconnect-alert-444803/)

JRR883 05-14-2006 06:39 PM

Network cable disconnect alert
 
I need a program that will alert me when a network cable has been disconnectedm kinda like in WinXP. A Gnome-based app would be preferable. Sometimes my dad is an asshole and disconnects my patch cable from the router, and I'm not alerted that he has until Gaim can't reconnect. Any candidates?

Simon Bridge 05-14-2006 08:09 PM

There are gdesklets which monitor network traffic - I imagine one of these would help. Most do not seem to tell you if the network is connected or not. I'm not sure how one would go about detecting the connection at the other end ... I guess windows just polls the network periodically: something you too can do.

Some possibilities:
http://www.gxsnmp.org/
http://etherape.sourceforge.net/
http://rubyforge.org/projects/gnms/
https://launchpad.net/products/gnome-netstatus

The hacked way would be to write a script which (say) pings the router and warns you if the router cannot be reached. It could run every few seconds, in the background, and starts running when you login.

cs-cam 05-14-2006 08:46 PM

Write a script that monitors /var/log/messages, when your dad pulls the cable out you'll see a message like this:
Code:

May 14 23:33:20 [kernel] eth0: link down
Replace eth0 with your ethernet link obviously. That message appears when the cable is pulled so it sounds like a neater solution that pinging the router :)

Simon Bridge 05-14-2006 09:06 PM

Hah! Good call cs-cam: only with me it says "May 15 <snip> eth0: Media Link Off" When it's reconnected I get "Media Link On 100mbps full-duplex" Some expermenting will be needed to get the message right - though, the script could just look for eth0 messages and display them...

I wasn't really all that keen on that <imitate=sean_connery> "confirm distance to target: one ping only" </imitate> approach either.


All times are GMT -5. The time now is 06:07 PM.