Linux lspci命令

Linux lspci命令:列出所有的PCI设备。

Linux lspci命令 功能描述

使用lspci命令可以列出主机上面所有的PCI设备。

Linux lspci命令 语法

lspci [选项]

命令中各选项的含义如表所示。



lspci命令选项含义

Linux lspci命令 示例

显示所有的PCI设备

[root@rhel ~]# lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX -82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX -82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
00:11.0 PCI bridge: VMware PCI bridge (rev 02)
00:15.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:16.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:17.7 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.1 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.2 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.3 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.4 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.5 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.6 PCI bridge: VMware PCI Express Root Port (rev 01)
00:18.7 PCI bridge: VMware PCI Express Root Port (rev 01)
02:00.0 USB controller: VMware USB1.1 UHCI Controller1
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
02:02.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)
02:03.0 USB controller: VMware USB2 EHCI Controller

lspci命令输出信息描述如表所示(选取第一行信息来描述)。
lspci命令输出信息描述

显示PCI设备的相关标识符

[root@rhel ~]# lspci -n
00:00.00600: 8086:7190 (rev 01)
00:01.00604: 8086:7191 (rev 01)
00:07.00601: 8086:7110 (rev 08)
00:07.10101: 8086:7111 (rev 01)
00:07.30680: 8086:7113 (rev 08)
00:07.70880: 15ad:0740 (rev 10)
00:0f.00300: 15ad:0405
00:10.00100: 1000:0030 (rev 01)
00:11.00604: 15ad:0790 (rev 02)
00:15.00604: 15ad:07a0 (rev 01)
00:15.10604: 15ad:07a0 (rev 01)
00:15.20604: 15ad:07a0 (rev 01)
00:15.30604: 15ad:07a0 (rev 01)
00:15.40604: 15ad:07a0 (rev 01)
00:15.50604: 15ad:07a0 (rev 01)
00:15.60604: 15ad:07a0 (rev 01)
00:15.70604: 15ad:07a0 (rev 01)
00:16.00604: 15ad:07a0 (rev 01)
00:16.10604: 15ad:07a0 (rev 01)
00:16.20604: 15ad:07a0 (rev 01)
00:16.30604: 15ad:07a0 (rev 01)
........................(省略)

lspci -n命令输出信息描述如表所示(选取第一行信息来描述)。

lspci -n命令输出信息描述

查看制造商标识符是8086, PCI设备标识符是7190的设备

[root@rhel ~]# lspci -d 8086:7190
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX -82443BX/ZX/DX Host bridge (rev 01)

显示PCI设备的详细信息

[root@rhel ~]# lspci -v
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX -82443BX/ZX/DX Host bridge (rev 01)
      Subsystem: VMware Virtual Machine Chipset
      Flags: bus master, medium devsel, latency 0
      Kernel driver in use: agpgart-intel
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX-82443BX/ZX/DX AGP bridge(rev 01)(prog-if 00 [Normal decode])
      Flags: bus master, 66MHz, medium devsel, latency 0
      Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
      Kernel modules: shpchp
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
      Subsystem: VMware Virtual Machine Chipset
      Flags: bus master, medium devsel, latency 0
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 8a [Master SecP PriP])
      Subsystem: VMware Virtual Machine Chipset
      Flags: bus master, medium devsel, latency 64
      [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
      [virtual] Memory at 000003f0 (type 3, non-prefetchable)
      [virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
      [virtual] Memory at 00000370 (type 3, non-prefetchable)
      I/O ports at 10c0 [size=16]
      Kernel driver in use: ata_piix
      Kernel modules: ata_generic, pata_acpi, ata_piix
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
      Subsystem: VMware Virtual Machine Chipset
      Flags: medium devsel, IRQ 9
      Kernel modules: i2c-piix4
........................(省略)

显示网卡这个PCI设备的详细信息

[root@rhel ~]# lspci|grep Ethernet
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
//显示网卡的总线、插槽和函数是02:01.0
[root@rhel ~]# lspci -v -s 02:01.0
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
      Subsystem: VMware PRO/1000 MT Single Port Adapter
      Physical Slot: 33
      Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 19
      Memory at c9020000 (64-bit, non-prefetchable) [size=128K]
      Memory at c9000000 (64-bit, non-prefetchable) [size=64K]
      I/O ports at 2000 [size=64]
      [virtual] Expansion ROM at d8400000 [disabled] [size=64K]
      Capabilities: [dc] Power Management version 2
      Capabilities: [e4] PCI-X non-bridge device
      Kernel driver in use: e1000
      Kernel modules: e1000

显示USB设备的信息

[root@rhel ~]# lspci | grep -i usb
02:00.0 USB controller: VMware USB1.1 UHCI Controller
02:03.0 USB controller: VMware USB2 EHCI Controller
赞(0)
未经允许不得转载:极客笔记 » Linux lspci命令
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址