WMI

Subhendu Ghosh sghosh at sghosh.org
Tue Mar 23 18:08:39 CET 2004


On Tue, 23 Mar 2004 Matthew.Quinney at hollandandholland.com wrote:

> Subhendu,
> 
> Yes. I'm hoping to see whether some scheduled tasks are running -
> 
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from Win32_Process",,48)
> 
> How far have you got - maybe I could help...?
> 

I have the template working for logical disk space.

I am not using the winmgmts:\\ moniker but the SWbemLocator so I can 
specify different credentials for different hosts if necessary.
Otherwise it assumes your local account has all the necessary privileges 
on every host of interest.

Let me clean up some option handling and I'll forward the template over to 
you.

FYI: you probably noted that Win32_ScheduledJob cannot enumerate Task 
Scheduler... bummer.

-- 
-sg



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list