Port statistics cannot be reset on vSphere Distributed Switch
search cancel

Port statistics cannot be reset on vSphere Distributed Switch

book

Article ID: 447364

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

On a vSphere Distributed Switch (vDS), port statistics or counters for virtual machines or physical uplinks (vmnics) do not reset. Attempts to clear these statistics using the following methods are unsuccessful:

  • Restarting the ESXi host.
  • Unloading and reloading the physical network driver.
  • Enabling the "Auto-refresh" option on the specific vDS port "Statistics" tab.

Cause

The feature to manually reset port statistics via the UI or API was removed from all current vSphere versions (8.x and above). Statistics are maintained in the VCDB and the host's proxy copy of the vDS configuration and are not cleared by a standard reboot or driver initialization.

Resolution

There is no UI, API, or command-line method to reset statistics for an active port on a vSphere Distributed Switch.

To clear statistics, choose one of the following workarounds:

Method 1: For Virtual Machine Ports

  • From the VM Edit Settings, connect the Virtual Machine to a different port group or a Standard Switch.
  • Reconnect the Virtual Machine to the original vDS port group.
  • A new port ID will be assigned, effectively starting with zeroed statistics.

Method 2: For Physical Uplinks (vmnics)

  • Because physical uplinks are tied to the host's association with the vDS, the statistics can only be cleared by forced re-synchronization
  • Follow the steps in KB ESXi hosts showing out of sync with distributed switch to remove the ESXi host from the vSphere Distributed Switch.
  • Re-add the host to the Distributed Switch.
  • Note: This process involves networking changes and is recommended to be performed during a maintenance window.

Additional Information

A feature to reset counters without host removal can be requested for future addition to the product by filing a feature request through the Broadcom Support Portal.