linux中Iscpi命令詳解(四)

lscpi命令詳解

lspci是一個用來查看系統中所有PCI總線以及連接到該總線上的設備的工具。

命令格式爲 lspci -參數 (不加參數顯示所有硬件設備)

我的電腦lspci顯示結果爲:

00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)  //主橋
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)  //顯卡兼容控制器
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)  //聲卡
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)  //USB控制器
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)  //通信控制器
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04) 
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)  //PCI橋
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)    //數據局部總線
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)  //硬盤模式
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)  //系統管理總線
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)  //網卡
02:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)  //網絡控制器
03:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun LE [Radeon HD 8550M / R5 M230] (rev ff)  //顯示控制器

    • 摘要:         lspci,顧名思義,就是顯示所有的pci設備信息。pci是一種總線,而通過pci總線連接的設備就是pci設備了。如今,我們常用的設備很多都是採用pci總線了,如:網卡、存儲等。下面就簡單介紹下該命令。       lspci:顯示所有的pci設備信息。包括設備的BDF,設備類型,廠商信息等。&nbs
    •           lspci,顧名思義,就是顯示所有的pci設備信息。pci是一種總線,而通過pci總線連接的設備就是pci設備了。如今,我們常用的設備很多都是採用pci總線了,如:網卡、存儲

      等。下面就簡單介紹下該命令。

              lspci:顯示所有的pci設備信息。包括設備的BDF,設備類型,廠商信息等。 
      lspci -t [BDF]:顯示指定BDF號的設備信息。 
      lspci -m/-mm:以一種機器可讀的格式來顯示pci設備信息。下面的實例可以看出其具體的區別。

      # lspci -s ff:13.1ff:13.1 System peripheral: Intel Corporation Broadwell Memory Controller 0 - Target Address/Thermal/RAS (rev 03)# lspci -mm -s ff:13.1ff: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.2ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)# lspci -v -s ff:1f.2ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)  Flags: fast devsel# lspci -vv -s ff:1f.2ff: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- <TAbort- <MAbort- >SERR- <PERR- INTx-# lspci -vvv -s ff:1f.2ff: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- <TAbort- <MAbort- >SERR- <PERR- INTx- 
      lspci -x/-xxx/-xxxx:-x以16進制信息顯示pci配置空間;-xxx顯示部分讀配置空間會crash的設備;-xxxx顯示PCI-x2.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.00a: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.00a: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) 

      spci -D:顯示PCI domain號,默認的不加參數命令並不顯示該值。如下示例:

      # lspci -s 0a:00.00a:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)# lspci -D -s 0a:00.00000:0a:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01) 

      lspci -n/-nn:顯示設備的vendor廠商號和device設備號;顯示廠商等信息和名稱。

      # lspci -nn | grep ff:1f.2ff:1f.2 System peripheral [0880]: Intel Corporation Broadwell Power Control Unit [8086:6f8a] (rev 03)# lspci -n | grep ff:1f.2ff:1f.2 0880: 8086:6f8a (rev 03) 
      lspci -D:顯示設備的廠商號、設備號、Class號。
      # lspci -Q -s 0c:00.10c:00.1 Class 0200: Device 8086:1528 (rev 01) 
      原文地址:http://blog.csdn.net/styshoo/article/details/51281437 
    • 以上是

Linux系統之lspci命令介紹

    • 的內容,更多

命令 介紹 系統 lspci Linux

    • 的內容,請您使用右上方搜索功能獲取相關信息
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章