在Linux系统中,可以使用lspci命令来查看PCI设备。lspci是一个用于显示所有PCI总线设备或连接到这些总线的设备的实用程序。
要使用lspci命令,请按照以下步骤操作:
lspci命令,然后按Enter键。这将显示系统上所有PCI设备的列表。例如:
$ lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
...
如果你想查看更详细的信息,可以使用-v(verbose)选项:
$ lspci -v
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
Subsystem: Intel Corporation Device 0601
Flags: bus master, fast devsel, latency 0
Capabilities: <access denied>
Kernel driver in use: intel-pci-bridge
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00002000-00002fff
Memory behind bridge: f7800000-f7bfffff
Prefetchable memory behind bridge: 00000000f0000000-00000000f1ffffff
Capabilities: <access denied>
Kernel driver in use: ixgbe
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
Subsystem: Intel Corporation Device 0601
Flags: bus master, fast devsel, latency 0, IRQ 47
Memory at f7a00000 (64-bit, non-prefetchable) [size=4M]
Capabilities: <access denied>
Kernel driver in use: i915_bpo
此外,还可以使用其他选项来自定义输出,例如:
-s:指定要查看的设备(通过PCI地址)。-k:显示内核驱动程序信息。-nn:显示设备的PCI ID和供应商ID。更多关于lspci命令的选项和用法,请参阅其手册页(man page):
$ man lspci