I would like to write a script to check whethere the application is up or not using unix shell scripts.
From googling I found a script wget -O /dev/null -q http://mysite.com, But not sure how this works. Can someone please explain. It will be helpful for me.
wgetcommand-Ooption tells where to put the data that is retrieved/dev/nullis a special UNIX file that is always empty. In other words the data is discarded.-qmeans quiet. Normally wget prints lots of info telling its progress in downloading the data so we turn that bit off.http://mysite.comis the URL of the exact web page that you want to retrieve.Many programmers create a special page for this purpose that is short, and contains status data. In that case, do not discard it but save it to a log file by replacing
-O /dev/nullwith-a mysite.log.