Use the esxtop command to monitor network performance

:

  1. Prepare to Monitor Network Performance
  2. Prepare the Client and the Server VMs
  3. Measure Network Activity on an ESXi Physical Network Interface
  4. Use Traffic Shaping to Simulate Network Congestion
  5. Position the Client and the Server on the Same Port Group
  6. Restart the Test and Measure Network Activity
  7. Stop the Test and Analyze Results

1: Prepare to Monitor Network Performance.

  1. In MTPuTTY, open a connection to SA-ESXi-04.
    1. Enter esxtop at the command prompt.
    2. Set a 10-second screen refresh by entering s and 10.
  1. Enter n to change to the network statistics screen.
  1. Remove unused counters to make the esxtop network screen easier to monitor.
    1. Enter f to display the Current Field Order table.
    1. In the Current Field Order table, enter g and j to remove PKTRX/s and PKTTX/s from the esxtop display.
  1. Press ENTER to return to the network statistics screen.

2: Prepare the Client and the Server VMs

You use scripts on the Linux01 and Linux02 VMs to generate network traffic so that network performance can be measured.

This image has an empty alt attribute; its file name is image-98.png

The Linux01 VM acts as a client and the Linux02 VM acts as a server. The Linux01 VM is connected to the pg-SA Production port group.

.Log in to the vSphere Client.

Migrate the Linux02 VM to a different VDS.

Select Menu > Networking.

In the left pane, expand the dvs-Lab.

Right-click pg-SA-Production and select Migrate VMs to Another Network.

The Migrate VMs to Another Network wizard appears.

For the Destination network, click BROWSE...

Select pg-SA-Management and click OK.

Click NEXT.

On the Select VMs to migrate page, select the Linux02 check box and click NEXT.

On the Ready to complete page, review settings and click FINISH.

In the Recent Tasks pane, monitor the task to completion.This migration forces the traffic between the VMs to traverse the physical network.

View the IP address of the Linux02 VM.

Select Menu > Hosts and Clusters.

Power on the Linux02 VM.Wait for the VM to start.

In the left pane, select Linux02.

View the IP address of the Linux01 VM.

In the left pane, select Linux01.

Start the server on Linux02.

In the left pane, select Linux02.

In the right pane, click Launch Web Console on the Summary tab.

In the Linux02 console window, log in by entering user name root and password VMware1!.

Navigate to the network scripts folder.

cd netperf

Start the server program../netserverThe server program runs as a background process.

Verify that the server program is running.

ps -ef | grep netserver

The server and grep processes are listed.

00:00:00 ./netserver
00:00:00 grep netserver

3: Measure Network Activity on an ESXi Physical Network Interface

You measure the network performance of the ESXi host network interface with the Linux01 and Linux02 VMs positioned on different physical network segments across a router.

Requests sent from the Linux01 client enter the physical network through the ESXi network interface vmnic2, which is bound to a dvs-Lab distributed switch uplink. Using the pg-SA-Management port group on the dvs-SA-Datacenter distributed switch, the client requests are routed to the management network where the Linux02 server is.

.

  1. Return to the Linux01 console tab.
  2. Start the client on Linux01.
    1. Navigate to the network scripts folder.cd /root/netperf
  1. Start the client test script../nptest1.sh 172.20.10.200.
    The client and server programs must run uninterrupted.Monitor network performance and record your findings.
  1. On the student desktop, return to the MTPuTTY window.
    1. In the esxtop output, find the vmnic2 physical network interface.
    2. After 30 seconds of statistics collection, record the values for vmnic2 in the class configuration handout.
      • MbTX/s
      • MbRX/s

4: Use Traffic Shaping to Simulate Network Congestion

You use traffic shaping to control the network speed to simulate congestion.

.Return to the vSphere Client tab.

Select Menu > Networking.

In the left pane, right-click the pg-SA-Production port group and select Edit Settings.

In the Edit Settings dialog box, click Traffic shaping on the left.

Select Enabled from the Status drop-down menus for ingress traffic shaping and egress traffic shaping.

Configure the ingress and egress traffic shaping.OptionActionAverage bandwidth (kbit/s)Enter 10000.Peak bandwidth (kbits/s)Enter 10000.Burst size (KB)Enter 10000.

Verify that you configured both ingress and egress traffic shaping and click OK.

Monitor network performance and record your findings.

Change to the MTPuTTY window.

In the esxtop output, find the vmnic2 physical interface item.

After 30 seconds of statistics collection, record the values for vmnic2 in the vmnic2 10 Mb/s column in the class configuration handout.

MbTX/s

MbRX/s

Disable the ingress and egress traffic shaping.

Return to the vSphere Client tab.

In the left pane, right-click pg-SA-Production and select Edit Settings.

Click Traffic shaping.

For both ingress and egress traffic shaping, select Disabled from each Status drop-down menu.

Click OK.

About the author

Mosab Shaker

I stand at the forefront of the fastest moving technology trends like Digital Transformation, computer virtualization ,networking and security. I spent the past tenth years evangelizing an industry-wide shift to the co location in the MENA by promoting virtualization and cloud services many Customers . With a unique mix of knowledge about different industries, businesses, and technologies

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *