As a responsible VMware admin you might have experience in troubleshooting performance related issues and checking performance related issues cannot be avoided. I thought to write this article up for anyone has such requirement and how you can check the statistics related to Virtual Machines such as Ring Buffer Size, Tx, Rx drop packets, etc.
You can use vSphere client or web client statistics graphs to get the idea and check the statistics in the first place. But it is hard to check the additional parameters from the traditional graphs and counters. That’s where these command line information and commands come in to play and having a great idea about this will be really valuable in a situation where you end up with the performance issues. This article explains how to use these commands in an ESXi shell to check the statistics for a particular Virtual Machine. Personally, it was really helpful for me to overcome and check stats in numerous times.
Using Well Known “net-stats”
I believe almost everyone aware of the “net-stats” command and we can retrieve bunch of valuable information in the ESXi.
“net-stats -l” command will give you the output with Virtual Port Numbers, vSwitch Name relevant MAC address and Client Name in a similar output as below

To narrow it down to a particular virtual machine use ” net-stats -l | grep “<virtual_machine_name>” ” command, it will only give you the relevant information specifically to that virtual machine
Check The Statistics Of A Virtual Machine With A VMXNET3 Adapter

Use “vsish -e get /net/portsets/DvsPortset-0/ports/<port_number>/clientStats” to view the statistics of the virtual machine. To understand please check the below output and you can see some valuable information including dropped transmitted and received packets

Tx and Rx summary can be viewed from the “vsish -e get /net/portsets/DvsPortset-0/ports/<port_numbers>/vmxnet3/rxSummary” (txSummary or rxSummary) command.
Ring buffer information such as running out of buffers , number of time buffers rings filled, number of times queue stopped and dropped can be examined from this output.

Number of queues can be viewed from “vsish -e ls /net/portsets/DvsPortset-0/ports/<port_number>/vmxnet3/rxqueues/” (rxqueues and txqueues) command

Ring status can be viewed from “vsish -e get /net/portsets/DvsPortset-0/ports/<port_number>/vmxnet3/rxqueues/0/status” (rxqueues and txqueues) command. Number of queues, size of the queues, index data ring size can be viewed from the this command

For client server communication error/ packet drops can be observed using iperf tool. There will be a different post for the iperf tool usage, it is out of scope from the ESXi layer.
Article Short Link: https://tcrum.net/Check-Ring-BufferSize
If you found this post as useful please rate the post and share it!
ken
September 25, 2019Not helpful unless you know the time span of the counters you are looking at. Dropped packets show 0, but for when? SO I log in, run the command, and see 0 packets dropped, but for what range of time does this apply to?
Aruna Lakmal
October 2, 2019Hi Ken
Thank you for your response. We had numerous issues with Windows Clustering in VMware, which observed several packet drops. We wanted to change the Ring buffer size in order to find a solution.
Robert Franz
October 3, 2019Given the penguins littering your site, you really should be more mindful of case – especially when you display commands in quotation marks, which implies a literal.
Only took a minute to identify the mistakes, but I respectfully submit that task belongs to the author – not the reader.
Aruna Lakmal
October 3, 2019Thank you for the comment, and we would definetely consider this. Thank you for pointing this out.
Jon Garstin
April 13, 2020Very useful. I plan to implement a python script that will look at a group of VMs counters and timestamp log the counters over time to identify when the counters incremented. Your information made this task very simple for me to automate.
Aruna Lakmal
April 15, 2020Thanks Jon, Glad it helped!
Besnon
July 19, 2020Hi Jon – Iam also tasked to look at a group of VMs counters for NIC buffer overrun. Can you help me with a script if you already have.
Rajitha
March 30, 2021Very helpful post. Thank You, Aruna!!
Aruna Lakmal
April 9, 2021Thank you, Rajitha!