I was doing performance troubleshooting with Frank Denneman this week and we wanted to use “vscsiStats” to verify if there was any significant latency.
We checked multiple whitepapers before we went onsite and our primary source was this excellent article by Scott Drummonds. After start vscsiStats and receiving a “successful started” we waited for 15 minutes and verified if we could see any data at all. Unfortunately we did not see anything. What is happening here? We checked the build/patch level and it was ESX 3.5 Update 4. Nothing out of the ordinary I would say. After trying several VMs we still did not see anything with “vscsiStats -s -w <worldID>”. For some weird reason, in contrary to what all blog articles are stating and what Scott Drummonds states we had to use the following command:
vscsiStats -s -t -w <worldID>
This might not be the case in most situations, but again we had to add “-t” to capture any data. You can find the world ID of the VM you want to monitor the performance by using the following command:
After a couple of minutes you can verify if any data is being collected by using the following command:
vscsiStats -p all -w <worldID>
If you want to save your data in a CSV file to import it in Excel use the following:
vscsiStats -p all -c -w <worldID> > /tmp/vmstats-<vmname>.csv
Don’t forget to stop the monitoring:
vscsiStats -x -w <worldID>
So what’s the outcome of this all? Well with vscsiStats you can create great diagrams which for instance show the latency. This can be very useful in NFS environments as esxtop does not show this info:
If you don’t want to do this by hand, check out this article by Gabe.
Chad King says
I was hoping maybe I could get a 2nd opinion on the stats I got from a host if you find you have the time could you have a look? thanks in advance and nice article btw.
Craig Risinger says
vscsiStats -p has to be run while vscsiStats -s is still active (i.e. before you do vscsiStats -x).
If you do vscsiStats -p after you’ve stopped collection with -x, you’ll see nonsensical output where the “count” lines will be zero for everything.
If you’re used to vm-support or esxtop in batch mode (esxtop -b), you might think vscsiStats -s would itself produce persistent files. It doesn’t. That’s what the -p command does.