Collecting esxtop batch data for ESXi performance troubleshooting
search cancel

Collecting esxtop batch data for ESXi performance troubleshooting

book

Article ID: 370279

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

How to collect esxtop batch data for ESXi performance troubleshooting

Resolution

On an SSH session to the ESXi host, run:

esxtop -b -a -d <interval> -n <number of samples> > /vmfs/volumes/<datastore>/esxtopOut.csv

where: 
-b : batch mode
-a : collect all metrics
-d : sampling frequency in seconds
-n : total number of samples

<datastore> is a vmfs datastore 

Note: Make sure there is enough free space available on the location from where the command is running and on the datastore where the output file saved. Also make sure there is no performance issue on the datastore where the output file is saved.

To include host name and timestamp of collection within the output file name, run: 

esxtop -b -a -d <interval> -n <number of samples> > /vmfs/volumes/<datastore>/esxtop-$(hostname)-$(date +"%FT%H:%M").csv

 

e.g. to collect 300 esxtop data samples at 2 second intervals  (= 600 second /10 minutes coverage), run: 

esxtop -b -a -d 2 -n 300 > /vmfs/volumes/<datastore>/esxtop-$(hostname)-$(date +"%FT%H:%M").csv

where <datastore> is a vmfs datastore 

Note: This esxtop data collected can be analyzed using windows performance monitor tool (pre-installed in your windows machine).
  • Click on Performance monitor on the left hand side pane.
  • Click on view log data on the right hand side pane or press Ctrl+L
  • Click on Source, select log files and add the csv file.
  • Use the filters for selecting the counters to check different parameters like CPU, Memory etc.

Additional Information

Notes:

An interval of 2 seconds (-d 2) is generally a good choice to observe fine-grain performance patterns
An interval of 5 seconds (-d 5) is generally preferable where data needs to be collected for a longer period of time

 

For additional information on esxtop batch mode, see: vSphere Monitoring and Performance