![]() Here is my script to keep checking downtime for my blog: #!/bin/bash So, checking for DNS and LAN connectivity is a bit overkill for me as I don't have that much specific need to figure out what problem it is. Now I want to make sure that it displays me notification when I do have internet connectivity. So I keep on getting notifications as the script couldn't find 200 in the wget response. ![]() LAN was connected fine but just I couldn't access any site. ![]() Now yesterday, there was some problem with my Internet. If its not 200, it notifies me (I believe this will be better than just pinging it, as the site may under be heavy load and may be timing out or respond very late). I have setup cron to check it every minute.įor this, I am checking the HTTP response code of wget -spider to my blog. My intention at the moment is to check if my blog is down. But I think there must be easy way without the need of checking a site that never crash )Įdit: Seems like there can be a lot of factors which can be individually examined, good thing. One idea I seem is to wget -spider and check the HTTP response code to interpret if the Internet connection is working fine. Is there an easy way to check Internet connectivity from console? I am trying to play around in a shell script.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |