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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbscript to obtain server uptime for a specific timeframe?

Status
Not open for further replies.

geranimo666

Technical User
Sep 19, 2006
195
US
Hi-

Just wondering if there is a vbscript out there that can achieve server uptime info? I'm tried this one exe called Uptime.exe but it only retrieves a 30day period from the time that you run the tool. What if I want to extract server uptime information from a server from 6 months ago. The amount of time I'd want to pull is 30days worth but what if I need to pull this 30day information specifically from 6 months ago.

If there is such a script, it would be wonderful if you could share it with me.. thanks so much for any support

geranimo..
 
That information is not stored on the system, once the system reboots the uptime counter starts over. About the only thing I can think of that you could do would be to parse your system logs and look for when the system was restarted. You can then use a datediff to get the data you seek.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
The only way that I know of is to run a monitoring tool like MOM all the time. It will give you reports of uptime. markdmac is correct, this is not recorded and kept by Windows. A utility call psuptime.exe will give you current uptime, but past uptime is probably not going to be possible without something recording it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top