introduction
Virtual machine (VM) and ESXi host performance analysis is one of the key abilities for any VMware administrator.
in previous article we have got an overview about ESXtop and discuss how to configure ESXtop parameters
this article we will discuss how to capture ESXI and VM performance with batch mode then how to analyze these data
select required fields
First of all . Make sure you only capture relevant info.
Remove the metrics fields you don’t need.
In other words, run esxtop and remove/addthe fields you don’t actually need ( using f parameters )
When you are finished make sure to write(W) the configuration to disk.
You can either write it to the default config file(esxtop4rc) or write the configuration to a new file.
Capturing esxtop results
Now that you have configured esxtop as needed run it in batch mode and save the results to a .csv file:
esxtop -b -d 3 -n 100 > esxtopcapture.csv
Where “-b” stands for batch mode, “-d 3” is a delay of 3 seconds and “-n 100” is 100 times .
In this specific case, esxtop will log all metrics for 300 seconds [3 x100] .
If you want to record all metrics make sure to add “-a” to your string.
Also you can zipp the output
These .csv can grow fast and by zipping it a lot of precious disk space can be saved!
esxtop -b -a -d 2 -n 100 | gzip -9c > esxtopoutput.csv.gz
Please note that when a new VM is powered on, a VM is vMotion to the host or a new world is created it will not show up within esxtop when “-b” is used as the entities are locked! This behavior is similar to starting esxtop with “-l”.
Analyzing results with perfmon
You can use multiple tools to analyze the captured data.
- perfmon
- excel
In networks pioneers we recommend tool perfmon for analyzing esxtop data
Perfmon is part of Windows which also known as “Performance Monitor
. You can import a CSV as follows:
- Run: perfmon
- Right click on the graph and select “Properties”.
- Select the “Source” tab.
- Select the “Log files:” radio button from the “Data source” section.
- Click the “Add” button.
- Select the CSV file created by esxtop and click “OK”.
- Click the “Apply” button.
- Optionally: reduce the range of time over which the data will be displayed by using the sliders under the “Time Range” button.
- Select the “Data” tab.
- Remove all Counters.
- Click “Add” and select appropriate counters.
- Click “OK”.
Analyzing results with Excel
MS Excel is also able to import the data as a CSV.
Keep in mind though that the amount of captured data is very huge so you might want to limit it by first importing it into perfmon and then select the correct timeframe and counters and export this to a CSV.
When you have done so you can import the CSV as follows:
- Run: excel
- Click on “Data”
- Click “Import External Data” and click “Import Data”
- Select “Text files” as “Files of Type”
- Select File and click “Open”
- Make sure “Delimited” is selected and click “Next”
- Deselect “Tab” and select “Comma”
- Click “Next” and “Finish”
All data should be imported and can be shaped / modelled / diagrammed as needed.
Conclusion
ESXtop in batch mode allow to capture data for analyzing
we highly recommend to use windows tools perfmon to analyze captured data
‘next article we will discuss how to use ESXtop interactive mode to monitor live performance of ESXI