The lshwres Command and Hardware Discovery
How to use the HMC command line to get information from managed machines.
By Rob McNelly05/14/2019
I've previously written about using the HMC command line to get information from managed machines. It's a terrific use of the HMC, especially if you're working with new machines and your OS isn't loaded yet. Even in established environments, the HMC command line makes everything easier. Why bother with logging into multiple VIO servers or LPARs to get information?
In my friend's case, he was running a loop. First he used lssyscfg to get the system names. Then he fed those names into the lshwres command. It was simple enough; he wanted to collect WWNs for his SAN team so they could get them zoned appropriately:
lshwres -r virtualio -m <machine name> --rsubtype fc --level lpar -F lpar_name,wwpnsHowever, for some reason, only the two new E950 machines were providing the expected output. Meanwhile, nothing was happening with the two new S924 machines. "No results were found" was the only response from them.
A web search on the lshwres command returned this information from IBM developerWorks:
If the lshwres commmand displays the message:
No results were found
then hardware discovery has not yet been done. The managed server must be powered off and back on with the hardware discovery option. To power on a managed server with hardware discovery from the HMC command line, use the HMC command chsysstate -m xxx -r sys -o onhwdisc, where xxx is the same as above. Or choose the Hardware Discovery option in the HMC Power On window, assuming the Hardware Discovery option is offered by the HMC GUI.
Please note that when powered on with the hardware discovery option, a server takes longer to get to partition standby mode than without the option. And once in partition standby mode, a temporary LPAR for hardware discovery is created and started, which takes additional time.
Sure enough, once we powered off the machines and restarted the frames with the onhwdisc option, the S924s also gave the expected output.
Rob McNelly is a senior AIX solutions architect doing pre-sales and post-sales support for IBM Premier Business Partner Meridian IT Inc. More →
Post a Comment
Note: Comments are moderated and will not appear until approvedcomments powered by Disqus