It is not designed like that:
VscsiStats -- This tool controls vscsi data collection for virtual machine disk
disk I/O workload characterization. Users can start and stop online data
data collection for particular VMs as well as print out online histogram data.
Command traces can also be collected and printed.
The following histogram related options are available:
-h, --help will print the usage
-l, --list will list the available virtual machines and their virtual disks
-r, --reset will reset the stats
-s, --start will start vscsiStats collection; exclusive of -x
-x, --stop will stop vscsiStats collection; exclusive of -s
-w <worldgroup id>, --worldgroupid specifies a worldID to use for this operation
-i <handle id>, --handleid specifies a vscsi handleID to use for this operation
requires the -w option
-p <histoType>, --printhistos will print out the current histograms for the specified
histogram type. May be used in conjunction with -w and -i.
histoType must be one and only one of:
all, ioLength, seekDistance, outstandingIOs, latency, interarrival
-c, --csv will use comma as delimiter in conjunction with -p
The following command trace related options are available:
-t, --tracecmds will start scsi cmd traces; in conjunction with -s
Note:- the -t option consumes significant system resources so
enabling it indefinitely is not advisable
- try to limit the #virtual disk for which cmd tracing is enabled at any
given time by using --worldgroupid and/or --handleid options.
- trace contains NO customer sensitive data
- only information recorded is:
- serialnumber, IO block size, number of scatter-gather elements
- command type, block number, timestamp
- Therefore, actual data/payload of commands is not stored
- If successfully started, log channel id(s) will be printed out.
To store the command trace in a file for later processing, invoke:
$ logchannellogger <log_channel_id> <binary_trace_file>
-e <trace file name>, --traceprettyprint reads in a vscsi cmd trace from the given
filename and sends a CSV formatted output to stdout; exclusive of all other options
vscsiStats Usage:
vscsiStats [options]
What you can do is launching watch -n 1 cat <file>
to refresh the content of your file in another shell.
If you don't want to start manually your commands, you can batch them and add them to cron.
By the way be carefull some file in esxi are reset each reboot.
Here the way to add a script to cron without being reset each startup:
edit file /etc/rc.local.d/local.sh
#add to crontab a task
echo "01 00 1,15 * * root /vmfs/volumes/datastore1/script/yourscript.sh" >> /var/spool/cron/crontabs/root
#stop crontab process
kill $(cat /var/run/crond.pid)
#start crontab process
crond
do not forget to set your script as executable
chmod +x /vmfs/volumes/datastore1/script/yourscript.sh