VCAP-DCA: Using vscsiStats

By | January 27, 2014

Properly sizing storage is one of the most important parts of any upgrade to a virtual infrastructure. There are several third party tools to do this made by EMC and others, however vSphere has a powerful tool built right into the CLI, vscsiStats.

vscsiStats pulls a wealth of information about the SCSI activity of a VM and allows you to export the data to a CSV file to process with your choice of tools. The following is a howto on getting this data:


1.We need to find out the worldGroupID of the machine that we are tracking. To do this use the list command “vscsiStats -l” make note of the 6 digit ID for the VM.



2. Next start the collection with the “-s” switch and specify the VM with the “-w” switch followed by the worldGroupID from the previous command. Allow this to run for a while.


3. When you are ready to collect the data use the “-w XXXXXX” switch again for the worldGroupID followed by “-p all” for all stats and the “-c > filename.csv” to pipe the results to a csv file. You can run “tail filename.csv” afterwords to verify the file was written.


4. Once you have exported the data to a file stop the collection process with the “-x” switch.

The results you get are in a format to create histograms for the data for easy viewing. A tool like rStudio is a great way to create those visualizations.




Leave a Reply

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