Objectives for 6.1 are broke down as the following
- Configure esxtop / resxtop custom profiles
- Evaluate use cases for and apply esxtop / resxtop Interactive, Batch and Replay modes
- Use vScsiStats to gather storage performance data
- Use esxtop / resxtop to collect performance data
- Given esxtop / resxtop output, identify relative performance data for capacity planning purposes
Configure esxtop / resxtop custom profiles
The following two tools are used to gather performance data and monitor an ESXi host. You may require these tools during the exam if a troubleshooting question comes up.
- esxtop. This gives real time CPU, memory, disk and network data for hosts and virtual machines.
- resxtop. This is a remote version of esxtop. It is included as part of vCLI and is present on the vMA (vSphere Management Assistant).
esxtop has many different displays and options, you can create custom profiles for what is displayed to quickly see the information you need. When running esxtop simply select ‘h’ to see the options available. The following article goes into what at lot of the statistics relate to, see here.
Notice from the help you can select things like CPU and Memory by using either ‘c’ or ‘m’ key.
Once selected the columns can be customised by select ‘f’
The hit the key that selects and deselects the column you want to display. For an example I only want to see Name and MEM Active (MB) so I deselect all the other columns and only select ‘d’ and ‘i’
These filters can then be saved and loaded as required. To change the default layout when esxtop start simply select ‘W’ (note the capital here) then save to the location prompted.
To save to a custom location I change the location to /.esxtopmemcustom
Then to start esxtop with this profile I run the following
>esxtop -c /.esxtopmemcustom
Evaluate use cases for and apply esxtop / resxtop Interactive, Batch and Replay modes
esxtop/resxtop can be used in three different modes – interactive, batch and replay.
- Interactive – default mode, interactive mode displays statistics in different panels.
- Batch – batch mode allows you to collect and save resource utilization statistics to a file.
- Replay – in replay mode, esxtop replays resource utilization statistics collected using vm-support.
Batch mode can be used to collect all of the statistics or only the ones created from a previous profile from the previous section. To collect all of the data I run the following, it must output to a csv file.
>esxtop -b -a -d 5 -n 20 > /tmp/output.csv
b = batch mode / a = all of the statistics / d = delay in seconds between statistics snapshots / n = number statistic snapshots saved before batch is stopped.
If I dont want all of the statistics but only the ones loaded from my profile I can run the following
>esxtop -b -a -d 5 -n 20 -c /.esxtopmemcustom > /tmp/output.csv
c filename = loads user-defined configuration file.
Those statistics can now be viewed from an csv file.
esxtop replay mode can be used to capture performance data on a host for a configurable amount of time then played back through esxtop. The first step is to capture the performance data using vm-support. SSH onto the host and run the following.
>vm-support -p -d 120 -i 20 -w /vmfs/volumes/Lab-VMFS-01
p = performance data / d = duration in seconds / i = intervals to gather data / w = location
Note you can leave the location to default if the scratch partition has already been configured to point to a datastore.
A new .tgz file will no be created which needs to be extracted. Browse to the location set and run the following.
>tar -xzf esx-lab-esxi-mgmt-2016-11-01–11.08.tgz
Once extracted there is a reconstrut.sh script that needs to be run. Browse to the extracted location and run the script.
Once the script has completed I can then run esxtop and point to the performance information.
>esxtop -R /vmfs/volumes/Lab-VMFS-01/esx-lab-esxi-mgmt-2016-11-01–11.08
Notice this is displaying the statistics from the profile created in a previous step.
Use vScsiStats to gather storage performance data
vscsiStats is a tool available on ESXi hosts. This tool controls vscsi data collection for virtual machine disk disk I/O workload characterisation. You can start and stop online data data collection for particular VMs as well as print out online histogram data. Command traces can also be collected and printed.
First SSH to a host and run the following (case sensitive) this will display the options.
As an example I will monitor a VM. First I need to list the VMs and find the ID.
Once I have the ID I start the monitoring, this will run for 30 minutes unless manually stopped.
>vscsiStats -s -w 38048
To view collection at any time run the following
>vscsiStats -p all
This displays the information on screen, if you prefer to right out to a file run the following
>vscsiStats -p all -c > /vmfs/volumes/Lab-VMFS-01/vscsiStatoutput.csv
For further information on how to analyse this information see here.
Use esxtop / resxtop to collect performance data
I believe this section overlaps what is covered in esxtop above.
Given esxtop / resxtop output, identify relative performance data for capacity planning purposes
I believe the tools used for this exercise have been covered above, its difficult to imagine what would come up in the exam for this.