Kernel_Killer
March 4th, 2005, 14:27
Does anyone know fo an application that can watch a DSL/Cable/T1 line, and log when it's down?
frisco
March 4th, 2005, 17:56
You mean like nagios?
Or a little script:
#!/bin/sh
while [ 1 ]; do
ping -c10 offsite.router
if [ $? -eq 1 ]; then
echo WARNING: network is down | logger
fi
sleep 60
done
Kernel_Killer
March 5th, 2005, 00:04
I really should setup nagios, but that script should work great. Thanx Frisco!
Kernel_Killer
March 5th, 2005, 00:13
Oh wow! I just looked at your script even closer, and that sleep command is something I've been looking for! Thanx x2!
Kernel_Killer
March 5th, 2005, 16:00
Ok. ICMP will not work in or out of that network. Any other ideas?
Kernel_Killer
March 5th, 2005, 18:29
Ok. I think I'll try a telnet to an open port in the script, and go from there. Looks like I'll be setting up Nagios on our new internal gateway (finally) since the old one is Linux, and that it holds all our client's backups.
frisco
March 5th, 2005, 18:29
Test some other service that is available. At worst, you could:
#!/bin/sh
while [ 1 ]; do
lynx -dump http://www.example.com/ > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo WARNING: network is down | logger
fi
sleep 60
done
But you may get false positives. You could also check other sites and if all are down then there's a better chance the link is down. And depending on the site you're checking, this may be considered abuse.
If you have it, use HEAD (part of perl's libwww) instead of lynx as it will save bandwidth.
Kernel_Killer
March 6th, 2005, 01:06
I'll do it to my site. I'll allow it. :biggrin:
It's bad when you have to watch an ISPs downtime. It's pretty bad. Every cleint has at least gone down once or twice this week. Any suggestions on anything that can also log the bandwidth tunnel?
frisco
March 6th, 2005, 16:18
Any suggestions on anything that can also log the bandwidth tunnel?
Do you mean to test your throughput? You could time a download a file of a specific size, but you're dependant on the reliability of the remote site, and it needs to be a fairsized file or your results won't be statistically relevant.
Kernel_Killer
March 6th, 2005, 17:43
Well, I tested with a krell monitor and a rsync instance. The line is fluctuates big time.