IBM Support

What servers does my HMC manage?

How To


Summary

A simple "one-liner" which I use every day. It is often the first command in a pipeline with a loop.

Objective

Banner_AIX_i_Linux
To list the names of the Power Servers managed by a particular HMC.

Environment

The environment is the HMC Command Line.
A simple CLI command to get the names of the servers managed by an HMC. It allows me to use my mouse to copy the name of a particular server to use in subsequent commands, or often I will pipe the output into a "while" loop to run a command on all of the servers in turn.

Steps

hscroot@hmc16:~> lssyscfg -r sys -F name
P9-S924-red
P7-p710c-indigo
P7-p770-purple
P8-S822-lemon
P8-S824-emerald
P7-p710b-cyan
P9-S922-amber
P7-p730b-green
P8-S822-lime
P8-E850-ruby
hscroot@hmc16:~>
And as an example, a pipeline to displaythe firmware level in each server:
 lssyscfg -r sys -F name | while read sys; do echo -e $sys\\t\\c; lslic -m $sys -F ecnumber,installed_level ; done | sort
P7-p710b-cyan   01AL730,159
P7-p710c-indigo 01AL740,167
P7-p730b-green  01AL730,159
P7-p770-purple  01AM780,100
P8-E850-ruby    01SV860,205
P8-S822-lemon   01SV860,205
P8-S822-lime    01SV860,205
P8-S824-emerald 01SV860,205
P9-S922-amber   01VL940,27
P9-S924-red     01VL940,27

Additional Information

You can contact me: 

Document Location

Worldwide

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"HW1A1","label":"IBM Power Systems"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF050","label":"BMC"},{"code":"PF041","label":"HMC"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
03 May 2021

UID

ibm11117047