VMware Cloud Community
krish290785
Enthusiast
Enthusiast
Jump to solution

Get-Stat for Power Usage of the ESXi Server

Hi All

Need your help in getting a script to capture the power consumption/usage of an esxi host. I checked the get-stat command, I don't see any special argument as power usage to check for the host entity. The time interval can be anything, i would like to see the same values that are showing under for power under the performance charts of an esxi host.

Any quick help would be appreciated.

Thanks in advance

-Bala Krishna Gali If the above info is useful, please mark answer as correct or helpful.
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try like this

001
002
003
004
005

$entity = Get-VMHost -Name MyEsx
$stat = "power.power.average"

Get-Stat -Entity $entity -Stat $stat -Realtime -MaxSamples 1
 


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Try like this

001
002
003
004
005

$entity = Get-VMHost -Name MyEsx
$stat = "power.power.average"

Get-Stat -Entity $entity -Stat $stat -Realtime -MaxSamples 1
 


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

0 Kudos
krish290785
Enthusiast
Enthusiast
Jump to solution

That worked !  Thought no parameters for power stats. Should have check the Get-StatType Smiley Sad

Thanks LucD

-Bala Krishna Gali If the above info is useful, please mark answer as correct or helpful.
0 Kudos