說明:
lspci 是一個用來顯示系統中所有 PCI 匯流排裝置或連線到該匯流排上的所有裝置的工具。
引數:
-v
使得 lspci 以冗餘模式顯示所有裝置的詳細資訊。
-vv
使得 lspci 以過冗餘模式顯示更詳細的資訊 (事實上是 PCI 裝置能給出的所有東西) 。這些資料的確切意義沒有在此手冊頁中解釋,如果你想知道更多,請參照 /usr/include/linux/pci.h 或者 PCI 規範。
-n
以數字形式顯示 PCI 生產廠商和裝置號,而不是在 PCI ID 資料庫中查詢它們。
-x
以十六進位制顯示 PCI 配置空間 (configuration space) 的前 64 個位元組映像 (標準頭部資訊) 。此引數對除錯驅動和 lspci 本身很有用。
-xxx
以十六進位制顯示所有 PCI 配置空間的映像。此選項只有 root 可用,並且很多 PCI 裝置在你試圖讀取配置空間的未定義部分時會崩潰 (此操作可能不違反 PCI 標準,但是它至少非常愚蠢) 。
-b
以匯流排為中心進行檢視。顯示所有 IRQ 號和記憶體地址,就像 PCI 匯流排上的卡看到的一樣,而不是核心看到的內容。
-t
以樹形方式顯示包含所有匯流排、橋、裝置和它們的連線的圖表。
-s [[]:][][.[]]
僅顯示指定匯流排、插槽上的裝置或裝置上的功能塊資訊。裝置地址的任何部分都可以忽略,或以「*」代替 (意味著所有值) 。所有數字都是十六進位制。例如:「0:」指的是在 0 號匯流排上的所有裝置;「0」指的是在任意匯流排上 0 號裝置的所有功能塊;「0.3」選擇 了所有匯流排上 0 號裝置的第三個功能塊;「.4」則是隻列出每一裝置上的第四個功能塊。
-d []:[]
只顯示指定生產廠商和裝置 ID 的裝置。 這兩個 ID 都以十六進位製表示,可以忽略或者以「*」代替 (意味著所有值) 。
-i
使用 作為 PCI ID 資料庫而不是使用預設的 /usr/share/hwdata/pci.ids 。
-p


使用 作為包含 PCI 匯流排資訊的目錄而不是使用預設的目錄 /proc/bus/pci 。
-m
以機器可讀的方式轉儲 PCI 裝置資料 (支援兩種模式:普通和冗餘),便於稿本解析。
-M
使用匯流排對映模式,這種模式對匯流排進行全面地掃描以查明匯流排上的所有裝置,包括配置錯誤的橋之後的裝置。請注意,此操作只應在除錯時使 用,並可能造成系統崩潰 (只在裝置有錯誤的時候,但是不幸的是它們存在),此命令只有 root 可以使用。同時,在不直接接觸硬體的 PCI 訪問模式中使用 -M 引數沒有意義,因為顯示的結果 (排除 lspci 中的 bug 的影響) 與普通的列表模式相同。
–version
顯示 lspci 的版本。這個選項應當單獨使用。

PCILIB 選項 PCILIB OPTIONS
PCI 工具使用 PCILIB (一種可移植的庫,提供平臺獨立的函式來訪問 PCI 配置空間) 來和 PCI 卡互動。下面的選項用來控制庫引數,特別是所用訪問模式的指定。預設情況下,PCILIB 使用第一種可用的訪問模式,不會顯示任何除錯資訊。每一個開關選項都列出了一組它所支援的硬體/軟站群軟體列表。
-P


使用 linux 2.1 風格的配置,直接訪問目錄 而非 /proc/bus/pci 目錄。 (只能在 linux 2.1 或以上版本中使用)
-H1
透過 Intel 架構 1 來實現直接硬體訪問。 (只能用於 i386 及其相容機)
-H2
透過 Intel 架構 2 來實現直接硬體訪問。警告:此模式只能定址任何匯流排上的前 16 個裝置,並且在很多情況下相當不可靠。 (只能用於 i386 及其相容機)
-S
使用 PCI 系統呼叫訪問。 (只能用於 Alpha 和 Ultra-Sparc 上的 Linux)
-F
從所給的包含 lspci -x 命令輸出的檔案中獲取相關資訊。這在分析使用者提交的錯誤報告時很有用,因為你可以用任何方式來顯示硬體配置資訊而無需為了獲取更多資訊打擾使用者。 (可用於所有系統)
-G
增加庫的除錯等級。 (可用於所有系統)
例項:
例項 1:不必加上任何選項,就能夠顯示出目前的硬體配備
# lspci
00:00.0 Host bridge: Intel Corporation 3200/3210 Chipset DRAM Controller //WordPress 主機板晶片
00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) //USB 控制器
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) //介面插槽
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IR (ICH9R) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02)
02:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G200e [Pilot] ServerEngines (SEP1) (rev 02) //顯示卡
03:02.0 Ethernet controller: Intel Corporation 82541GI Gigabit Ethernet Controller (rev 05) //網路卡
例項 2:檢視一般詳細資訊
# lspci -v
00:00.0 Host bridge: Intel Corporation 3200/3210 Chipset DRAM Controller
Subsystem: Intel Corporation Unknown device 34d0
Flags: bus master, fast devsel, latency 0
Capabilities: [e0] Vendor Specific Information

00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
Subsystem: Intel Corporation Unknown device 34d0
Flags: bus master, fast devsel, latency 0, IRQ 50
Memory at e1a00000 (32-bit, non-prefetchable) [size=128K]
Memory at e1a20000 (32-bit, non-prefetchable) [size=4K]
I/O ports at 20e0 [size=32]
Capabilities: [c8] Power Management version 2
Capabilities: [d0] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable+
Capabilities: [e0] #13 [0306]
例項 3:檢視網路卡詳細資訊
# lspci -s 03:02.0 -vv //-s 後面接的是每個裝置的匯流排、插槽與相關函式功能
03:02.0 Ethernet controller: Intel Corporation 82541GI Gigabit Ethernet Controller (rev 05)
Subsystem: Intel Corporation Unknown device 34d0
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR-