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:
Leave a comment