• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

vscsiStats output in esxtop format?

Duncan Epping · Dec 17, 2009 ·

This week we(Frank Denneman and I) played around with vscsiStats, it’s a weird command and hard to get used to when you normally dive into esxtop when there are performance issues. While asking around for more info on the metrics and values someone emailed us nfstop. I assumed it was NDA or at least not suitable for publication yet  but William Lam pointed me to a topic on the VMTN Communities which contains this great script. Definitely worth checking out. This tool parses the vscsiStats output into an esxtop format. Below a screenshot of what that looks like:

Related

Management & Automation, Server ESX, esxi, performance, Scripting, scripts, Storage, Tools, vstorage

Reader Interactions

Comments

  1. Coen says

    17 December, 2009 at 22:36

    After changing the python path on the first-line from /bin/python to /usr/bin/python, which seems to be the default on Vsphere, the script fails with a parse error:

      File "./nfstop", line 233
        return (cols[name][0].rjust(cols[name][1]) if cols[name][2] else '') + ' '
                                                    ^
    SyntaxError: invalid syntax
    
  2. vishy says

    17 December, 2009 at 23:10

    Same error with ESX3.5 U4

  3. Jeff says

    17 December, 2009 at 23:43

    It works on ESXi, the ternary operator being used on line 233 is only available with python 2.5. If the version of python you are using is < 2.5 you will need to change the script to do something like the following:

    # Construct a column header
    def colHdr(name, just=COL_RIGHT):
    if cols[name][2]:
    if just == COL_RIGHT:
    return cols[name][0].rjust(cols[name][1]) + ' '
    else:
    return cols[name][0].ljust(cols[name][1]) + ' '
    else:
    return ' '

    If that fixes the error on line 233 you will have to make similar changes to other functions that use the ternary operator.

  4. Jeff says

    17 December, 2009 at 23:56

    It works on ESXi 4.0, the ternary operator used on line 233 was first made available in version 2.5 of Python. If the python version on classic ESX 3.5/4.0 is < 2.5 you will have to change that code to something like the following:

    # Construct a column header
    def colHdr(name, just=COL_RIGHT):
    if cols[name][2]:
    if just == COL_RIGHT:
    return cols[name][0].rjust(cols[name][1]) + ' '
    else:
    return cols[name][0].ljust(cols[name][1]) + ' '
    else:
    return ' '

    If that fixes the syntax error on line 233 you will have to make similar changes to the 'colSVal' and 'colFval' functions.

  5. James says

    18 December, 2009 at 00:16

    Same error me for me, running on 4.0.0 – 175625.

  6. Jeff says

    18 December, 2009 at 01:22

    I was able to use it on ESXi 4.0, if you look at the original thread on the communities forum the author has posted an upated version that will supposedly work on classic.

  7. vishy says

    18 December, 2009 at 01:47

    had to change this line in ESX4.0U1 to make it work
    VSCSI_CMD = “/usr/lib/vmware/bin/vscsiStats”

    however still fails on ESX 3.5U4

    Traceback (most recent call last):
    File “./nfstop”, line 404, in ?
    sys.exit(main())
    File “./nfstop”, line 399, in main
    refresh(float(duration))
    File “./nfstop”, line 326, in refresh
    parseHistos(curr, vscsiStats[1])
    File “./nfstop”, line 138, in parseHistos
    parseHisto(VMS, stats)
    File “./nfstop”, line 112, in parseHisto
    hist[‘min’] = int(stats.pop().split(‘,’)[1])
    ValueError: int() literal too large: 18446744073691345273

  8. Jeff says

    18 December, 2009 at 01:58

    I don’t have a classic ESX 3.5 machine to test on (ESXi 3.5 doesn’t have python at all) but I suspect the vscsiStats histogram output might have changed. Can you compare ‘vscsiStats -p all’ output on 3.5 vs 4.0 to see if the formatting looks different ?

  9. Jeff says

    18 December, 2009 at 02:00

    Just looked at the script again, looks like you’ll need to compare “vscsiStats -c -p all” output.

  10. Peter says

    29 April, 2010 at 22:41

    There is a version posted on the VMware Communities thread that works in 3.5.
    http://communities.vmware.com/message/1511493#1511493

    Shara and enjoy!

  11. Steve says

    9 June, 2010 at 14:16

    could you please advice where can I download a copy of vscsistats from?
    is this a vmware utils for 3rd party?

    thanking you in advance for your help.

    Steve

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Advertisements




Copyright Yellow-Bricks.com © 2025 · Log in