PowerCLI

 View Only
  • 1.  Get-Stat Not Returning All Data

    Posted Oct 23, 2019 01:12 AM

    I'm having some problems with the Get-Stat command not returning all the data that I expect. I'm trying to get a lot of historical data extracted.

    Here is the command I'm running:

    Get-VM -Name $VM_NAME | Get-Stat -Stat "cpu.usage.average"  -Start 04/17/2019 -IntervalSecs 40

    When I run this I only get data from the last hour, but when I remove the "IntervalSecs" argument, I can see data dating back to 4/17/19 or what my "Start" argument defines, albeit on a daily interval.

    What am I doing wrong? Is the output getting truncated? Is the "IntervalSecs" too low to go that far back?



  • 2.  RE: Get-Stat Not Returning All Data

    Posted Oct 23, 2019 06:56 AM

    Statistical data is aggregated for the different Historical intervals.

    The 1 Day interval is data aggregated for a 5 minute interval, and so on.

    Have a look at my PowerCLI & VSphere Statistics – Part 1 – The Basics post for more details.