This project is read-only.
Project Description
This is a vbscript utilising the wmi infrastructure to collect events from the system event log to calculate the system availability, and uptime.


This is a vbscript utilising the wmi infrastructure to collect system start, and stop events from the system event log.
This scripts further analyze the collected data, and estimates the server availability for a given time period in seconds and in percent.
The collected events:
  • EventLog 6005 - "The Event log service was started"
  • EventLog 6006 - "The Event log service was stopped"
  • EventLog 6008 - "The previous system shutdown at ... on ... was unexpected."
The information held in those events, including the wmi "InsertionStrings" array and the wmi "TimeWritten" data is the base of the calculations. Mainly the "TimeWritten" parameter is used, so the result is only an estimation, and may be faulty in case the local system clock was changed.
There is only one time correction in the algorithm: When a timestamp of a start event is earlier then the timestamp of the preceding stop event. This usually happens in virtual environment, when the host corrects the clock of the guest on guest-startup procedure. In this case a default 30 sec delay is added to the timestamp of the preceding stop event and this time is used as start-time.
As the whole process is based on vbscript, and wmi, it is capable of querying remote systems as well, and compatible with:
*Windows XP
*Windows Server 2003 (all version)
*Windows Vista
*Windows 2008 Server (all version)
*Windows 2008 Server R2 (all version)
*Windows 7
*Windows 8
*Windows Server 2012

Last edited Feb 1, 2014 at 4:44 PM by placa, version 2