planarmap – tells you what is where

code:


lsdev -Cc adapter | grep "^ent" | while read A B
do
lscfg -vl $A
done | grep Network | cut -c 37- | tr 'A-Z' 'a-z' | while read MAC
        do
        echo $MAC | cut -c 1-4 | read MAC1
        echo $MAC | cut -c 5-8 | read MAC2
        echo $MAC | cut -c 9-12 | read MAC3
        echo $MAC1.$MAC2.$MAC3
        done

example:

$ planarmap
001.DQDGMFC------------------------------------------
---pci25---------------------------------------------
        pci29 sisscsia0 PCI-X Ultra320 SCSI Adapter
T7      pci30 ent0 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
T6      pci30 ent1 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
---pci26---------------------------------------------
C3-T1   pci31 fcs0 FC Adapter
C4-T1   pci32 fcs1 FC Adapter
---pci27---------------------------------------------
        pci33 sisscsia1 PCI-X Ultra320 SCSI Adapter

Leave a Reply

Your email address will not be published. Required fields are marked *