3

I need a calculation to work out the downtime percentage of a server.

I am making a script that runs via cron every minute to check the uptime of a remote server.

The two values I have to play with are number of checks run and times the checks failed (outages).

Is this a plausible way of calculating it? I am thinking it must be but can't be too sure as my Maths skills are slipping away from me with age!

3 Answers 3

3

Here's a simple spreadsheet layout to calculate and keep for historical purposes. You can set goals and apply conditional formatting to your hearts content.

  |   A   |         B        |       C      |      D       |     E
------------------------------------------------------------------------
1 | Month | Minutes in month | Minutes Down | Percent Down | Percent Up
2 | Jan   |            44640 |            1 | =(C2/B2)*100 | = 100-D2
3
  • Thanks very much. I could either use the spreadsheet method or what the spreadsheet is to calculate the total uptime -100-(failures/checks*100)
    – Chris
    Oct 24, 2010 at 15:10
  • Only problem I have noticed is that could cause division by 0 providing there have been no failures.
    – Chris
    Oct 24, 2010 at 15:11
  • 2
    @Chris - Zero divided by something is always zero. Something divided by zero will cause you problems. Because the divisor (minutes in month) is never zero, it shouldn't cause you a problem. Oct 24, 2010 at 15:21
1

Errrm, 100*failures/(failures+successes), or even simpler 100*failures/total-checks ?

0

Here's a modification of Ben's answer that doesn't need an ugly "Minutes in month" column.

  |   A   |       B      |      C                                               |     E
--+-------+--------------+------------------------------------------------------+------------
1 | Month | Minutes Down | Percent Down                                         | Percent Up
2 | Jan   |            1 | =(B2/(DAY(DATE(YEAR(A1),MONTH(A1)+1,1)-1)*1440))*100 | =100-C2
1
  • Thanks everyone for all suggestions. I know it has gone down the excel table route but I am actually looking to make a PHP system. Thanks anyway though because it has helped get my formula :)
    – Chris
    Oct 24, 2010 at 19:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .