From Mexico.purplecow.org

Revision as of 22:33, 21 November 2013 by Andre (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

This little script will dump HBAs, WWNs and device paths. Combine with prtdiag -v to chase down slots.

This will break page formatting. Copy pasta from the source

for i in `fcinfo hba-port -l | grep "Port WWN" | cut -d: -f2`; do
        CTR=`fcinfo hba-port -l |egrep 'Port WWN|Model|Device' | awk "/$i/{getline; print}" | grep OS | cut -d/ -f4`
        DEVP=`cfgadm -v $CTR | grep fc | awk '{print $4}' | sed -e 's,/fp.*,,'`
        MDL=`fcinfo hba-port -l | egrep 'Port WWN|Model|Device' | awk "/$i/{print; getline; print; getline; print}" | cut -d: -f2 | perl -pe 's/\n//' | awk '{print $3 " " $1 }'`
        printf "$MDL $CTR $DEVP\n"
done