In case it is not apparent already, vimsh is something you can invoke on an ESX 3.5.x environment, in order to grab some sometimes necessary storage information.
One particular problem that was outstanding for some time was finding a way to read /proc/vmware/scsi/vmhba<x>/* content. Specifically, the SCSI/LUN ID was sought-after by some TSEs and customers, which are unavailable due to the relevant /proc/vmware/scsi/ nodes being omitted on ESX 3.5.x.
Provided is a simple line to grab the output using vimsh:
“vimsh -n -e hostsvc/storage/topology_info &> test.txt”
It will in this order:
– Run vimsh in non-interactive mode with the “n” switch.
– Using the “e” switch, will run “hostsvc/storage/topology_info” for you.
– Will suppress STD_OUT with the “&” sign before the output redirector (benign “file not found” error shows up, may as well ignore).
– Output the content to the test.txt file.
Obviously the above is run in BASH / the COS.
If you want a more general overview of storage, replace “topology_info” with “info”.
When running vimsh, remember that you can use “Tab” to list the available files/commands and categories. Content of a file/command is displayed by invoking it directly. We effectively execute hostsvc/storage/topology_info to list this information. Hostsvc and storage are directories or categories.
There is a wealth of information contained and accessed by this utility. I don’t believe we want customers to play around with it, but I imagine you may run into cases where they need the SCSI information for their SAN teams. The above should help a bit.
Note that vsish acts differently, and contained values are obtained using “get”.
Good luck, hope it helps some of you out there still confused.