Hi,
I searched a few sites, but was unable to locate any code for what I need to accomplish. I just received my Raspberry PI and I am trying to come up with a program that will run 24/7 and monitor my internet connection. I have been having issues with my internet connection and when I ping a site I get a message indicating that the site could not be found. I get the same msg if I bypass my WIFI router and plug directly into the cable modem. I believe the best way to monitor my connection is to ping a website or the DNS server, ignore a valid connection, but log the Date/Time and a non-connect message. Pinging once every 30 seconds, I believe should do the trick. Does anyone know where there may be some code, using Python?
Process:
1- Ping Site
2- Determine connection status
3- If connection is made, igonore and wait 30 seconds and try again
4- If no connection is made, create a record with Date/Time of no connection, and error message
5- Wait 30 seconds and ping again......
It should be interesting to see how many "Site can't be found" messages I will have and see how long the connection was down.
Thanks in advance for any assistance you can offer.
Don