VMware statistics counters
Note: LPAR2RRD v5.+ versions do not need any VMware counter adjustments anymore.
Bellow text is related to LPAR2RRD v4.x only.
The tool uses statistics data provided by VMware.
When you do not see all data in the UI then you probably need to adjust related counters to the level which allows perf data collection.
If you see all data in the UI then you do not need to modify anything even if some counters are not in level 1.
Data collection is controlled by Historical Statistics Settings.
You can see it by using the vSphere Client. Select tab Administration->vCenter Server Settings, and then select Statistics.
Pay attention to value of 5 Minutes Statistics Level. All metrics counters below should be on the same level or lower, not higher.
Indication of missing counters in logs
If you see below lines in
logs/error.log or
logs/counter-info.txt then you definitly need to adjust some counters (mostly some memory counters are missing together with all datastore counters).
$ tail /home/lpar2rrd/lpar2rrd/logs/error.log
Fault string: A specified parameter was not correct.
querySpec.size
Fault detail: InvalidArgumentFault ./bin/vmw2rrd.pl:2449 :
Tue Feb 02 11:38:34 2016: (F9) not defined real_sampling_period time_stamps= no timestamps for Prod_ResourcePool./bin/vmw2rrd.pl:2491 :
Tue Feb 02 11:38:35 2016: (F9) vmw2rrd failed: RP : Testo_ResourcePool Memory overhead KB average 1 1
SOAP Fault:
-----------
Fault string: A specified parameter was not correct.
querySpec.size
Fault detail: InvalidArgumentFault ./bin/vmw2rrd.pl:2449 :
Tue Feb 02 11:38:39 2016: (F10) not defined real_sampling_period time_stamps= no timestamps for XIV01./bin/vmw2rrd.pl:2491 :
Tue Feb 02 11:38:39 2016: (F13) not defined real_sampling_period time_stamps= no timestamps for XIV02./bin/vmw2rrd.pl:2491 :
Tue Feb 02 11:38:39 2016: (F11) not defined real_sampling_period time_stamps= no timestamps for XIV03./bin/vmw2rrd.pl:2491 :
Tue Feb 02 11:38:39 2016: (F12) not defined real_sampling_period time_stamps= no timestamps for XIV04./bin/vmw2rrd.pl:2491 :
...
$ tail /home/lpar2rrd/lpar2rrd/logs/counter-info.txt
Wed Dec 2 10:00:04 2015: (F1) no real counter for Disk:read:KBps: Host_System:
Wed Dec 2 10:00:04 2015: (F1) no real counter for Memory:active:KB:
Wed Dec 2 10:00:04 2015: (F1) no real counter for Memory:granted:KB:
Check actual status
To view the current status of the Counter Collection Level values :
- Connect to your vCenter Server using the vSphere Client.
- Click Home > Inventory > Hosts and Clusters.
- Click a virtual machine, then click the Performance tab.
- Click Advanced.
- Click Chart Options, then:
- Click Past day under CPU/Mem/Virtual disk/... in the left pane.
- In the Counters list view, check counters
Generally when all required counters are on level
1 then all should work fine.
Use below options for providing global changes.
Collection level change
Use LevelMappingUtility in PowerCLI
- Download and unzip LevelMappingUtility.zip (Also available in KB2009532 from VMware).
The archive contains the required Power CLI functions in VMware.VimAutomation.PowerCliExtensions.CounterLevelMapping.psm1
- Ensure that you have VMware vSphere Power CLI installed.
For more information, see Installing VMware vSphere PowerCLI.
Download VMware vSphere PowerCLI.
-
Import the module in Power CLI:
PS> Import-Module VMware.VimAutomation.PowerCliExtensions.CounterLevelMapping.psm1
-
Identify the counter you want to change (check list of counters below)
In this example counter 'mem.granted.average' is being mapped to level 1.
- Check counter configuration:
PS> Get-PxCounterLevelMapping | where { $_.Name -like "mem.granted.average" }
Name AggregateLevel PerDeviceLevel
---- -------------- --------------
mem.granted.average 2 3
- Map the counters to Level 1 for both levels
PS> Get-PxCounterLevelMapping | where { $_.Name -like "mem.granted.average" } | Set-PxCounterLevelMapping -AggregateLevel 1 -PerDeviceLevel 1
You can omit '-PerDeviceLevel' unless it is below noted.
Use Stats Toolbox
Another way how to change the statistics level of counters is
Stats Toolbox
List of used counters
VMs and ESXi hosts |
Name | Power CLI name | Aggregate | Note |
CPU:usagemhz:MHz | cpu.usagemhz.average | 1 | |
CPU:usage:Percent | cpu.usage.average | 1 | |
CPU:ready:Millisecond | cpu.ready.summation | 1 | |
Disk:usage:KBps | disk.usage.average | 1 | only when Disk:read is not available |
Disk:read:KBps | disk.read.average | 1 | |
Disk:write:KBps | disk.write.average | 1 | |
Network:usage:KBps | net.usage.average | 1 | only when Net:read is not available |
Network:received:KBps | net.received.average | 1 | |
Network:transmitted:KBps | net.transmitted.average | 1 | |
Memory:active:KB | mem.active.average | 1 | |
Memory:granted:KB | mem.granted.average | 1 | |
Memory:vmmemctl:KB | mem.vmmemctl.average | 1 | |
Memory:swapinRate:KBps | mem.swapin.average | 1 | only when is available |
Memory:swapoutRate:KBps | mem.swapout.average | 1 | only when is available |
Memory:decompressionRate:KBps | mem.decompressionRate.average | 1 | only when is available |
Memory:compressionRate:KBps | mem.compressionRate.average | 1 | only when is available |
Cluster |
name | Power CLI name | Aggregate | Note |
CPU:usagemhz:MHz | cpu.usagemhz.average | 1 | |
CPU:usage:Percent | cpu.usage.average | 1 | |
CPU:reservedCapacity:MHz | cpu.reservedCapacity.average | 1 | |
CPU:totalmhz:MHz | cpu.totalmhz.average | 1 | |
Cluster services:effectivecpu:MHz | clusterServices.effectivecpu.average | 1 | |
Cluster services:effectivemem:MB | clusterServices.effectivemem.average | 1 | |
Memory:totalmb:MB | mem.totalmb.average | 1 | |
Memory:shared:KB | mem.shared.average | 1 | |
Memory:zero:KB | mem.zero.average | 1 | |
Memory:vmmemctl:KB | mem.vmmemctl.average | 1 | |
Memory:consumed:KB | mem.consumed.average | 1 | |
Memory:overhead:KB | mem.overhead.average | 1 | |
Memory:active:KB | mem.active.average | 1 | |
Memory:granted:KB | mem.granted.average | 1 | |
Memory:compressed:KB | mem.compressed.average | 1 | |
Memory:reservedCapacity:MB | mem.reservedCapacity.average | 1 | |
Memory:swapused:KB | mem.swapused.average | 1 | |
Memory:compressionRate:KBps | mem.compressionRate.average | 1 | |
Memory:decompressionRate:KBps | mem.decompressionRate.average | 1 | |
Memory:usage:Percent | mem.usage.average | 1 | |
Power:powerCap:Watt | power.powerCap.average | 1 | only when is available |
Power:power:Watt | power.power.average | 1 | only when is available |
Resource Pool |
name | Power CLI name | Aggregate | Note |
CPU:usagemhz:MHz | cpu.usagemhz.average | 1 | |
Memory:shared:KB | mem.shared.average | 1 | |
Memory:zero:KB | mem.zero.average | 1 | |
Memory:vmmemctl:KB | mem.vmmemctl.average | 1 | |
Memory:consumed:KB | mem.consumed.average | 1 | |
Memory:overhead:KB | mem.overhead.average | 1 | |
Memory:active:KB | mem.active.average | 1 | |
Memory:granted:KB | mem.granted.average | 1 | |
Memory:compressed:KB | mem.compressed.average | 1 | |
Memory:swapped:KB | mem.swapped.average | 1 | |
Memory:compressionRate:KBps | mem.compressionRate.average | 1 | |
Memory:decompressionRate:KBps | mem.decompressionRate.average | 1 | |
Datastore |
name | Power CLI name | Aggregate | Note |
Disk:used:KB | disk.used.latest | 1 | |
Disk:provisioned:KB | disk.provisioned.latest | 1 | |
Disk:capacity:KB | disk.capacity.latest | 1 | |
Datastore:read:KBps | datastore.read.average | 1 | |
Datastore:write:KBps | datastore.write.average | 1 | |
Datastore:numberReadAveraged:Number | datastore.numberReadAveraged.average | 1 | |
Datastore:numberWriteAveraged:Number | datastore.numberWriteAveraged.average | 1 | |