<

Learn how to a build a cloud-first strategyRegister Now

x

Collect Performance Metrics from ESXi Hosts with esxtop

Posted on
7,181 Points
781 Views
4 Endorsements
Last Modified:
Experience Level: Advanced
4:21
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and export to a Windows VM where you can use perfmon to review the data, in this tutorial Brian focuses on the memory metrics. He demonstrates the report option that gives you the values in an easy to read format.

Video Steps

1. Enable SSH on ESXi host and use putty to connect to it

Login using your root username and password

2. Run esxtop in batch mode

The command is as follows:
esxtop -b -d 2 -n 60 > esxoutput.csv

Open in new window

"b" instructs esxtop to run in batch mode. "d" is the delay between iteration captures and "n" is the number of iterations, so in this tutorial we will grab statistics every two seconds, 60 times. This means we should have 120 data points in the file. The final section of the command defines the output file.
Enter will run the command and it will take 2 minutes to complete based on our iteration settings.

3. Confirm the output file was created

The following command will verify we have a valid file with data in it:
ls -l esxout*

Open in new window

You should see the esxoutput.csv file returned with a filesize.

4. Export the output off of ESXi host

You can use WinSCP or other utilities.
In our case, we will copy it to a VMFS datastore by using the following command:
cp esxoutput.csv /[your_volume_location/]

Open in new window

Then switch to the datastore location and confirm the file copied successfully.

5. Open vSphere Web Client and download the esxtop output file from the VMFS datastore

Select the "Storage" menu, then the NFS datastore, and then right-click the esx file and choose "Download from Datastore".
At the Client Integration Access Control window, select the "allow" option.
Save the file to your preferred location and you may watch the progress of the download in the lower portion of the window.

6. Open the Windows perfmon utility and select the esxtop data

Right-click "Performance Monitor" in the left hand pane of the perfmon utility, and choose "Properties".
Select the "Source" tab and for data source select "Log Files" and select the "Add" button.
Select the esxoutput file from its location. You may specify a time range to analyze here if you'd like.
Click Apply.

7. Add counters to view the available data

There are many interesting counters to choose from including: Group CPU, Group Memory, Interrupt Vector, Memory, Physical CPU, etc.
We will focus on all of the memory counters and select OK.

8. Review the counter data

You can choose individual counters and view the values in the chart:
Individual Counters
 or use the report option which shows all values:

Generate Report Menu
Report View
4
Comment
0 Comments

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Join & Write a Comment

In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
Ransomware is a malware that is again in the list of security  concerns. Not only for companies, but also for Government security and  even at personal use. IT departments should be aware and have the right  knowledge to how to fight it.
Suggested Courses

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month