Quote:
Originally Posted by glorsplitz
I'm doing the following nohup to a text file, caught it offline once overnight.
/bin/ping -vi 180 www.comcast.net | while read pong; do /usr/bin/echo "$(/usr/bin/date): $pong"; done
|
That's just monitoring the connectivity to that website.
Do you want to monitor your connection to your ISP or to the internet in general?
If it's your connectivity to the internet in general then you should consider something more than pinging one website. I'd suggest a combination of their website and something else that generally has known high availability, such as ping 8.8.8.8 (Google's DNS service)
If you're looking to just monitor your link then ping the next-hop after your modem/router, effectively what your modem/router is using as its default gateway.
Depending on how much access you have to your modem/router you may even be able to tell it to send logs to an rsyslog daemon running on a remote machine.