#!/usr/bin/ksh
for ec in `lsdev | grep ^ent | grep -i etherchannel | awk '{print $1}'`; do 
        echo "$ec - Etherchannel device"; 
        for adapter in `lsattr -El $ec -a adapter_names | awk '{print $2}' | tr "," " "`; do
                echo "  `lscfg -l $adapter`"
        done
        backup=`lsattr -El $ec -a backup_adapter 2>/dev/null | awk '{print $2}'`
        [ "$backup" != "" -a "$backup" != "NONE" ] && echo "**`lscfg -l $backup` ** Backup Adapter"
        echo
done
Advertisements