- Finding system downtime
- Posted by Sunny K on September 29th, 2004
Hi,
I have written a program using WMI and C#. The WMI is reading the
selected systems 'Uptime' and I have used C# to search through the
Systems Event Log to look for certain event IDs that show Reboots and
blue screens to see how many of these have occured. The results from
my program are placed into a SQL database on a daily basis.
I now need to find the system downtime in between the reboots and blue
screens that may occur (This is also needed so i can calculate System
Availability). Does anyone know how i can get this information without
it getting to confusing?
Anyway suggestions will be very useful
Thanks
Sunny
- Posted by David on September 29th, 2004
On Wed, 29 Sep 2004 09:37:59 UTC, sunstarwu@yahoo.com (Sunny K) wrote:
Hi Sunny,
Seems you have pretty much everything. The downtime would be
the last reboot time minus the last shutdown time. If direct
correlations can't be found, try watching the service start and
service stop events. Base this on services that refelct your
definition of 'system up'. So if your service matters, monitor
it. If its just the machine, perhaps the network control
services would suffice.
David
- Posted by Sunny K on September 30th, 2004
Hi David,
Thanks for the advice. What you have suggested is exactly what i was
originally going to do. The problem occurs in the scenario of a system
having several reboots or bluescreens in one day! WMI only tells you
the uptime from the last reboot/shutdown. The current Microsoft tool
(Uptime.exe) shows you all this information (How long to reboots took,
represented by downtime), I just need to find out how they do it:-(
Thanks again though
Sunny
- Posted by Randy Howard on September 30th, 2004
In article <1ecdad8f.0409300643.720ed094@posting.google.com>,
sunstarwu@yahoo.com says...
Then don't use that. The solution is fairly simple, unless I am missing
something. You need a very lightweight service that loads at startup
(with or without a login, hence being a service) and records the event.
Similarly, it could log orderly shutdowns. Anytime you have two startup
events with no orderly shutdown in between, you have something worth
looking at.
--
Randy Howard (2reply remove FOOBAR)