Testing the vmkernel network performance using the nc command
book
Article ID: 310395
calendar_today
Updated On:
Products
VMware vSphere ESXi
Issue/Introduction
This article provides commands to monitor the vmkernel network performance between two ESXi hosts.
Resolution
Note: You need two ESXi hosts to perform this test. You can use CTRL+C to terminate the test at any point in time.
To test the VMkernel network performance between two hosts, Host 1 and Host 2:
- Connect to ESXi host 1 using SSH.
- Run this command:
nc -v -v -l -n Port > /dev/null
Where Port is the port that is used to test the network performance. You can use any port number that is open between the two hosts.
For example:
nc -v -v -l -n 2223 > /dev/null
- Connect to ESXi host 2 using SSH.
- Run this command:
time cat /dev/zero | nc -v -v -n vmkernel_ip_host1 2223 > /dev/null
If the port is open, you see output similar to this in in the Host 1 SSH session:
Connection from Host1_IP port 2223 [tcp/*] accepted
If you are do not see any output, it indicates that the port is not open.
- Open another SSH session to Host 1 or Host 2.
- Run this command:
esxtop
- Press n to navigate to Network view.
The esxtop Network view reports bandwidth (Megabits per second) under MbTX/s or MbRX/s in real-time with approximately two seconds delay.
A sample output appears similar to:
PORT-ID USED-BY TEAM-PNIC DNAME PKTTX/s MbTX/s PKTRX/s MbRX/s %DRPTX %DRPRX
33554433 Management n/a vSwitch0 0.00 0.00 0.00 0.00 0.00 0.00
33554434 vmnic0 - vSwitch0 30826.02 543.29 36333.90 18.30 0.00 0.00
33554436 vmk0 vmnic0 vSwitch0 30825.66 543.29 36327.18 18.30 0.00 0.00
Additional Information
If the port is not open, you cannot terminate the session in Host1 by pressing CTRL+C. In this case, to terminate the session:
- Connect to ESXi host 1 using SSH.
- Run this command:
lsof | grep -i port
Where port is the port number that you used to test the network performance.
You see output similar to:
Cartel | World name | Type | fd | Description
2448303 nc 2448303
Feedback
thumb_up
Yes
thumb_down
No