
Network metrics
The third common type of metrics that can be obtained from esxtop is network metrics. These metrics can help you troubleshoot network usage for your vSphere host and the virtual machines:
- Connect to a vSphere host using SSH and log in as root or an administrative user.
- In the command prompt, type
esxtop
without any flags. - Press n to view the network screen. This screen displays detailed information about network usage.
- You need to enable some additional information for the physical network properties of vSphere hosts in esxtop for the UP (uplink), FULLDUPLEX, SPEED, TEAM-PNIC fields. Press c to enable the aforementioned fields; you can press c again to remove any field.
- Press f to go into the Current Field Order screen.
- Press the Esc key to return to the esxtop network statistics screen.
Understanding network metrics
In esxtop, network statistics are displayed for each port of a virtual switch. These ports are then either linked as uplinks to a physical network adapter or they are connected to a virtual network adapter of a virtual machine. When a port is utilized by a virtual machine, a world ID of that machine and its name is shown in the USED-BY field. You can use the world ID to distinguish the VM group. You will not see a world ID in this field if VMKernel is using the port as displayed in Figure 2.10 (vmk0
, vmk1
, vmk2
). The vmk network adapters can be created as required for VMotion. The last type of port is the Management port, which is internally used for the management of vSwitch. You can also identify the uplink ports by examining the UP field. The value Y is displayed in the UP field against the ports that are uplinks. The TEAM-PNIC field shows the name of the uplink used for the team uplink.

Figure 2.10
Table 2.4 Some common Network Metrics and their description

Diagnosing network performance
A good starting point for diagnosing network performance can be the percentage of dropped packets. The percentage of transmitted drop packets can imply that the destination that is receiving packets is busy at that time or the transmitted network is too occupied for sending the packets on time.
Let's understand how a virtual machine transmits traffic across the wire. First, a virtual machine tries to buffer the traffic that needs to be transmitted. Once the buffer is ready to be processed, the traffic is sent to the vSwitch queue. Whenever the vSwitch queue becomes full, the rest of the packets are discarded. You can observe this in the last two columns: %DRPTX
and %DRPRX
. There can be two different reasons for these packets being dropped. A virtual machine with inaccurate network drivers can cause this problem. High CPU utilization by a virtual machine can also cause packet dropping.
Sometimes, insufficient capacity of an uplink that couldn't handle the requirement of network traffic for the virtual machines could also cause dropping of network packets. This issue can be resolved by distributing your virtual machines to other hosts in your cluster. For this reason, you should always stick to vSphere network design best practices to avoid bottlenecks in production.