Using --export-entity and --import-entity to Filter esxtop Counters
search cancel

Using --export-entity and --import-entity to Filter esxtop Counters

book

Article ID: 430142

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

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.

Environment

VMware ESXi 6.x,7.x,8.x,9.x

Cause

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.

Resolution

Follow these steps to generate a custom configuration file and re-import it.

  1. Generate the Master Entity File: Run esxtop with the export flag to create a template of all current entities and counters.

    Bash
     
    esxtop --export-entity filename.conf
    
  2. 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.

  3. Import the Custom View: Launch esxtop using the import flag to apply your filtered configuration.

    Bash
     
    esxtop --import-entity filename.conf
    
  4. Batch Mode Usage (Optional): To collect this filtered data over time for offline analysis (CSV format):

    Bash
     
    esxtop -b -n 10 -d 5 --import-entity filename.conf > filtered_metrics.csv

Additional Information

Note: If a VM is powered off and back on, its World ID changes, which may invalidate the entity mapping in your .conf file.