, , , ,

Using esxtop and sending output logs to CSV

Continuing from the previous blog about using esxtop to monitor ESXi processes, let’s take a look at how to export esxtop logs to CSV.

Here’s the official KB on how to use and leverage export logs to CSV: https://kb.vmware.com/s/article/1004953

If you’re wondering how to view syntax and commands, it’s easy, just type “esxtop -h” to view the help output:

We’re going to go ahead and export some esxtop logs for examination. Here’s an example, with a breakdown of each parameter:

esxtop -b -a -d 5 -n 20 > esxtop-output.csv

esxtop: (obviously lol) Click here for reference

-b: will output in batch mode. In batch mode, the utility runs until it produces the number of iterations requested, in combo with the command-line option -n…or until you end the process by pressing Ctrl-C.

-a: will show all statistics

-d 5: sets the delay between updates in seconds, I set the delay to 5 seconds here

-n 20: runs esxtop in iterations

>: commands to output the file

esxtop-output.csv: this is the path and file name to output the file. Default will place the file in the root folder.

Running the command will run every 5 seconds for 20 iterations, and will output a CSV file to the root directory. I used WinSCP to login to the host and transfer the file to my Win11 desktop:

A small sample of the CSV data to review, or send to systems or network team for analysis:

That’s pretty much it!

Enjoy and cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *