본문 바로가기

Linux & Unix

Linux Bus 주소로 PCI Slot 번호 확인

## Bus Address 확인 명령
lspci
lspci | grep -i hba
lspci | grep -i ethernet
lspci | grep -i raid

## PCI slot 번호와 연결된 Bus Address 확인
dmidecode -t slot
dmidecode -t slot | grep -e PCI-E -e Bus

## PCI Slot 에 해당하는 Bus Address 와, lspci 에서 찾은 device 의 Bus Address 를 매칭

lspci | grep -i hba
-----------------------------------------------------------------------------------------------
0a:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
0a:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
27:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
27:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
-----------------------------------------------------------------------------------------------

dmidecode -t slot | grep -e PCI-E -e Bus
----------------------------------------
Designation: PCI-E Slot 1
Bus Address: 0000:04:00.0
Designation: PCI-E Slot 2
Bus Address: 0000:07:00.0
Designation: PCI-E Slot 3
Bus Address: 0000:0a:00.0
Designation: PCI-E Slot 4
Bus Address: 0000:21:00.0
Designation: PCI-E Slot 5
Bus Address: 0000:24:00.0
Designation: PCI-E Slot 6
Bus Address: 0000:27:00.0
----------------------------------------

HBA 는 PCI Slot 3, Slot 6 을 사용함을 알 수 있다.