List WWPN of all LPARs or a specific LPAR using HMC command

Question:How to WWPN of all LPARs or a specific LPAR using HMC command?

Solution:

To List WWPN of all LPARs on a managed system:

 MS=um-BOX-9117-MMB-SN129SBCP

#lshwres -r virtualio --rsubtype fc -m $MS --level lpar -F lpar_name,slot_num,wwpns --header |grep -v null
lpar_name,slot_num,wwpns
umaix101,5,"c05076036cfc002e,c05076036cfc002f"
umaix101,4,"c05078044abc002c,c05078044abc002d"
umaix101,3,"c05078044abc002a,c05078044abc002b"
umaix101,2,"c05078044abc0028,c05078044abc0029"
umaix102,5,"c05078044abc0538,c05078044abc0539"
umaix102,4,"c05078044abc0536,c05078044abc0537"
umaix102,3,"c05078044abc0534,c05078044abc0535"
umaix102,2,"c05078044abc0532,c05078044abc0533"
umaix333,5,"c05078044abc00c6,c05078044abc00c7"
umaix333,4,"c05078044abc00c4,c05078044abc00c5"
umaix333,3,"c05078044abc00c2,c05078044abc00c3"
umaix333,2,"c05078044abc00c0,c05078044abc00c1"

Please be noted slot_number is useful to identify the FC adapter on AIX.

For example:

On server umaix333

#lsum -Ccadapter|grep fcs
fcs0 Available C2-T1 Virtual Fibre Channel Client Adapter
fcs1 Available C3-T1 Virtual Fibre Channel Client Adapter
fcs2 Available C4-T1 Virtual Fibre Channel Client Adapter
fcs3 Available C5-T1 Virtual Fibre Channel Client Adapter
The location of fcs0 is C2, which means its slot_number is 2.

To List WWPN of a specific LPAR:

MS=um-BOX-9117-MMB-SN129SBCP
LPAR=umaix333

#lshwres -r virtualio --rsubtype fc -m $MS --filter lpar_names=$LPAR --level lpar -F lpar_name,slot_num,wwpns --header

lpar_name,slot_num,wwpns
umaix333,5,”c05078044abc00c6,c05078044abc00c7?
umaix333,4,”c05078044abc00c4,c05078044abc00c5?
umaix333,3,”c05078044abc00c2,c05078044abc00c3?
umaix333,2,”c05078044abc00c0,c05078044abc00c1?


0 Comment "List WWPN of all LPARs or a specific LPAR using HMC command"

Post a Comment

Comment here