Temporary event consumer that issues an alert any time a service changes status (for example, an active service that is paused or stopped).
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServices = objWMIService. _
ExecNotificationQuery("Select * from __instancemodificationevent " _
& "within 30 where TargetInstance isa 'Win32_Service'")
i = 0
Do While i = 0
Set objService = colServices.NextEvent
If objService.TargetInstance.State <> _
objService.PreviousInstance.State Then
Wscript.Echo objService.TargetInstance.Name _
& " is " & objService.TargetInstance.State _
& ". The service previously was " & objService.PreviousInstance.State & "."
End If
Loop
-----Original Message-----
From: John Hicks/MIS/HQ/KEMET/US [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 11:17 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] OT: Utilities needed
Cool, thanks for the info, I will give that a try
"Thornley, Dave H" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]09/20/2002 10:30 AM
Please respond to
[EMAIL PROTECTED]
To"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> cc SubjectRE: [ActiveDir] OT: Utilities needed
You should be able to monitor the Elapsed time and CPU use of any process - Elapsed time isn't pretty (seconds it's been running for) but may do the job...
They're both under the Process counter
dave
-----Original Message-----
From: John Hicks/MIS/HQ/KEMET/US [mailto:[EMAIL PROTECTED]]
Sent: 20 September 2002 13:52
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] OT: Utilities needed
I did not think that I could use perfmon to monitor services. How would you use it to monitor service uptime?
Thanks
"Rick Kingslan" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]09/19/2002 09:09 PM
Please respond to
[EMAIL PROTECTED]
To<[EMAIL PROTECTED]> cc SubjectRE: [ActiveDir] OT: Utilities needed
John,
Though a completely MS solution and not 100% foolproof (though it's worked very well for my needs) setting up a simple perfmon with high and low watermarks with the proper alerting could work here.Rick Kingslan - Microsoft Certified Trainer
MCSE+I on Windows NT 4.0
MCSE on Windows 2000
MVP [Windows NT/2000 Server]
"Any sufficiently advanced technology
is indistinguishable from magic."
--- Arthur C. Clarke
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of John Hicks/MIS/HQ/KEMET/US
Sent: Thursday, September 19, 2002 7:27 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] OT: Utilities needed
I have been having problems with our Lotus Notes administrators making claims of services not running and using extremely high cpu. Of course I am never able to see the problem happening because they will kill the service. Sorry had to vent. I am looking for a utility that I can monitor the uptime of a service and monitor cpu usage of a service. Any suggestions would be greatly appreciated.
Thanks
