Skip navigation
VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
5,461 Views 38 Replies Last post: Feb 15, 2011 7:41 PM by titaniumlegs RSS
1 2 3 Previous Next
Novice 7 posts since
Oct 9, 2008
Currently Being Moderated

Dec 11, 2009 6:22 PM

Script to display NFS Stats per-VMDK

 

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

 

 

Attachments:
lamw Guru vExpert 5,961 posts since
Nov 27, 2007
Currently Being Moderated
1. Dec 11, 2009 6:28 PM in response to: jjones2
Re: Script to display NFS Stats per-VMDK

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:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

 

 

If you find this information useful, please award points for "correct" or "helpful".

*Disclaimer: VMware Employee - William Lam | http://www.virtuallyghetto.com | http://blogs.vmware.com/vsphere/automation | @lamw
SparkFan Novice 9 posts since
Mar 15, 2009
Currently Being Moderated
3. Dec 30, 2009 7:01 PM in response to: jjones2
Re: Script to display NFS Stats per-VMDK

Hi Jeremy,

 

The script is great!

 

-Spark

m0ps Hot Shot 159 posts since
Dec 1, 2008
Currently Being Moderated
4. Jan 5, 2010 5:26 AM in response to: jjones2
Re: Script to display NFS Stats per-VMDK

it works on ESX4.0u1. many, many thx

 

 

 

 

best regards, m0ps

best regards, m0ps
fletch00 Hot Shot vExpert 341 posts since
Nov 1, 2006
Currently Being Moderated
5. Jan 5, 2010 9:06 AM in response to: jjones2
Re: Script to display NFS Stats per-VMDK

 

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

 

 

VCP5 VSP5 VTSP5 vExpert http://vmadmin.info
fletch00 Hot Shot vExpert 341 posts since
Nov 1, 2006
Currently Being Moderated
6. Jan 24, 2010 12:33 PM in response to: fletch00
Re: Script to display NFS Stats per-VMDK

 

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

 

 

VCP5 VSP5 VTSP5 vExpert http://vmadmin.info
mlubinski Expert 442 posts since
Jun 10, 2008
Currently Being Moderated
7. Feb 2, 2010 8:03 AM in response to: jjones2
Re: Script to display NFS Stats per-VMDK

 

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

 

 

[I]If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points[/I]
m0ps Hot Shot 159 posts since
Dec 1, 2008
Currently Being Moderated
8. Feb 2, 2010 8:22 AM in response to: mlubinski
Re: Script to display NFS Stats per-VMDK

edit nfstop file end replace path to vscsiStats binary from /sbin/vscsiStats to /usr/lib/vmware/bin/vscsiStats

 

 

best regards, m0ps

best regards, m0ps
mlubinski Expert 442 posts since
Jun 10, 2008
Currently Being Moderated
9. Feb 2, 2010 8:25 AM in response to: m0ps
Re: Script to display NFS Stats per-VMDK

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

[I]If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points[/I]
gicti Novice 15 posts since
Feb 25, 2005
Currently Being Moderated
10. Feb 23, 2010 1:49 PM in response to: mlubinski
Re: Script to display NFS Stats per-VMDK

Hi

 

Does this work on ESX 3.5 U4 ?

 

I have been searching in the community

"G"

mastrboy Novice 21 posts since
Jun 28, 2007
fletch00 Hot Shot vExpert 341 posts since
Nov 1, 2006
Currently Being Moderated
12. Feb 23, 2010 11:31 PM in response to: mastrboy
Re: Script to display NFS Stats per-VMDK

I am out of the office until March 1

Checking email only occasionally

VCP5 VSP5 VTSP5 vExpert http://vmadmin.info
titaniumlegs Hot Shot 101 posts since
Feb 28, 2005
Currently Being Moderated
13. Feb 23, 2010 11:46 PM in response to: gicti
Re: Script to display NFS Stats per-VMDK

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

Share and enjoy! Peter If this helped you, please award points! Or beer. Or jump tickets.
gicti Novice 15 posts since
Feb 25, 2005
Currently Being Moderated
14. Mar 4, 2010 1:22 PM in response to: jjones2
Re: Script to display NFS Stats per-VMDK

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

Bookmarked By (0)

Share This Page

Communities