VMware Cloud Community
Ed_Hunter
Contributor
Contributor

Numbers returned don't match vCenter

I am trying to pull the CPU, Memory averages and maximums for the previous day then display the data for our management team. The numbers I am getting through power CLI are not adding up to what we are seeing in vCenter.

vCenter Version: 6.5.0 Update 3

Powershell Core Version: 6.2.3

Powershell Module Versions:

  • VIM: 6.7.0.13964812
  • VimAutomation.Cis.Core: 11.3.0.13964830
  • VimAutomation.Common: 11.3.0.13964816
  • VimAutomation.Core: 11.3.0.13964826
  • VimAutomation.Sdk: 11.3.0.13964823

Data Snippets

CPU Maximum

Query

`get-stat -Entity $cluster -Stat cpu.usage.maximum -Start $yesterday | select MetricId,Timestamp,Value`

Returned Value

MetricId                      Timestamp                Value      vCenter

--------                        ---------                      -----        -------

cpu.usage.maximum 10/31/19 9:00:00 AM  239.31   55.89

cpu.usage.maximum 10/31/19 8:30:00 AM  224.28   54.43

cpu.usage.maximum 10/31/19 8:00:00 AM  226.17   49.01

cpu.usage.maximum 10/31/19 7:30:00 AM  228.15   50.84

cpu.usage.maximum 10/31/19 7:00:00 AM  212.67   49.56

CPU Average

Query

`get-stat -Entity $cluster -Stat cpu.usage.average -Start $yesterday -IntervalMins 30 | select MetricId,Timestamp,Value`

Maximum

MetricId                   Timestamp                 Value      vCenter

--------                     ---------                       -----       -------

cpu.usage.average 10/31/19 9:00:00 AM  110.01   27.45

cpu.usage.average 10/31/19 8:30:00 AM  120.09   24.77

cpu.usage.average 10/31/19 8:00:00 AM  109.24   26.12

cpu.usage.average 10/31/19 7:30:00 AM   110.2   24.80

cpu.usage.average 10/31/19 7:00:00 AM  114.12   24.15

We have statics level 4 turned on for 5 and 30 minute data.

Only other way I can think to get the data that might be closer to reality would be to get the average of both sockets for each host in the cluster, then take those numbers and get the average of them, and report that at the CPU average and maximum for the entire cluster

0 Kudos
3 Replies
LucD
Leadership
Leadership

How do you retrieve the vCenter values?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Ed_Hunter
Contributor
Contributor

I am logging into vCenter > selecting cluster > Go to monitoring tab > select performance > then select advanced. There I am filtering the chart to the time and date, along with metric to look at.

0 Kudos
LucD
Leadership
Leadership

Not too sure how you are doing this (I can only get a 1-hour as a minimum interval in the WebClient).
When I do this on a test cluster (admittedly with low CPU consumption right now), my numbers seem to match up.

web.png

pcli.png


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos