HP EVA WMI by VBS

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
boatrke1
Posts: 15
Joined: Fri Oct 13, 2006 4:29 pm

HP EVA WMI by VBS

Post by boatrke1 »

I'm looking at graphing HP EVA port statistics on the controllers.

I'm using the following vbs script:

Code: Select all

On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

arrComputers = Array("XXX")
For Each strComputer In arrComputers


   Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
   Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PerfRawData_EVAPMEXT_HPEVAHostPortStatistics", "WQL", _
                                          wbemFlagReturnImmediately + wbemFlagForwardOnly)

   For Each objItem In colItems
      WScript.Echo "Name: " & objItem.Name
      WScript.Echo "AvQueueDepth: " & objItem.AvQueueDepth
      WScript.Echo "ReadKBPers: " & objItem.ReadKBPers
      WScript.Echo "ReadLatencyus: " & objItem.ReadLatencyus
      WScript.Echo "ReadReqPers: " & objItem.ReadReqPers
      WScript.Echo "WriteKBPers: " & objItem.WriteKBPers
      WScript.Echo "WriteLatencyus: " & objItem.WriteLatencyus
      WScript.Echo "WriteReqPers: " & objItem.WriteReqPers
      WScript.Echo
   Next
Next
There are four controller port items returned from the script

Name: 5000-1FE1-xxxx-xxxx:H14O:FP2
AvQueueDepth: 3
ReadKBPers: 4593
ReadLatencyus: 1662
ReadReqPers: 117
WriteKBPers: 333
WriteLatencyus: 249
WriteReqPers: 29

Name: 5000-1FE1-xxxx-xxxx:H14O:FP1
AvQueueDepth: 0
ReadKBPers: 0
ReadLatencyus: 0
ReadReqPers: 0
WriteKBPers: 0
WriteLatencyus: 0
WriteReqPers: 0

Name: 5000-1FE1-xxxx-xxxx:H12I:FP2
AvQueueDepth: 4
ReadKBPers: 5687
ReadLatencyus: 2718
ReadReqPers: 307
WriteKBPers: 967
WriteLatencyus: 798
WriteReqPers: 24

Name: 5000-1FE1-xxxx-xxxx:H12I:FP1
AvQueueDepth: 4
ReadKBPers: 1145
ReadLatencyus: 3956
ReadReqPers: 50
WriteKBPers: 209
WriteLatencyus: 185
WriteReqPers: 41

Is there an easy way to graph each port's statistics from this output? Or, do I need to create a vbs script for each controller name?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Take a read through this http://forums.cacti.net/viewtopic.php?t=11288 on how to make a script work in Cacti.

Cacti expects script data to be in the format of: field1:data1 field2:data field3:data, etc. Returns are bad.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest