Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Availability
#1

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.


Attached Files
.rar availability.rar Size: 863 bytes  Downloads: 610

[Image: kavove-zrnka-lajna.jpg]
Coffee phreak!
Reply
#2

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!
Reply




Users browsing this thread: 1 Guest(s)