VMware Cloud Community
klancy43
Contributor
Contributor

Get-Cluster and Get-Stat to acquire vCenter 7 performance data

Sorry for the dumb and old question.

I'm trying to use powercli to get the performance (resource utilization) data from vCenter 7 clusters instead of using webUI.

The demand is to collect just a result of the percentage of average/max utilization of cpu(or memory...etc)calculated from a specific cluster between specific time range. Like what performance chart shows.

The commandline I use to test is : Get-Cluster -Name "this_is_my_cluster" | Get-Stat -Stat "cpu.usage.average" -Start "11/01/2022" -Finish "11/02/2022"

However, the output is a list of cpu.usage.average(samples from every half hour), which doesn't match what i need.

Does anyone know which parameters should/shouldn't be included?

thanks in advance!:sad_but_relieved_face:

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Performance data is aggregated, meaning the original data, from the 20 seconds intervals, is averaged to 30-minute intervals.
And then to 2 hours and finally 1 day.
If you go back further in time than 24 hours you end up in Historical interval 2, which presents metric data for 30-minute intervals.

See my PowerCLI & vSphere statistics – Part 1 – The basics post for a bit more background information on this.


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

Reply
0 Kudos