[mrtg] Re: WMI part II

Anthony Scott ascott at triadfoodsgroup.com
Mon Mar 10 17:23:52 MET 2003


Hey, no problem.


Here is the raw output:
PercentProcessorTime: 18232914042816
PercentUserTime: 1773669411360
PercentProcessorTime: 18232914042816
PercentUserTime: 1773669411360

I don't know why it is doubled, but it is...
Thanks!

-----Original Message-----
From: Williams, Garth [mailto:gkwilliams at epcor.ca]
Sent: Monday, March 10, 2003 10:09 AM
To: Anthony Scott
Subject: RE: [mrtg] WMI part II


Hi Anthony.

I got your message about WMI earlier, and should have replied.  I was
not ignoring, but have been very busy at work (between two customers),
and with a broken arm, my motivation has lacked somewhat.

What values does your script return when run from a command line?

g


-----Original Message-----
From: Anthony Scott [mailto:ascott at triadfoodsgroup.com] 
Sent: Monday, March 10, 2003 8:54 AM
To: MRTG (E-mail)
Subject: [mrtg] WMI part II


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





This message scanned for viruses by the EPCOR anti-virus gateway.







This e-mail contains confidential information that is proprietary to EPCOR and its subsidiary companies in all respects. This information is intended only for the person(s) named in the destination address. Distribution, copying or disclosure is strictly prohibited. If you receive this e-mail in error, please delete it immediately.

This message scanned for viruses by the EPCOR anti-virus gateway.



--
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