VMware Cloud Community
ALTA2048
Contributor
Contributor
Jump to solution

Cluster Metrics data equivalence (Cluster CPU Usage and Cluster MEM Usage)

Hi Everyone,

I am looking for an equivalence to the following metrics :

$ViewCluster = Get-View -ViewType ClusterComputeResource -Filter  @{Name = $ClusterName }

$ViewHosts = $ViewCluster.host.ForEach({ Get-View -Id $_ })

$ViewVMs = $ViewHosts.vm.ForEach({ Get-View -Id $_ })

$viewclusterpool = Get-View -Id $ViewCluster.ResourcePool

Does the CPU usage be  approximately the same ?

$ViewCluster.Summary.UsageSummary.CpuEntitledMhz

is similar to:

$($ViewHosts.Summary.QuickStats.OverallCpuUsage | Measure-Object -Sum).sum

is similar to:

$($ViewVMs.Summary.QuickStats.OverallCpuUsage | Measure-Object -Sum).Sum

Sums of VMs metrics make sense in the resource pool object  but I am looking for Cluster CPU usage

We find similar values for MEM  :

$viewclusterpool.summary.QuickStats.HostMemoryUsage

is similar to

$($ViewVMs.Summary.QuickStats.HostMemoryUsage | Measure-Object -Sum).Sum

and it look like the Cluster Mem usage also, but we cannot find the value from a cluster object.

Thanks

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Yes, that is correct.

One point to remember, these values are calculated by the DRS load balancing service, which runs on a 5-minute interval.


It might also be interesting to look at the "Entitled" vs "Demand" properties, to recognise VMs potentially lacking resources.
The "Demand" values are showing what the powered-on VMs in the cluster are asking for vs the "Entitled", which shows what they are actually getting.
But then again, don't look at these values on their own, combine with other metrics like for example CPU REady


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

View solution in original post

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

I'm not sure what the question actually is.


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

Reply
0 Kudos
ALTA2048
Contributor
Contributor
Jump to solution

Hi,

I apologize , I now realize that this is not really clear.

Just looking for Cluster CPU Usage in GHz and Cluster Memory Usage in GB

Not sure about what metric is showing that.

Is that shown via:

$ViewCluster.Summary.UsageSummary.CpuEntitledMhz /1000

and

$Viewcluster.Summary.UsageSummary.MemEntitledMB/1kb ?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Yes, that is correct.

One point to remember, these values are calculated by the DRS load balancing service, which runs on a 5-minute interval.


It might also be interesting to look at the "Entitled" vs "Demand" properties, to recognise VMs potentially lacking resources.
The "Demand" values are showing what the powered-on VMs in the cluster are asking for vs the "Entitled", which shows what they are actually getting.
But then again, don't look at these values on their own, combine with other metrics like for example CPU REady


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

Reply
0 Kudos
ALTA2048
Contributor
Contributor
Jump to solution

Thanks a lot for the clarification,

I think the 5 minutes delay is precise enough for the Cluster point of view.

Will probably add  more metrics like :

Get-stat -Entity $vmname -stat Cpu.Ready.Summation  -Finish $(Get-Date) -Start $(Get-Date).AddDays(-1) 

in order to have a better idea of the CPU ready Consumtion.

Reply
0 Kudos