Friday, September 23, 2011

Five Things You Might Not Know About ESXTOP

I use ESXTOP almost daily in my job to do analysis of performance on ESX / vSphere.  In working with partners and customers I often hear them say that they didn't know ESXTOP could do that.  Here is list of five most popular:

1.  What is this "ESXTOP" that you speak of?  Many have just not heard of ESXTOP and either have not been concerned with performance previously or only used the information from the viClient's performance graphs.  To directly answer the question, ESXTOP or rESXTOP is a character based utility that runs on the ESX or ESXi host that can be used to monitor, display, and log virtually all the performance information of the ESX host.  You can simply enable the ability to ssh into the host from the troubleshooting options on the ESX host local console, and then ssh into the system and run "esxtop" to get started.  You can also use "resxtop" to run it remotely against an ESX host. Either way, ESXTOP is a tool often used at VMware to diagnose and identify performance problems.

2. There's more to see than just CPU data.  The initial screen for esxtop is very similiar to top from linux showing CPU usage information.  This is only a small part of what can be seen with esxtop.  By prssing different keys, different sets of data are displayed.  The "d" key will open the disk screen, "m" will show memory related information, "n" will show the virtual networking stats, "v" will show the virtual disks. To get a complete list of available screens just press "?" or "h".  You can also add more fields or columns of data by pressing the "f" key and then selecting the additional fields that you want to be displayed.

3. You can capture ESXTOP data in batch mode.  It seems that most people run esxtop top in it's interactive mode, where it displays all of it's great performance info in real time.  This is a fun way to run ESXTOP and and can give valuable insights in real time.  But it can be even more useful to be able to capture all of this data and be able to analyze it at a more detailed level later AND use it to create cool graphs.  By starting esxtop with the -b option and redirecting the output to a text file with a pipe, ESXTOP will create a CSV file with all of the performance data.

4. View ESXTOP data with windows perfmon and impress your friends and co-workers.  The CSV file that is output by ESXTOP can be imported into Windows perfmon.exe (Windows Performance Monitor).  This provides a good graphical interface to be able to quickly select counters and view them.  In order to import the file into perfmon, you will first need to copy it onto the windows system where you will be running perfmon.  You can use winscp or other utility of your choice to get it copied off the ESX host.  Start perfmon and then right click in the middle of the graph area and select Properties.  Then select the Source tab and click on the Add button.  Browse to the saved .CSV file and open it.  You will now to be able to add counters in perfmon that are from the data for your ESX host.

5. Carve out a small set of data from an ESXTOP data file with esxplot to make your job easier.  The CSV files that esxtop produces can be massively wide with thousands of columns.  Too wide for even the latest versions of Excel in many cases.  This can make it difficult to quickly pull out a specific performance counter to put into your spreadsheet for analysis or cool graph creation.  The easiest solution I know is to use the VMware labs fling esxplot to export a subset of the data.  You simply import the .CSV file from ESXTOP into esxplot, select and view data for counters in esxplot, and then when you ready export the data.  The result is a much smaller .CSV file that just has the columns of data that you want.

So now you are armed with lots of ESXTOP tips and tricks that will make it easier for you to analyze and view performance of ESX and it's VMs.   


No comments: