VMware Cloud Community
darkwind
Enthusiast
Enthusiast
Jump to solution

How to calculate CPU contention via Powercli in vsphere 5.5?

Hello everyone!

I installed Vmware Vrealize trial version in my infrastructure.

Vrealize show CPU Contention metric, I want to calculate it via Powercli.

Do you know how to do it? Which Vsphere metrics included in Vrealize CPU contention?

Thanks in advance!

Reply
0 Kudos
1 Solution

Accepted Solutions
darkwind
Enthusiast
Enthusiast
Jump to solution

I found It!

It's cpu.latency.average metric in Vsphere 5.5

You can check it parameter in your cluster via this PowerShell script:

$clusterName = 'ClusterName'

$stat = 'cpu.latency.average'

$esx = Get-Cluster -Name $Cluster | Get-VMHost

$CPU_contention = (Get-Stat -Entity $esx -Stat $stat -Realtime -MaxSamples 1 | Measure-Object -Property Value -Average).Average

$CPU_contention='{0:N1}' -f $CPU_contention -replace ",","."

$CPU_contention

View solution in original post

Reply
0 Kudos
5 Replies
LucD
Leadership
Leadership
Jump to solution

You mean this one ?

contention.png


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

Reply
0 Kudos
darkwind
Enthusiast
Enthusiast
Jump to solution

Hello!

I mean CPU Contention metric from Vrealize Operation Manager.

But I think your metric may be useful for me.

How I can get it via powercli?

I need this metric for cluster.

Thanks in advance!

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

My screenshot comes from a vRO report.

Which one do you mean then ?

Could you perhaps include a screenshot ?


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

Reply
0 Kudos
darkwind
Enthusiast
Enthusiast
Jump to solution

Yes! I mean This metric

contention.png

Reply
0 Kudos
darkwind
Enthusiast
Enthusiast
Jump to solution

I found It!

It's cpu.latency.average metric in Vsphere 5.5

You can check it parameter in your cluster via this PowerShell script:

$clusterName = 'ClusterName'

$stat = 'cpu.latency.average'

$esx = Get-Cluster -Name $Cluster | Get-VMHost

$CPU_contention = (Get-Stat -Entity $esx -Stat $stat -Realtime -MaxSamples 1 | Measure-Object -Property Value -Average).Average

$CPU_contention='{0:N1}' -f $CPU_contention -replace ",","."

$CPU_contention

Reply
0 Kudos