The Get-EsxTop cmdlet is a bit of hard nut to crack.
I did some attempts, see here
Using the definition in Interpreting esxtop Statistics (section 4.2.1) for %USD, I came up with something like this.
Note that the loop sleeps for 5 seconds, because that is the esxtop interval.
Can you check if this indeed returns 100% for %USD for the disk involved?
$device = 'mpx.vmhba32:C0:T0:L0'
while($true){
$result = Get-EsxTop -CounterName SCSIDevice | where{$_.DeviceName -eq $device}
$actv = $result | Select-Object -ExpandProperty NumOfActiveCommands
$qlen = $result | Select-Object -ExpandProperty QueueDepth
$usd = $actv/$qlen
Write-Host "$(Get-Date -Format hh:mm:ss.ffff ) %USD = $usd"
Start-Sleep -Seconds 5
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference