Hello,

This can be the steps in order to execute one small script in the ESXi command line (SSH).

 

- Connect to the command line by ssh

- Change directory to some datastore

- Generate the script, this can be one example:

 

#!/bin/sh

 

NUM=0

 

while [ $NUM -lt 3 ]

do

 

DATE=`date +"%Y%m%d_%H-%M-%S"`

esxtop -b -d 2 -n 3 > esxtopcapture-$DATE.csv

NUM=`expr $NUM + 1`

 

done

 

# EOF

 

- Finally, give execution permission to the script:

busybox chmod 755 script.sh

 

 

In this case, the script iterates the "while" loop three time. Every time a esxtop output file is generated.

 

Hope this can be helpful to someone

 

 

Best regards,

Pablo