Ashus.ashus.net

Full Version: Availability
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Simple script, that pings every 10 minutes a stable internet address. The number of successful pings is added to a new line of a data file.
Included PHP script counts relevant nonzero lines from the end of datafile and equates a percentage of availability last month.

If results are to be accurate, it is required for the server to run 24/7 and for cron to run the script regularly. If the server freezes and is kept frozen for an hour, the percentage may still output 100% incorrectly. On the other hand, the script doesn't require much resources and is as lightweight as it can be.
Ashuse post_id=83 time=1187355537 user_id=2 Wrote:Simple script, that pings every 10 minutes a stable internet address. The number of successful pings is added to a new line of a data file.
Included PHP script counts relevant nonzero lines from the end of datafile and equates a percentage of availability last month.

Just the script I needed I hope it still works!