usmangt — 2011-10-23T06:55:11-04:00 — #1
I am making a web application using PHP. I have a script which tells whether the server is up or down. It works fine when i run it. But i need to put this small script in a page and there it should display the output after every 5 minutes whether the server is up or down.
I don't know how to do this in a web application.
cups — 2011-10-23T07:29:08-04:00 — #2
If the server responsible for generating the message is down, by definition its down and wont be putting out any messages - unless you are monitoring another server.
usmangt — 2011-10-23T08:50:52-04:00 — #3
well the script is actually a ping script which tell the result. the application will be run in a dedicated server which allows php to work in shell (linux terminal)
diginetwork — 2011-10-23T09:54:39-04:00 — #4
You can setup a cron job for server status checking script to run every 5 minutes. This will get the server status every 5 minutes. Then you may have to store this data in a database and display the data in your web application from the db.
cups — 2011-10-23T09:55:46-04:00 — #5
Ah, so you are testing whether Server software such as Apache is down rather than the server itself having gone off line...
You might be interested in taking up Googles Application Engine (GAE) "free if it does not consume very much" offer, and funnily enough they supply free demo app sourcecode (in Python anyway) Creating a dashboard to monitor a server each 5 minutes.