Facing network related issue in your vSphere environment and don’t know what and where to start because it incorporates various steps to gather information related to switch being used (VSS or DVS), its firmware and driver information, packet received/transferred and link status etc.
Its obvious
we already have commands to run on ESXi shell to gather all relevant network stats, information
and some advanced traits as well. However sometimes it would be efficient to
have these accumulated detail on stdout in ESXi shell against one single command in order to quickly overview this already segregated statistics.
Here is the
one liner bash command for not only having enough information to start digging efficiently but also have some extra network configuration details to look into.
esxcli
network nic list; for i in $(esxcli network nic list | grep -i vmnic* | awk
'{print $1}');do echo "Gathering the information for:";echo $i;esxcli
network nic get -n $i | egrep -i
"name|link*|cable|virtual|driver|version";echo Dropped packets and
errors are :;esxcli network nic stats get -n $i | grep -iE
"vmnic|dropped|errors";echo "";echo "Enabling the VLAN
stats on $i for now:=========";esxcli network nic vlan stats set -e true
-n $i;echo The VLAN stats for $i:;esxcli network nic vlan stats get -n $i;echo
"";echo "Disabling the VLAN stats on
$i:===============";esxcli network nic vlan stats set -e false -n $i;echo
"";done
The output of above script is as pasted below:
Here we also have VLAN stats getting enabled for each VMNIC being used by which switch and then getting disabled after collecting VLAN sent/received packets for these individual VMNICs. With this detail we can start identifying the issue.
I will have such
network related information for every virtual machine in my next post e.g.
network stats related to port ID against each world ID associated with virtual
machines running in the ESXi host for more granular troubleshooting. Stay tuned
till then..
If you find it little helpful, please be social and share it in your circle. Please comment your suggestion and improvement to be catered in future posts.
Link to Page - vSphere
Waiting for the next part as it seems interesting and useful.
ReplyDeleteThank you.
Thank you.
ReplyDelete