Hi
I have an older ibm chassis that has a 10 gb backplane that has traffic split between virtual nics. The split is 80% and 10% and 10%, in the hosts I'm trying to get networks stats from vmnic 6 and vmnic 7 to see if they hit 1GB limit at any point. I can't seem to find the best way to do this, has anyone tried anything similar?
Depends a bit over which time interval you want to see this data.
What are the Statistics Levels you are using for the Historical Intervals?
If you want to look at the current values (in KBps), you could do
$esx = Get-Cluster -Name $clusterName | Get-VMHost
Get-Stat -Entity $esx -Stat net.usage.average -Realtime -MaxSamples 1 -Instance vmnic6, vmnic7
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks that looks good. I just did this to get the total overall
$clusterName = 'Desktops'
$esx = Get-Cluster -Name $clusterName | Get-VMHost
$stats=Get-Stat -Entity $esx -Stat net.usage.average -Realtime -MaxSamples 1 -Instance vmnic6, vmnic7
$total=0
foreach($stat in $stats)
{
$total+=$stat.Value
}
$total=$total*8
$mbps=$total/1000
$mbps
which is alot less then I thought.
Realtime returns data for 20 second intervals.
You might want to sample over a longer time and take an average.
Btw, Realtime caches about 1 hour of metrics.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I think I'm going to write it to a csv and check if over a day at I think 15 min intervals, or can I assume the metrics will line up for each host each time. Haven't done too much with Get-Stat
Each host uses that 20-second interval.
They should normally line (0,20,40) up on the different ESXi nodes
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference