Problem with Win32_PerfRawData_PerfDisk_PhysicalDisk

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Problem with Win32_PerfRawData_PerfDisk_PhysicalDisk

Post by Cylindric »

Hello,

I'm using the wmi.php script from somewhere on these forums (sorry, I can dig out the info if needed) and seem to be having some problems with the numbers received.

I have one script for LogicalDisk stats, and one for PhysicalDisk stats. The logical one is fine, and prints nice numbers for queues and iops. The physical one shows huge (really!) numbers.

Here's an example on one of my DC's:

the Logical Disk data source executes this PHP:

Code: Select all

/usr/bin/php -q /usr/share/cacti-0.8.7d/scripts/wmi.php 
-h '192.168.1.201' 
-u '/etc/cacti/cactiwmi.pw' 
-w 'Win32_PerfRawData_PerfDisk_LogicalDisk' 
-k 'Name' 
-v 'C:' 
-c 'DiskWritesPersec,DiskWriteBytesPersec,DiskReadsPersec,DiskReadBytesPersec,CurrentDiskQueueLength'
and it returns:

Code: Select all

output: 
CurrentDiskQueueLength:0
DiskReadBytesPersec:60407738368
DiskReadsPersec:1773664
DiskWriteBytesPersec:265465877504
DiskWritesPersec:12907286
The graph then looks like this:Image

the Physical Disk data source executes this PHP:

Code: Select all

/usr/bin/php -q /usr/share/cacti-0.8.7d/scripts/wmi.php 
-h '192.168.1.201' 
-u '/etc/cacti/cactiwmi.pw' 
-w 'Win32_PerfRawData_PerfDisk_PhysicalDisk' 
-k 'Name' 
-v '0 C: D:' 
-c 'DiskWritesPersec,DiskReadsPersec,AvgDiskReadQueueLength,AvgDiskWriteQueueLength'
and it returns:

Code: Select all

output:
AvgDiskReadQueueLength:76468935000
AvgDiskWriteQueueLength:108384954000
DiskReadsPersec:1778786
DiskWritesPersec:13555491
Name:0 

The graph then looks like this:
Image

I'm stumped.
Server: Windows Server 2008 R2 x64 (running on a VM, 4Gb RAM)
Cacti: 0.8.8a (using cmd, 270 datasources in 145s)
MySQL: 5.5.16, Apache: 2.2.21, PHP: 5.3.16
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

graph and/or data templates are obviously different. Compared the graph debug and data source debug outputs of both of those? One looks like it's using GAUGE and the other COUNTER.
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Post by Cylindric »

Sorry all, this was a comedy of erros on my part.

The first two counters for bytes read and written are of course indeed Counters, and not Gauages! Ignore my ignorant fumblings.

The last one is a bit of an odd case, in that the WMI Win32_PerfRawData_PerfDisk_PhysicalDisk counter "CurrentDiskQueueReadLength" and "CurrentDiskQueueWriteLength" are indeed Guages, but seem to have an odd scale.

Watching a counter in Perfmon for one example server gives values between things such as 0.003 and 5.211. Pulled in via the WMI script though (so I guess the "raw" counters) give values a little higher than this.

Turns out I have to divide by 10,000,000 to get values that match Perfmon.

Image
(note: the gprinted values are divided by 10^7 to give real numbers, but the line is divided by 10^6 just to make it more visible on the graph)

Now there's a server that needs replacing ;)

My next challenge is to combine all my servers' read- and writes-per-second onto one huge stacked graph to give my enterprise-wide IOP/S figure. Should just be able to use Aggregate, but I'm having trouble with that - might reinstall the plugin...
Server: Windows Server 2008 R2 x64 (running on a VM, 4Gb RAM)
Cacti: 0.8.8a (using cmd, 270 datasources in 145s)
MySQL: 5.5.16, Apache: 2.2.21, PHP: 5.3.16
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Nice lookin' graph and well though out arrangement. Just might have to look into using it ;). One suggestion would be to use the alpha blending features of rrdtool 1.2.
decibel83
Posts: 4
Joined: Sun Aug 03, 2008 3:51 pm

Re: Problem with Win32_PerfRawData_PerfDisk_PhysicalDisk

Post by decibel83 »

Hi Cylindric,
which graph template are you using?
If it's self-made, would you share it on the forum, please?

Thank you very much!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests