Connectivity Monitoring
Hello,
What would be a suggestion(s) for the most reliable BASH script to check if an internet connection is alive and take action if it isn't. I want to this for incase my ISP plays games with my connection. Thank you. |
You could try connecting to a website with lynx, perhaps your ISPs site and check to see if the return code is "200 OK":
lynx -dump -head http://www.google.com | grep HTTP |
You're beautiful....I never thought of that....guess i was thinking of too complex a solution. All i need now is to clean up the return string of 'HTTP/1.1 200 OK' to '200 OK'....but I suppose following a BASH HOWTO wil provide me with that...thanks a million.
|
Try:
lynx -dump -head http://www.google.com|grep HTTP|awk {'print $2" "$3'} |
Hey thanks alot...
...I really have to make sometime to learn to use GREP and AWK. Merci |
All times are GMT -5. The time now is 07:01 PM. |