[mrtg] WMI part II

Anthony Scott ascott at triadfoodsgroup.com
Mon Mar 10 16:53:33 MET 2003


Hi.
Ok. I have a cfg file and a vbscript. If used alone the vbscript works fine. If I run the cfg file alone from the command line, it does not report any errors. Yet, nothing appears on the graph.... 
This is running on Windows 2000 Server SP3
below are the cfg and vbs files in question.
Thanks!!
 
## CFG FIle ########
WorkDir: C:\inetpub\wwwroot\mrtg
LogFormat: rrdtool
PathAdd: C:/mrtg/bin
PathAdd: C:/rrdtool/perl-shared/t
PathAdd: C:/rrdtool/src/tool_release
LibAdd: C:/rrdtool/perl-shared
LibAdd: C:/mrtg/bin
##################################################################
MaxBytes[_]: 100
AbsMax[_]: 100
##################################################################
# Set gauge, to treat the values gathered from target as absolute
# and not as counters.
Options[_]: gauge transparent
##################################################################
Target[Test_Wmi]: `cscript //nologo c:\mrtg\bin\northfield\test.vbs`
Title[Test_Wmi]: Test_Wmi Analysis
PageTop[Test_Wmi]: <H1>Test_Wmi  Analysis</H1>
#MaxBytes[Test_Wmi]: 180
#AbsMax[Test_Wmi]: 1250000
#Options[Test_Wmi]: gauge
YLegend[Test_Wmi]: percent
ShortLegend[Test_Wmi]: per
Legend1[Test_Wmi]: PercentProcessorTime
Legend2[Test_Wmi]: PercentUserTime
Legend3[Test_Wmi]: PercentProcessorTime
Legend4[Test_Wmi]: PercentUserTime
WithPeak[Test_Wmi]: ymwd
unscaled[Test_Wmi]: ymwd
RunAsDaemon: yes
Interval: 5
##### End CFG #########################
#
##### VBS File #########################
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfRawData_PerfOS_Processor",,48)
For Each objItem in colItems
    Wscript.Echo "PercentProcessorTime: " & objItem.PercentProcessorTime
    Wscript.Echo "PercentUserTime: " & objItem.PercentUserTime
  Next
#### End VBS File ######################
 

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list