When troubleshooting performance in large VCF or vSphere environments, the default esxtop view displays a massive amount of data. Administrators need a way to filter the output to show only specific counters (e.g., CPU, Memory, or Disk) for a specific subset of entities (e.g., specific World IDs or GIDs) to streamline diagnostic data collection.
VMware ESXi 6.x,7.x,8.x,9.x
Standard esxtop usage displays all available counters for all running worlds, which can lead to high overhead and difficulty in pinpointing specific performance bottlenecks during real-time analysis or batch mode collection.
Follow these steps to generate a custom configuration file and re-import it.
Generate the Master Entity File: Run esxtop with the export flag to create a template of all current entities and counters.
esxtop --export-entity filename.conf
Modify the Configuration File: Open the generated filename.conf in a text editor (such as vi).
The file contains a list of every entity (VMs, system processes) and every available counter.
Remove the lines representing entities or counters you do not wish to monitor.
Keep only the rows corresponding to the specific metrics (e.g., CORE_CPU_RDY) and the specific Worlds/GID you are targeting.
Import the Custom View: Launch esxtop using the import flag to apply your filtered configuration.
esxtop --import-entity filename.conf
Batch Mode Usage (Optional): To collect this filtered data over time for offline analysis (CSV format):
esxtop -b -n 10 -d 5 --import-entity filename.conf > filtered_metrics.csv
Note: If a VM is powered off and back on, its World ID changes, which may invalidate the entity mapping in your .conf file.