From Mexico.purplecow.org

(Difference between revisions)
Jump to: navigation, search
(New page: 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 <pre> for i in `fcinfo ...)
Current revision (22:33, 21 November 2013) (view source)
 
Line 11: Line 11:
done
done
</pre>
</pre>
 +
 +
[[Category: Tech]]

Current revision

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