TylerWong
Contributor
Contributor

Get-Stat Not Returning All Data

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?

0 Kudos
1 Reply
LucD
Leadership
Leadership

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.


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

0 Kudos