In my quest of writing part 2 of storage performance 101 (so folks can be equipped to combat bullshit storage vendor claims), I came across a pretty neat esxtop command line option. So I decided to do a mini post so folks could try this out. Pretty sweet option for those of you with large environments, and want performance stats for a specific VM/LUN/vSwitch portgroup).
If you are not yet a fan of ‘esxtop’ yet, I highly encourage you to read my prior post on basic performance health check with esxtop . This experimentally supported option is quite useful, especially when you 1)have a large environment with large number of VMs/LUNs and 2)you only care about a subset, or one specific VM, portgroup or LUN. The option is the “-export-entity” and “import-entity”. They go hand-in-hand as you need to first export the list of objects available for display, then run esxtop to import the modified list.
Here’s an usage example:
#esxtop –export-entity /tmp/esxtopALL (this command exports the list of objects to a file named ‘esxtopALL’)
In VI editor, you’d be given a list of all the objects (under several categories) for you to narrow down. They are broken down quite nicely:
SchedGroup (list of VM/helper VM that are running)
Adapter (list of all storage adapters in the host)
Device (list of all storage devices presented to the ESX host)
NetPort (list of all port groups defined for virtual networking in ESX)
InterruptVector (list of all PCI device vectors)
If you are trying to see stats for a specific LUN, then you could simply comment out other LUN device entries under “Device” category – like the example below – I only care about looking at performance stats for my first LUN which eui of 589dedXX, so I commented out the rest of the devices in the list. *TIP with VI editor*: after you enter the first “#”, hit “Esc” key, go to the beginning of each line, and press “.” to repeat the insert for each device.
After you have commented out what you DON’T want to see, then issue the following command:
#esxtop –import-entity /tmp/esxtopALL
Here’s the example of my esxtop before, showing stats for all LUNs:
And here’s after, with only the desired LUN:
Much cleaner, isn’t it? Now in case you ask me how the heck to find which VMFS volume corresponds to that hideous EUI or NAA string, check out my previous blog post on useful iSCSI commands.