基礎命令學習目錄html
lspci是一個用來查看系統中全部PCI總線以及鏈接到該總線上的設備的工具。網絡
命令格式爲 lspci -參數 (不加參數顯示全部硬件設備)less
至於有哪些參數及其詳細用法能夠看下這篇博客:http://www.360doc.com/content/16/0712/09/1317564_574882131.shtmldom
https://www.cnblogs.com/geloutingyu/p/6380395.html工具
個人電腦lspci顯示結果爲:oop
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) //顯示控制器post
lspci,顧名思義,就是顯示全部的pci設備信息。pci是一種總線,而經過pci總線鏈接的設備就是pci設備了。現在,咱們經常使用的設備不少都是採用pci總線了,如:網卡、存儲學習
等。下面就簡單介紹下該命令。url
lspci:顯示全部的pci設備信息。包括設備的BDF,設備類型,廠商信息等。 spa
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 -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)
lspci -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 -Q -s 0c:00.10c:00.1 Class 0200: Device 8086:1528 (rev 01)
原文地址:http://blog.csdn.net/styshoo/article/details/51281437