识别系统中的 PCI 设备
在这最后一步中,我们将学习如何使用 lspci 命令来识别系统中的 PCI 设备,并理解提供的信息。
让我们再次运行基本的 lspci 命令:
sudo lspci
示例输出:
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (rev 07)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (rev 02)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 (rev f0)
00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #1 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #13 (rev f0)
此输出显示了系统中检测到的各种 PCI 设备,包括主机桥(Host Bridge)、PCI 桥、VGA 控制器、USB 控制器等。每一行代表一个 PCI 设备,并包含其设备 ID、供应商和其他详细信息。
要获取特定 PCI 设备的更详细信息,可以使用 lspci -v 命令:
sudo lspci -v -s 00:02.0
这将显示插槽 00:02.0 处的 PCI 设备的详细信息,在本例中为 VGA 控制器。
你还可以使用 lspci -nn 命令查看数字格式的设备和供应商 ID,这对于识别特定设备非常有用:
sudo lspci -nn
示例输出:
00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3e30] (rev 07)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller [8086:1901] (rev 07)
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 [8086:3e9b] (rev 02)
00:14.0 USB controller [0c03]: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller [8086:a36d] (rev 10)
00:14.2 RAM memory [0500]: Intel Corporation Cannon Lake PCH Shared SRAM [8086:a36f] (rev 10)
00:16.0 Communication controller [0780]: Intel Corporation Cannon Lake PCH HECI Controller [8086:a360] (rev 10)
00:17.0 SATA controller [0106]: Intel Corporation Cannon Lake PCH SATA AHCI Controller [8086:a353] (rev 10)
00:1b.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 [8086:a344] (rev f0)
00:1c.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port #1 [8086:a338] (rev f0)
00:1d.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port #13 [8086:a33c] (rev f0)
此输出显示了数字格式的 PCI 设备 ID,这对于识别特定设备或查找其规格非常有用。
通过使用 lspci 命令及其各种选项,你可以收集有关系统中 PCI 设备的详细信息,这对于故障排除、硬件识别以及理解整体系统配置非常有价值。