Last week, at the VMUG meeting in Vienna, a Technical Account Manager (TAM) from VMware mentioned the “ESXTOP Replay Mode” while talking about troubleshooting tools.
Since I was not familiar with this tool I used the weekend to take a look at it – and I was surprised what a great feature it is.
You can use ESXTOP to capture performance data from your ESXi host for a selectable periode of time and then play back the data gathered!
Here is a short step-by-step guide how to use ESXTOP Replay Mode:
Open an SSH session to your ESXi host and logon with root privileges. Use the following command to capture performance statistics:
vm-support -p -d 120 -i 10 -w /vmfs/volumes/your_datastore
Here is a short explanation of the syntax/the options:
- -p is to only gather performance data
- -d is the duration in seconds (eg. 120 seconds)
- -i is the interval (eg. gather data every 10 seconds)
- -w is to specify a datastore for the output file
If you take a look at the datastore you can see that the collected data has been saved in a zipped file. Use the following command to extract the content:
tar -xzf filename.tgz
To start the ESXTOP Replay Mode type:
esxtop -R extracted_content_file_name
Et voilà – the data gathered will be replayed immediately:
(note the last line in the output: “Read stats from …” that indicates that ESXTOP is running in replay mode)
Troubleshooting ESXTOP Replay Mode:
If replay mode does not start and you get an error message like “No such file or directory esxtop […] all vm-support snapshots have been used” it is very easy to fix this issue:
In the extracted content you will find a script named “reconstruct.sh”. Start it using the following syntax: ./reconstruct.sh
ESXTOP Troubleshooting Poster for vSphere 5 and 6:
If you use ESXTOP you might be interested in the vSphere 5 and 6 ESXTOP quick overview for troubleshooting poster: