Saturday, July 18, 2020

vSphere Network Performance Troubleshooting - Part II


Previous post was about collecting detail of sent-received packets, dropped packets, missed errors at each vmnic connected. 

Now we can dig further and can get following information.

Ø  World-ID of running virtual machines.

Ø  Ports associated with the given world-ID of virtual machines.

Ø  Retrieve the switch statistics of packet transmitted and received for ports.

Ø  Received and transmitted packet drop for ports.

Ø  Retrieves filter stats and information for ports.

Ø  Switch associated with the port and detail of uplink assigned.

All of these information can be retrieved using following bash script:


echo VMs with world id : ; esxcli network vm list;echo "";for i in $(esxcli network vm list | awk '{print $1}' | grep -viE "world|--------");do echo "For this world id :$i following are the ports associated :==========" ;esxcli network vm port list -w $i | grep -iw "port id" | grep -vi "uplink" | sed 's/   //' | awk '{print $3}';for j in $(esxcli network vm port list -w $i| grep -iw "port id" | grep -vi "uplink" | sed 's/   //' | awk '{print $3}');do echo "";esxcli network port stats get -p $j;echo Port filter stats for $j:;esxcli network port filter stats get -p $j;done;echo "";esxcli network vm port list -w $i | grep -iEw "port id|vswitch|team uplink|mac address";echo "==========================";done


Here we are able to extract statistical information about the underlying network associated to running virtual machines and vmnics which then were used to retrieve ports stats and filter information about it.

Similarly we can get network port stats for all associated client or virtual machines using net-stats and Vmkernel Sys Info Shell (vsish) utility, I shall be creating similar script that can automate the process of retrieving additional network statistics using these utilities in my next post of this series.


If you find it 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



1 comment:

vSphere Series

vSphere Network Performance Troubleshooting - Part III

As I stated in my last post about utilizing the net-stats and vsish (vmkernel sys info shell) to gather useful network related information...