PowerCLI

 View Only
  • 1.  Get-Cluster and Get-Stat to acquire vCenter 7 performance data

    Posted Nov 03, 2022 03:28 AM

    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!



  • 2.  RE: Get-Cluster and Get-Stat to acquire vCenter 7 performance data

    Posted Nov 03, 2022 06:05 AM

    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.