Linux 시스템 lspci 명령 소개

lspci 는 말 그대로 모든 pci 장치 정 보 를 표시 합 니 다.Pci 는 일종 의 버스 이 고 Pci 버스 를 통 해 연 결 된 장 치 는 Pci 장치 입 니 다.현재 우리 가 자주 사용 하 는 설 비 는 대부분이 Pci 버스 를 사용 합 니 다. 예 를 들 어 네트워크 카드, 저장 등 입 니 다.다음은 이 명령 을 간단히 소개 하 겠 습 니 다.
lspci: 모든 pci 장치 정 보 를 표시 합 니 다.장치 의 BDF, 장치 유형, 제조 업 체 정보 등 을 포함한다.lspci - t [BDF]: 지정 한 BDF 번호 의 장치 정 보 를 표시 합 니 다.lspci - m/m: 기계 가 읽 을 수 있 는 형식 으로 pci 장치 정 보 를 표시 합 니 다.아래 의 실례 를 통 해 그 구체 적 인 차 이 를 알 수 있다.
# lspci -s ff:13.1
ff:13.1 System peripheral: Intel Corporation Broadwell Memory Controller 0 - Target Address/Thermal/RAS (rev 03)
# lspci -mm -s ff:13.1
ff:13.1 "System peripheral" "Intel Corporation" "Broadwell Memory Controller 0 - Target Address/Thermal/RAS" -r03 "Intel Corporation" "Broadwell Memory Controller 0 - Target Address/Thermal/RAS"

lspci - t: pci 장치 정 보 를 트 리 로 표시 합 니 다.lspci - v/- vv/- vvv: 상세 한 pci 장치 정 보 를 표시 합 니 다. v 가 많 을 수록 상세 합 니 다. 물론 상한 선 은 3 개 입 니 다.
# lspci -s ff:1f.2
ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)
# lspci -v -s ff:1f.2
ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)
    Flags: fast devsel
# lspci -vv -s ff:1f.2
ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)
    Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- 1f.2
ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)
    Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- 

lspci - x/- xxx/- xxxx: - x 는 16 진수 정보 로 pci 설정 공간 을 표시 합 니 다. -xxx 부분 읽 기 설정 공간 이 crash 인 장 치 를 표시 합 니 다. -xxxx 는 PCI - x 2.0 또는 PCI - e 버스 확장 설정 공간 을 표시 합 니 다.lspci - b: 모든 IRQ 와 주 소 를 버스 각도 로 표시 합 니 다.제 관찰 에 따 르 면 대부분의 정 보 는 SR - IOV 장치 에서 분 배 된 Virtual Function 장 치 를 제외 하고 매개 변수 가 없 을 때 와 일치 합 니 다.다음 예제: 물리 적 네트워크 카드 PF (physical function) 는 계속 표시 되 지만 VF (virtual function) 는 다 릅 니 다.
# lspci -b -s 0a:00.1; lspci -b -s 0a:10.0
0a:00.1 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
0a:10.0 Ethernet controller: Illegal Vendor ID Device ffff (rev 01)
# lspci -s 0a:00.1; lspci -s 0a:10.0
0a:00.1 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
0a:10.0 Ethernet controller: Intel Corporation X540 Ethernet Controller Virtual Function (rev 01)

lspci - D: PCI domain 번 호 를 표시 합 니 다. 기본 적 인 매개 변수 없 는 명령 은 이 값 을 표시 하지 않 습 니 다.다음 예제:
# lspci -s 0a:00.0
0a:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
# lspci -D -s 0a:00.0
0000:0a:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)

lspci - n/n: 장치 의 vendor 제조 업 체 번호 와 device 장치 번 호 를 표시 합 니 다.제조 업 체 등의 정보 와 이름 을 표시 합 니 다.
# lspci -nn | grep ff:1f.2
ff:1f.2 System peripheral [0880]: Intel Corporation Broadwell Power Control Unit [8086:6f8a] (rev 03)
# lspci -n | grep ff:1f.2
ff:1f.2 0880: 8086:6f8a (rev 03)

lspci - D: 장치 의 제조 업 체 번호, 장치 번호, Class 번 호 를 표시 합 니 다.
# lspci -Q -s 0c:00.1
0c:00.1 Class 0200: Device 8086:1528 (rev 01)

좋은 웹페이지 즐겨찾기