Skip to main content
Pure Technical Services

How To: Capture System Performance Data with esxtop

Currently viewing public documentation. Please login to access the full scope of documentation.

KP_Ext_Announcement.png
Understanding how to properly capture an esxtop from an ESXi Host is a important step in the process of troubleshooting environmental issues. There is a lot of information and insight that can be gained when esxtop is properly gathered. On the flip side, if captured incorrectly, the ability to effectively diagnose and potentially root cause environmental issues becomes more challenging.

How to capture an esxtop output

There are a couple of very important things to keep in mind when capturing an esxtop:

  • The esxtop should be captured from the ESXi host where you suspect possible performance issues are originating from. It is host specific and does not capture for a cluster.
  • If there are particular VMs you suspect as the cause of performance anomalies, the esxtop needs to be captured on the ESXi host where the VM resides at the time the esxtop is run.
  • When specifying the location of the esxtop.csv file, please be sure you send it to a datastore that has at least 5GB of space available. If you try to send the file to the tmp folder, you risk filling it up and causing the ESXi Host management services to stall. This would require a host reboot and possible outage, so please be mindful of this.
  • SSH must be enabled on the ESXi host since esxtop can only be ran / captured from the ESXi host CLI.
  • The output file should always be a .csv format for easy review of the data.
What syntax should I use when capturing an esxtop?
esxtop -b -a -d 2 -n 300 > /vmfs/volumes/pure_datastore/esxtop-[hostname]-[date].csv
Example:
[root@ac-esxi-6:~] mkdir /vmfs/volumes/sn1-x70-b05-vmfs-scale-ds/esxtop-captures/
[root@ac-esxi-6:~]
[root@ac-esxi-6:~] esxtop -b -a -d 2 -n 300 > /vmfs/volumes/sn1-x70-b05-vmfs-scale-ds/esxtop-captures/esxtop-ac-esxi-6-June-2019.csv
[root@ac-esxi-6:~]
[root@ac-esxi-6:~] ls -lh /vmfs/volumes/sn1-x70-b05-vmfs-scale-ds/esxtop-captures/
total 87040
-rw-r--r--    1 root     root       84.1M Jun 12 15:15 esxtop-ac-esxi-6-June-2019.csv

The above runs the esxtop capture in batch mode (-b), captures all available counters (-a), at 2 second intervals (-d), for 300 iterations (-n).  Which means that this will capture 10 minutes of performance data with 2 second intervals (shortest interval VMware supports) and output it to the 'esxtop.csv' file for review.

There are few instances where a capture longer than 10 minutes of data is needed to understand and get a clear picture of the problem.  Should a longer capture be needed only modify the number of iterations (-n) so that everything else remains the same.

You will know the esxtop capture is completed once the CLI prompt returns and you are able to type again. After the esxtop has completed running, you can navigate to the path the file was saved and SCP it off the ESXi host and upload to FTPS for Pure Storage review.