1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/ksh
for EC in $(lsdev 2>/dev/null | grep '^ent' | grep -i 'etherchannel' | awk '{print $1}')
do
    print "${EC} - Etherchannel device";
    for ADAPTER in $(lsattr -El "${EC}" -a adapter_names 2>/dev/null | awk '{print $2}' | tr "," " ")
	do
        print "  $(lscfg -l ${ADAPTER} 2>/dev/null)"
    done
    BACKUP=$(lsattr -El $ec -a backup_adapter 2>/dev/null | awk '{print $2}')
    if [[ -n "${BACKUP}" && "${BACKUP}" != "NONE" ]]
	then
		print "**$(lscfg -l ${BACKUP} 2>/dev/null) ** Backup adapter"
	fi
    print
done

Example output:

ent12 - Etherchannel device
    ent1             U78C9.001.WZS0B3J-P1-C8-T2  PCIe2 4-Port adapter (10GbE SFP+) (e4148a1614109304)
    ent9             U78C9.001.WZS0B3J-P1-C10-T2  PCIe2 4-Port adapter (10GbE SFP+) (e4148a1614109304)

ent13 - Etherchannel device
    ent0             U78C9.001.WZS0B3J-P1-C8-T1  PCIe2 4-Port adapter (10GbE SFP+) (e4148a1614109304)
    ent8             U78C9.001.WZS0B3J-P1-C10-T1  PCIe2 4-Port adapter (10GbE SFP+) (e4148a1614109304)

Comments