boopathi

uptime

Oct 15th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. leastcount=5min
  2. cron */5min uptime | calculate.sh
  3. cron */day push_metrics.sh
  4.  
  5. calculate.sh:
  6. if prev_value > next_value:
  7. outage+=leastcount
  8.  
  9. push_metrics.sh
  10. percent = 1 - (outage / 24hours)
Advertisement
Add Comment
Please, Sign In to add comment