Mr. C,
Huge amount of work??? a) Google is pretty lean. That is why I selected it. b) Possible, but Unlikely. c) True d) True e) This should be a one-liner. My sed, grep, & awk skills are a hair rusty. f) See (e) above. How would you achieve the task? |
a) Every interval, you are doing:
Code:
date b) I see it occasionally, and wouldn't call it unlikely or remote. I have traceroutes to google.com over the past year; it is unavailable at times. e) the point is - do the hard work lazily; log quickly and efficiently. Standard operating procedure. f) no, its not that easy. Appending to the end of a file is very cheap. Finding your end of record marker requires reading the entire file each and every time you append a new record. Append data quickly, post-process once. If my goal was to maintain uptime data, I would (and do) use apps like smokeping, pingplotter, etc. These are fast, efficient and reliable tools that support multiple routes, graphics, history, etc. If you're interested in testing your network connection, end your queries at the closest router to you that your ISP controls, or one further hop to their gateway. Since this is the only thing you can fix/complain about, there's little point testing connectivity to some (random) remote site. |
Quote:
=================================================== while true do clear #****************************************** ########################################### # Interface for gateway1 GET1=eth1 Provider1=Tataindicom IP1=192.168.1.3 # Interface for gatyeway2 GET2=eth2 Provider2=Airtel IP2=192.168.0.2 ########################################### #****************************************** echo -e " checking .........." echo -e "\n Sending heartbit signal to $Provider1\n" # check Gateway1 #eth1 #HWaddr 00:15:17:62:39:5 #inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 #traceroute -m 5 -s $IP1 gmail.com ###traceroute -m 5 -i $GET1 gmail.com ping -I $IP1 gmail.com -w 3 >>/dev/null net1=$? echo -e "\n Sending heartbit signal to $Provider2\n" # check Gateway2 #traceroute -m 5 -s $IP2 gmail.com ###traceroute -m 5 -i $GET2 gmail.com ping -I $IP2 gmail.com -w 3 >>/dev/null net2=$? ## Print Gateway status echo -e "\n\n\n\n\n\n\n\n\n\t ***************************************************" echo -e "\n\n\n\n\n\t\t `date`" case $net1 in 0) echo -e "\n\n\n\n\n\t\t $Provider1 is UP";; 1) echo -e "\n\n\n\n\n\t\t $Provider1 is DOWN";; esac case $net2 in 0) echo -e "\n\n\n\n\n\t\t $Provider2 is UP";; 1) echo -e "\n\n\n\n\n\t\t $Provider2 is DOWN";; esac echo -e "\n\n\n\n" echo -e "\n\n\n\n\n\n\n\n\n\t ***************************************************" sleep 120 done ====================================================== The routing part i.e. changigh the default gateway is still pending. I have gone through the iproute tutorial but have not got any working solution yet :-( |
Ok, well that explains that.. I was picturing more balanced connection speeds :) thanks for the response.
|
Could any one suggest any linux console application or shell script to check the internet bandwidth ?
thanks |
All times are GMT -5. The time now is 08:11 PM. |