I have written a small python script to parse vscsiStats histograms and display the data like the esxtop VM (v) screen. Posting the script here since some other people may find it useful.
Jeremy
Very cool! vscsiStats is a very useful tool, would be great to see this integrated into vCenter performance charts.
Generally script samples are posted under VMware Sample Code ... though there not a section for python. Nonetheless, very nice script!
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
Hi Jeremy,
The script is great!
-Spark
it works on ESX4.0u1. many, many thx
best regards, m0ps
Great script - I wrote some similar scripts to help centralize and quantify the IO load per VM on my NFS datastores to prioritize VM realignments.
I just filed a feature request SR 1471853531"Please bring the vscsistats (/usr/lib/vmware/bin/vscsiStats) into VC and align with existing APIs.
Currently the command offers a wealth of stats but only on the command line and only per ESX host.
Centralizing them into VC would provide:
1) IO stats per VM on NFS datastores (unavailable via esxtop)
2) Provide standard Trending, Alerting etc
3) Help answer questions like which VMs need to be storage vMotioned to less loaded datastores
thanks"
VCP
VMWare rejected my "Feature Request" SR - saying the SR system did not accept feature requests.
To which I replied "then why does your SR form include "Feature Request" as a category"?
It turns out there is no official way to file and track a feature request
Way to go VMWare (platinum) support
VCP
can you please explain how to run this script on ESX4?
I uploaded it into datastore, and did chmod 700 nfstop, but when I run ./nfstop it says: Please install the /sbin/vscsiStats binary.
If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points
edit nfstop file end replace path to vscsiStats binary from /sbin/vscsiStats to /usr/lib/vmware/bin/vscsiStats
best regards, m0ps
Nice, it works now, thank you
If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points
Hi
Does this work on ESX 3.5 U4 ?
I have been searching in the community
"G"
I am out of the office until March 1
Checking email only occasionally
The versions posted above do not run in ESX 3.5 due to the version of Python (Py 2.2 in ESX 3.5, Py 2.4 in ESX 4.0 and Py 2.5 in ESXi 4.0). We made a couple changes here at NetApp and got it to work, but when I wanted to post it back I was informed that we have certain legal procedures to follow when we modify somebody else's code and wish to re-publish. We're now working through that so I can share it. The changes are minor and anybody reasonably proficient in Python could figure it out, so have at it, or stay tuned.
Peter
Hi,
Great work on this tool !
When trying to exit/stop the script is there a recommend procedure ? ie. do we have to stop the data collection of vscsistats ?
Thanks in Advance,
G
Hi titaniumlegs ,
any updates on running this script on esx 3.5? it would be great if you can post an updated version for esx 3.5!
Thanks
Just go to the line 345 and remove the sorted function:
< for vm in sorted(curr.keys(), mbpsCmp):
---
for vm in curr.keys():
This will make it work.
Or you can use sort instead of sorted. Sort sorts an array in place. Sorted sorts a copy of the array, leaving the original as it was. For this script, it doesn't make much difference.
The other thing is some int variables need to be long.
Working copy attached.
Tested on
VMware ESX Server 3.5.0 build-123630
Share and Enjoy!
Thanks a bunch for this fix (beer is on me!), I'm really suprised vmware does not have this built into the product.....
What is the correct method to exit this script ? I'm worried about vscsistats staying running in the background and chewing up resources and/or space if there is any data written to disk...
"G"
/usr/lib/vmware/bin/vscsiStats -x