VMware Cloud Community
red888
Contributor
Contributor

Trying to understand the "latest" metric rollup type

I'm looking at the readIOSize metric for virtualdisks. It checks the "Average read request size in bytes". Its rollup type is latest.

I grab this metric using Get-Stat with a start time of the last 3600 seconds and get 14 metrics back.

How do I aggregate these metrics, I'm not sure what this means. What does "latest" mean? Is this the "average read request size in bytes" over the Realtime period? Every 20 seconds its taking the average? That wouldn't make sense because my start time is -3600 secs and I'm only getting back 14 metrics.

0 Kudos
1 Reply
LucD
Leadership
Leadership

That is correct, it's the observed value over that interval.

But you should get 3600/20*(nr of vdisks) observations back.

Some might have a value of zero, but there should be an observation.

Try with the following, for whatever of your VMs.

It should show 180 (+/- 1 depending on the timing) observations for each vDisk.

$vm = Get-vm MyVM

Get-Stat -Entity $vm -Realtime -Start (Get-Date).AddHours(-1) -Stat virtualdisk.readIOSize.latest |

Group-Object -Property Instance | %{

    Write-Host "Start: $($_.Group[0].Timestamp) Finish: $($_.Group[-1].Timestamp)  vDisk:  $($_.Group[0].Instance)  Obs: $($_.group.Count)"

}


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