Originally posted by: SystemAdmin
There used to be an IBM Technote on identifying HBAs (Matching marketing code to feature code). Anyway, the document seems to be moved regularly across the IBM website (the link I bookmarked is broken right now), so I wrote the attached script identify_hba. (note that the lines with the array elements might be folded by the forum software, these should be complete literals in the form
"FC ..." \ one per line).
Regards,
Joachim Gann
#!/usr/bin/ksh
-
identify_hba, jgan@izb.de, Technote: http://www-1.ibm.com/support/docview.wss?&uid=isg1pTechnote1478
set -A PartNumber2FeatureCode \
"FC 6227\t1GBit PCI\tdevices.pci.df1000f7.rte , devices.pci.df1000f7.com:PN 09P4038, 09P1162, 03N4167, or 24L0023" \
"FC 6228\t1GBit PCI64\tdevices.pci.df1000f9.rte , devices.pci.df1000f7.com: PNs 03N2452 (FRU 09P0102) , 09P5079 (FRU 09P5080), 00P2995 (FRU 00P2996), 00P4494 (FRU 00P4495), 80P3388 (FRU 80P3389), 80P4383 (FRU 80P4384)" \
"FC 6239\t2GBit PCI-X\tdevices.pci.df1080f9.rte , devices.pci.df1000f7.com:PN 00P4295, 80P4381, 80P6454" \
"FC 5716\t2GBit PCI-X\tdevices.pci.df1000fa.rte , devices.pci.df1000f7.com:PN: 80P4543, 03N6441" \
"FC 1977 :PN: 80P6101, 80P6455, 03N6439" \
"FC 1957 :PN: 03N4698, 03N6440"
function FeatureCode
{
PartNumber=$1; i=0;
while [ $i -lt ${#PartNumber2FeatureCode
*]} do
echo ${PartNumber2FeatureCode
$i}|grep -q $PartNumber
$? -eq 0 && echo ${PartNumber2FeatureCode
$i}|awk -F: '{print $1}' && return
let i=$i+1
done
}
echo "Device\tPart#\tFC\tInterfaces\tDriver Filesets"
for fc_dev in $(lscfg -l fcs\*|awk '{print $1}'|sort)
do
part_number=$(lscfg -vl $fc_dev|fgrep 'Part Number'|sed "s/\./ /g"|awk '{print $3}')
echo "${fc_dev}\t${part_number}\t$(FeatureCode $part_number)"
done