get the IOPS / s and flow rate for each card of vmhba

Hi, I have seen a few difficulties for the IOPS / s and flow stat for esxi for each vmhba card get the average, max, min

I can get some network like net.usage.average, net.received.average and net.transmitted.average parameters as the metric is consolidated for all the network card.

Here is the part of the classic script I use

$metrics = "net.received.average", "net.transmitted.average".

Get-Stat - entity $esx - start $start - finishing $stop - MaxSamples 10000 - Intervalmin 30 - stat $metrics |

Group-object - property {$_.} @entity.name} | %{

$esxname = $_. Group [0]. @entity.name

$hard = (get-VMhost-name $esxname) .extensiondata. Summary.Hardware

$netreceived = $_. Group | where {$_.} MetricId - eq "net.received.average" - and $_. {Instance - eq ""} | Measure-object-property value - average - Maximum - Minimum

$nettransmit = $_. Group | where {$_.} MetricId - eq "net.transmitted.average" - and $_. {Instance - eq ""} | Measure-object-property value - average - Maximum - Minimum

and so now, but on the storage card, consolidated metrics do not exist...

Thank you very much!

Try something like this

$esx = Get-VMHost MyEsx$stat = "storageAdapter.numberReadAveraged.average","storageAdapter.numberWriteAveraged.average"$start = (Get-Date).AddMinutes(-5)

Get-Stat -Entity $esx -Stat $stat -Start $start |Group-Object -Property Instance,Timestamp | %{$_ |Select @{N="Timestamp";E={$_.Values[1]}},@{N="Instance";E={$_.Values[0]}},@{N="Read IOPS";E={$_.Group | where {$_.MetricId -eq "storageAdapter.numberReadAveraged.average"} | %{$_.Value/$_.IntervalSecs}}},@{N="Write IOPS";E={$_.Group | where {$_.MetricId -eq "storageAdapter.numberWriteAveraged.average"} | %{$_.Value/$_.IntervalSecs}}}}

It uses more or less the same concept that I used in my post to get the OPS are / s maximum .

Tags: VMware

Similar Questions

Maybe you are looking for