Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Measure server downtime?

Status
Not open for further replies.

RenoWV

Technical User
Mar 16, 2002
156
US
I realize there are scripts that can measure the server uptime and server load, but I was wondering if it's possible to measure server downtime over a specified period. For example, we would access a .shtml page that would say something like "The server was down 4 hours 6 minutes 12 seconds since the first of the month".

Or is something like that impossible because, by definition, the server is not working?

Just curious...
 
Write the date/time to a file during shutdown and during startup. Then you will have a log of downtiome.



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Thanks bluedragon2 -- do you mean by this to use a date/time javascript?

I was actually wondering if there was a perl script that would keep the tally over a longer time period than shutdown/startup, but as I said, that may not be possible...
 
Are you talking about a power down/up or an application down/up?



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
I understand that a website hosted at a moderately priced ISP may be "down" for a minimal amount of time each month -- let's say 2 minutes per day -- due to maintenance needs or whatever. What I don't want of course is for one of my sites to be down for more than that minimally acceptable time.

I sometimes access cgi scripts from my browser that measure the uninterrupted uptime, with readings such as:

15:07:49 up 5 days, 18:00, 0 users, load average: 0.02, 0.03, 0.00

What I'd like to know is whether it's possible for a similar measurement of total DOWN time over a specified time (like 30 days). I've never seen anything like this, but that's not to say that such a tool does not exist. Just wondering if it's a statistic that is possible to measure from the client side, using an installed perl script?
 
Don't know of a script for that function, but there is a perl forum here with some pretty good guru's, might try there.

I wish I had that load average in your example :)

Sorry I couldn't be of more help.



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Thanks for the suggestion bluedragon2 -- I posted the question at the TekTips perl forum...
 
Simply you can get the time by follows and then do calculation.

last | grep reboot <--- get down time
uptime <--- of course get up time

tikual
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top