Is it possible to get the network average for each ESX host in vCenter? Something like this
ServerName xx%
All that I have found is the following which is not what I want and too much data.
get-vmhost | get-stat -network -Start (Get-Date).AddDays(-1)
Any help would be much appreciated.
or just
ServerName Usage
You would need to get the net.usage.average metric for that.
Note that the metric returns values in KBps, to get a percentage you will need to obtain the maximum throughput capacity.
I don't think the aggregation function works correctly for net metrics.
You would have to retrieve the individual vmnic instances and calculate the average yourself.
Do you really want an average over all vmnics ?
And which time period are looking at ? 1 day ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I am really looking for the top network users with clean output.
Do you mean ESX(i) servers or guests ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I got it working
Get-VMHost | Select Name, @{
N="Net Avg Mbps";E={[Math]::Round((($_ | Get-Stat -Stat net.usage.average -Start (Get-Date).AddDays(-1) | Measure-Object Value -Average).Average) / 1024, 2)}} | Sort Name | FT