preload
Jul 01

I needed to update documentation and I needed more information that my prior syslayout.sh script provided on fiber.

# Improvement by JRF on the ITRC forums.
ioscan -kfnC fc | awk ‘/fcd/ {getline;fcd=$NF;print fcd,$2}’ | while read -r fdev
do
fcmsutil ${fdev} | awk ‘/Hardware / {print $5};/World / { print $7}’
done

Ouput looks like this:

0/0/12/1/0/4/0
0x5001438002a24979
0x5001438002a24978
0x204f000dec81b540
0x200f000dec81b541

0/0/12/1/0/4/1
0x5001438002a2497b
0x5001438002a2497a
0x2093000dec81b480
0x2010000dec81b481

2/0/12/1/0/4/0
0x5001438002a24d35
0x5001438002a24d34
0x2050000dec81b480
0x2010000dec81b481

2/0/12/1/0/4/1
0x5001438002a24d37
0x5001438002a24d36
0x2093000dec81b540
0x200f000dec81b541

Second, new improved version (Girsah Chadash)
ioscan -kfnC fc | awk ‘/fcd/ {getline;fcd=$NF;print fcd,$2}’ | while read -r fde
v
do
# fcmsutil ${fdev} | awk ‘/Hardware / {print $5};/World / { print $7}’ | awk
‘ {printf “%s %s %s %s %s”,$1, $2, $3, $4, $5;}’
fcmsutil ${fdev} | awk ‘/Hardware Path/ {PATH=$5};
/N_Port Node/ {NNODE=$7};
/N_Port Port/ {NPORT=$7};
/Switch Port/ {SPORT=$7};
/Switch Node/ {SNODE=$7};
END{print PATH, NNODE, NPORT, SPORT, SNODE}’
done

Next innovation would be to combine the awk statements in the while loop and pull off the output with a single awk command. I may do this, but I might need help from an awk guru.

The ioscan output is multi line, so the real innovation is using the getline function of awk to get the second line of data and ignore the first. The filter /fcd gets rid of the column format information.

Yes it could be done with grep, but it is more AWKFUL this way.

SEP

Tagged with:
Oct 27

 Important information in bold. Must run as root. Serial numbers changed to protect the innocent.

No electrons were harmed in the creation of this message.

root # fcmsutil /dev/fcd1

                           Vendor ID is = 0×001077
                           Device ID is = 0×002312
            PCI Sub-system Vendor ID is = 0x00103c
                   PCI Sub-system ID is = 0x0012c9
                               PCI Mode = PCI-X 133 MHz
                       ISP Code version = 3.3.18
                       ISP Chip version = 3
                      Previous Topology = UNINITIALIZED
                             Link Speed = UNKNOWN
                     Local N_Port_id is = None
                  Previous N_Port_id is = None
            N_Port Node World Wide Name = 0x50060b0000c1bd8b
            N_Port Port World Wide Name = 0x50060b0000c1bd8a
            Switch Port World Wide Name = 0×0000000000000000
            Switch Node World Wide Name = 0×0000000000000000
                           Driver state = AWAITING_LINK_UP
                       Hardware Path is = 3/0/12/1/0/4/1
                     Maximum Frame Size = 2048
         Driver-Firmware Dump Available = NO
         Driver-Firmware Dump Timestamp = N/A
                         Driver Version = @(#) libfcd.a HP Fibre Channel ISP 23xx & 24xx Driver B.11.23.06 /ux/core/isu/FCD/kern/src/common/wsio/fcd_init.c:Jun 23 2006,14:05:23

                           Driver state = AWAITING_LINK_UP (Sure sign of a dead card)

 

root  # fcmsutil /dev/fcd1 vpd
                V I T A L   P R O D U C T   D A T A
                ———   ————-   ——-

 Product Description    : “PCI-X 2-port 2Gb FC/2-port 1000B-T HBA                     ”

 Part number            : “AB465-60001″

 Engineering Date Code  : “A-4620″

 Part Serial number     : “PQR06501L0″

 Misc. Information      : “PW=25W;PCI 66MHZ;PCI-X 133MHZ”

 Mfd. Date              : “4651″

 Check Sum              : 0xf9

 EFI version            : “001.47″

 ROM Firmware version   : “003.003.154″

 Asset Tag              : “NA”

Tagged with: