Testing the vmkernel network performance using the nc command
search cancel

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.

Environment

VMware ESXi 4.0.x Installable
VMware ESXi 3.5.x Installable
VMware ESXi 4.1.x Installable
VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.0

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:
  1. Connect to Host 1 using SSH. For more information, see Tech Support Mode for Emergency Support (1003677).
  2. 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

  3. Connect to Host 2 using SSH.
  4. 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.

  5. Open another SSH session to Host 1 or Host 2.
  6. Run this command:

    # esxtop

  7. 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:
  1. Connect to Host 1 using SSH.
  2. 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
Tech Support Mode for Emergency Support