说明:
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-