Utilising vSphere Performance Monitoring Tools – Part Three: net-dvs

In a scenario where the vCenter Server System is not available and you require to perform network troubleshooting on a vSphere distributed switch (dvSwitch) configuration on a ESXi host system the net-dvs command from the ESXi shell or the vSphere Command Line interface can be useful. The configuration of dvSwitches is managed by the vCenter Server System but each host system will contain will contain the configuration information in a database file located at ‘/etc/vmware/dvsdata.db’ to which  data in the file on each host system is updated at five minute intervals.

The command ‘net-dvs’ queries configuration information from the  file and retrieves details for the dvSwitch, distributed port groups, ports and port statistics. As we can see the amount of information retrieved potentially can contain too much information to display in the console and to process. Therefore, we have a couple of options when retrieving the information.

Firstly,  we could output the results to the less package to be able to view the contents in the console by moving forwards and backwards through the output.

net-dvs | less

We can could also write the output to a file and use the a text editor such as vi to view the output.

net-dvs >> net-dvs-esxi1host 
vi net-dvs-esxi1host

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s