With VOIP this seems an increasingly enduring issue
In these times of VOIP the need for continuous Internet service is of growing importance.
In appreciation of this {old!} thread and Linux in general I've been evolving a similar thing (having largely started with this thread) for a cable connection that degrades following a number of months of stability. It then has micro outages. Catching the data is essential to support the case to the ISP to fix the issue, instead of the first level support saying well your modem's up now so the problem's probably fixed...!
I logged pings for some time, of course the logs grow quite rapidly when one does a ping to the ISP every minute... and a large log file is produced where one has to find the needles in the hay stack... I looked into using a date time stamp with a searchable message... e.g. "Ping Failure" however having spent quite a few hours on this I've come to realise all that I need to log is ping failures. I now use cronttab to run the file cronping.sh every minute, thus:
#/bin/bash
#if ping -c 1 {ISP or other Ping target} | tail -1 >> /var/log/ping.log; then #I think this failed...
if ping -c 1 {ISP or other Ping target}; then
#date +"%D %r Ping Success" >> /var/log/ping.log
#date +"%D %r Ping Success" >> /var/www/ping.log
else
date +"%D %r Ping Failure" >> /var/log/ping.log
date +"%D %r Ping Failure" >> /var/www/ping.log
fi
[/end of file]
The use of the apache root directory allows a quick browse of any network failures from any browser on the LAN. The option to record successful pings can be uncommented. Yes I probably could just log to one place, its a reflection of how the code evolved.
Possible Evolution: I might look into some sort of notification, email comes to mind however that is only going to work when I am back on line. Suggestions? I might also add traceroute, thinking about where the codes now got to that would probably be easy to add in. Comments or improvements welcomed.
|