Unlike interactive mode, this mode will let you issue a command to collect all or some of the statistics for a period of time and at the interval of your choice. It is particularly handy when you want to monitor the performance of an ESXi host for a certain time period.
We need access to the ESXi CLI via the console or SSH. You need to plan the number of performance snapshots that you want to gather and the interval between each snapshot.
To run esxtop in batch mode, connect to the ESXi host's CLI (usually done by using an SSH client) and run the following command:
# esxtop –a –d <delay> -n <iterations> > exportfilename
Here's an example:
# esxtop –a –d 10 –n 50 > perfstats.csv