lspci 指令_plsr指令

lspci 指令_plsr指令1.指令名称lspci2.指令简介lspci是一个用于显示系统中所有PCI/PCIe总线及设备信息的工具。默认情况下,它只显示设备的最简要信息。通过传入指定参数,可以输出更详细的信息,或者可以按照特定格式输出,以便于用其他程序进行解析。有些PCI/PCIe的设备信息需要在root权限下才能获取到。3.参数先来看看不加任何参数时输出的结果。bryan@bryan-pc:~$lspci00:00.0Hostbridge:IntelCorporation8.

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

1. 指令名称

lspci

2. 指令简介

lspci 是一个用于显示系统中所有 PCI/PCIe 总线及设备信息的工具。

默认情况下,它只显示设备的最简要信息。通过传入指定参数,可以输出更详细的信息,或者可以按照特定格式输出,以便于用其他程序进行解析。

有些 PCI/PCIe 的设备信息需要在 root 权限下才能获取到。

3. 参数

先来看看不加任何参数时输出的结果。

bryan@bryan-pc:~$ lspci
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 08)
00:02.0 VGA compatible controller: Intel Corporation 8th Gen Core Processor Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
00:14.2 Signal processing controller: Intel Corporation 200 Series PCH Thermal Subsystem
00:15.0 Signal processing controller: Intel Corporation 200 Series PCH Serial IO I2C Controller #0
00:15.1 Signal processing controller: Intel Corporation 200 Series PCH Serial IO I2C Controller #1
00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1
00:17.0 SATA controller: Intel Corporation 200 Series PCH SATA controller [AHCI mode]
00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #7 (rev f0)
00:1d.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #9 (rev f0)
00:1e.0 Signal processing controller: Intel Corporation 200 Series/Z370 Chipset Family Serial IO UART Controller #0
00:1f.0 ISA bridge: Intel Corporation Device a2cc
00:1f.2 Memory controller: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller
00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio
00:1f.4 SMBus: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller
01:00.0 PCI bridge: PLX Technology, Inc. Device 8749 (rev ca)
01:00.1 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
01:00.2 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
01:00.3 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
01:00.4 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
02:08.0 PCI bridge: PLX Technology, Inc. Device 8749 (rev ca)
02:09.0 PCI bridge: PLX Technology, Inc. Device 8749 (rev ca)
02:10.0 PCI bridge: PLX Technology, Inc. Device 8749 (rev ca)
03:00.0 Memory controller: Xilinx Corporation Device 8038 (rev ff)
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
07:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3165 Plus Bluetooth (rev 99)

3.1 基本显示模式

-m: 以机器可读的方式输出信息

bryan@bryan-pc:~$ lspci -m
00:00.0 "Host bridge" "Intel Corporation" "8th Gen Core Processor Host Bridge/DRAM Registers" -r08 "Lenovo" "Device 3178"
00:01.0 "PCI bridge" "Intel Corporation" "Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16)" -r08 "" ""
00:02.0 "VGA compatible controller" "Intel Corporation" "8th Gen Core Processor Gaussian Mixture Model" "Lenovo" "Device 3178"
00:14.0 "USB controller" "Intel Corporation" "200 Series/Z370 Chipset Family USB 3.0 xHCI Controller" -p30 "Lenovo" "200 Series PCH USB 3.0 xHCI Controller"
00:14.2 "Signal processing controller" "Intel Corporation" "200 Series PCH Thermal Subsystem" "Lenovo" "200 Series PCH Thermal Subsystem"
00:15.0 "Signal processing controller" "Intel Corporation" "200 Series PCH Serial IO I2C Controller #0" "Lenovo" "200 Series PCH Serial IO I2C Controller"
00:15.1 "Signal processing controller" "Intel Corporation" "200 Series PCH Serial IO I2C Controller #1" "Lenovo" "200 Series PCH Serial IO I2C Controller"
00:16.0 "Communication controller" "Intel Corporation" "200 Series PCH CSME HECI #1" "Lenovo" "200 Series PCH CSME HECI"
00:17.0 "SATA controller" "Intel Corporation" "200 Series PCH SATA controller [AHCI mode]" -p01 "Lenovo" "200 Series PCH SATA controller [AHCI mode]"
00:1c.0 "PCI bridge" "Intel Corporation" "200 Series PCH PCI Express Root Port #7" -rf0 "" ""
00:1d.0 "PCI bridge" "Intel Corporation" "200 Series PCH PCI Express Root Port #9" -rf0 "" ""
00:1e.0 "Signal processing controller" "Intel Corporation" "200 Series/Z370 Chipset Family Serial IO UART Controller #0" "Lenovo" "200 Series PCH Serial IO UART Controller"
00:1f.0 "ISA bridge" "Intel Corporation" "Device a2cc" "Lenovo" "Device 3178"
00:1f.2 "Memory controller" "Intel Corporation" "200 Series/Z370 Chipset Family Power Management Controller" "Lenovo" "200 Series PCH PMC"
00:1f.3 "Audio device" "Intel Corporation" "200 Series PCH HD Audio" "Lenovo" "200 Series PCH HD Audio"
00:1f.4 "SMBus" "Intel Corporation" "200 Series/Z370 Chipset Family SMBus Controller" "Lenovo" "200 Series PCH SMBus Controller"
01:00.0 "PCI bridge" "PLX Technology, Inc." "Device 8749" -rca "" ""
01:00.1 "System peripheral" "PLX Technology, Inc." "Device 87d0" -rca "PLX Technology, Inc." "Device 87d0"
01:00.2 "System peripheral" "PLX Technology, Inc." "Device 87d0" -rca "PLX Technology, Inc." "Device 87d0"
01:00.3 "System peripheral" "PLX Technology, Inc." "Device 87d0" -rca "PLX Technology, Inc." "Device 87d0"
01:00.4 "System peripheral" "PLX Technology, Inc." "Device 87d0" -rca "PLX Technology, Inc." "Device 87d0"
02:08.0 "PCI bridge" "PLX Technology, Inc." "Device 8749" -rca "" ""
02:09.0 "PCI bridge" "PLX Technology, Inc." "Device 8749" -rca "" ""
02:10.0 "PCI bridge" "PLX Technology, Inc." "Device 8749" -rca "" ""
03:00.0 "Memory controller" "Xilinx Corporation" "Device 8038" "Xilinx Corporation" "Device 0007"
06:00.0 "Ethernet controller" "Realtek Semiconductor Co., Ltd." "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller" -r15 "Lenovo" "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller"
07:00.0 "Network controller" "Intel Corporation" "Dual Band Wireless-AC 3165 Plus Bluetooth" -r99 "Intel Corporation" "Dual Band Wireless-AC 3165 Plus Bluetooth"

-mm : 以机器可读的方式输出信息,并且易于使用脚本处理。(没看出与 lspci -m 有什么区别)

bryan@bryan-pc:~$ lspci -mm
00:00.0 "Host bridge" "Intel Corporation" "8th Gen Core Processor Host Bridge/DRAM Registers" -r08 "Lenovo" "Device 3178"
00:01.0 "PCI bridge" "Intel Corporation" "Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16)" -r08 "" ""
00:02.0 "VGA compatible controller" "Intel Corporation" "8th Gen Core Processor Gaussian Mixture Model" "Lenovo" "Device 3178"
00:14.0 "USB controller" "Intel Corporation" "200 Series/Z370 Chipset Family USB 3.0 xHCI Controller" -p30 "Lenovo" "200 Series PCH USB 3.0 xHCI Controller"
00:14.2 "Signal processing controller" "Intel Corporation" "200 Series PCH Thermal Subsystem" "Lenovo" "200 Series PCH Thermal Subsystem"
00:15.0 "Signal processing controller" "Intel Corporation" "200 Series PCH Serial IO I2C Controller #0" "Lenovo" "200 Series PCH Serial IO I2C Controller"
00:15.1 "Signal processing controller" "Intel Corporation" "200 Series PCH Serial IO I2C Controller #1" "Lenovo" "200 Series PCH Serial IO I2C Controller"
00:16.0 "Communication controller" "Intel Corporation" "200 Series PCH CSME HECI #1" "Lenovo" "200 Series PCH CSME HECI"
00:17.0 "SATA controller" "Intel Corporation" "200 Series PCH SATA controller [AHCI mode]" -p01 "Lenovo" "200 Series PCH SATA controller [AHCI mode]"
00:1c.0 "PCI bridge" "Intel Corporation" "200 Series PCH PCI Express Root Port #7" -rf0 "" ""
00:1d.0 "PCI bridge" "Intel Corporation" "200 Series PCH PCI Express Root Port #9" -rf0 "" ""
00:1e.0 "Signal processing controller" "Intel Corporation" "200 Series/Z370 Chipset Family Serial IO UART Controller #0" "Lenovo" "200 Series PCH Serial IO UART Controller"
00:1f.0 "ISA bridge" "Intel Corporation" "Device a2cc" "Lenovo" "Device 3178"
00:1f.2 "Memory controller" "Intel Corporation" "200 Series/Z370 Chipset Family Power Management Controller" "Lenovo" "200 Series PCH PMC"
00:1f.3 "Audio device" "Intel Corporation" "200 Series PCH HD Audio" "Lenovo" "200 Series PCH HD Audio"
00:1f.4 "SMBus" "Intel Corporation" "200 Series/Z370 Chipset Family SMBus Controller" "Lenovo" "200 Series PCH SMBus Controller"
01:00.0 "PCI bridge" "PLX Technology, Inc." "Device 8749" -rca "" ""
01:00.1 "System peripheral" "PLX Technology, Inc." "Device 87d0" -rca "PLX Technology, Inc." "Device 87d0"
01:00.2 "System peripheral" "PLX Technology, Inc." "Device 87d0" -rca "PLX Technology, Inc." "Device 87d0"
01:00.3 "System peripheral" "PLX Technology, Inc." "Device 87d0" -rca "PLX Technology, Inc." "Device 87d0"
01:00.4 "System peripheral" "PLX Technology, Inc." "Device 87d0" -rca "PLX Technology, Inc." "Device 87d0"
02:08.0 "PCI bridge" "PLX Technology, Inc." "Device 8749" -rca "" ""
02:09.0 "PCI bridge" "PLX Technology, Inc." "Device 8749" -rca "" ""
02:10.0 "PCI bridge" "PLX Technology, Inc." "Device 8749" -rca "" ""
03:00.0 "Memory controller" "Xilinx Corporation" "Device 8038" -rff -pff "" ""
06:00.0 "Ethernet controller" "Realtek Semiconductor Co., Ltd." "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller" -r15 "Lenovo" "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller"
07:00.0 "Network controller" "Intel Corporation" "Dual Band Wirelessbryan@bryan-pc:~$

-t : 以树状格式显示整个 PCI/PCIe 总线系统,能方便的看出总线、桥、设备之间的级联关系。

bryan@bryan-pc:~$ lspci -t
-[0000:00]-+-00.0
           +-01.0-[01-05]--+-00.0-[02-05]--+-08.0-[03]----00.0
           |               |               +-09.0-[04]--
           |               |               \-10.0-[05]--
           |               +-00.1
           |               +-00.2
           |               +-00.3
           |               \-00.4
           +-02.0
           +-14.0
           +-14.2
           +-15.0
           +-15.1
           +-16.0
           +-17.0
           +-1c.0-[06]----00.0
           +-1d.0-[07]----00.0
           +-1e.0
           +-1f.0
           +-1f.2
           +-1f.3
           \-1f.4

3.2 显示选项

-v ,-vv,-vvv : 显示设备的详细信息,加的 v 越多,显示的越详细。最多加 3 个 v。

bryan@bryan-pc:~$ lspci -v
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
        Subsystem: Lenovo Device 3178
        Flags: bus master, fast devsel, latency 0
        Capabilities: <access denied>
        Kernel driver in use: skl_uncore
        Kernel modules: ie31200_edac

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 08) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 122
        Bus: primary=00, secondary=01, subordinate=05, sec-latency=0
        I/O behind bridge: 00002000-00003fff
        Memory behind bridge: df000000-df1fffff
        Prefetchable memory behind bridge: 000000008f800000-000000008fdfffff
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:02.0 VGA compatible controller: Intel Corporation 8th Gen Core Processor Gaussian Mixture Model (prog-if 00 [VGA controller])
        Subsystem: Lenovo Device 3178
        Flags: bus master, fast devsel, latency 0, IRQ 133
        Memory at de000000 (64-bit, non-prefetchable) [size=16M]
        Memory at c0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at f000 [size=64]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915

........

-k : 显示当前设备对应的驱动程序、内核模块。当传入 -v 参数时,会默认显示这些内容。

-x,-xxx,-xxxx: 以 16 进制的形式输出 PCI/PCIe 配置空间(以 root 权限执行)。一个 x 时,输出配置空间的前 64 个字节;三个 x 时,输出配置空间的前 256 个字节;四个 x 时,输出配置空间的 4096 个字节(很奇怪,没有两个 x )。

bryan@bryan-pc:~$ sudo lspci -x
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00: 86 80 1f 3e 06 00 90 20 08 00 00 06 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 78 31
30: 00 00 00 00 e0 00 00 00 00 00 00 00 00 00 00 00

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 08)
00: 86 80 01 19 07 04 10 00 08 00 04 06 10 00 81 00
10: 00 00 00 00 00 00 00 00 00 01 05 00 20 30 00 20
20: 00 df 10 df 81 8f d1 8f 00 00 00 00 00 00 00 00
30: 00 00 00 00 88 00 00 00 00 00 00 00 0b 01 12 00

...
...

-D : 显示 PCI/PCIe Domain number。如果在系统中只有 Domain 0,那默认情况下是不会显示 domain 的。

bryan@bryan-pc:~$ sudo lspci -D
0000:00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
0000:00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 08)
0000:00:02.0 VGA compatible controller: Intel Corporation 8th Gen Core Processor Gaussian Mixture Model
0000:00:14.0 USB controller: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
0000:00:14.2 Signal processing controller: Intel Corporation 200 Series PCH Thermal Subsystem
0000:00:15.0 Signal processing controller: Intel Corporation 200 Series PCH Serial IO I2C Controller #0
0000:00:15.1 Signal processing controller: Intel Corporation 200 Series PCH Serial IO I2C Controller #1
0000:00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1
0000:00:17.0 SATA controller: Intel Corporation 200 Series PCH SATA controller [AHCI mode]
0000:00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #7 (rev f0)
0000:00:1d.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #9 (rev f0)
0000:00:1e.0 Signal processing controller: Intel Corporation 200 Series/Z370 Chipset Family Serial IO UART Controller #0
0000:00:1f.0 ISA bridge: Intel Corporation Device a2cc
0000:00:1f.2 Memory controller: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller
0000:00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio
0000:00:1f.4 SMBus: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller
0000:01:00.0 PCI bridge: PLX Technology, Inc. Device 8749 (rev ca)
0000:01:00.1 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
0000:01:00.2 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
0000:01:00.3 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
0000:01:00.4 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
0000:02:08.0 PCI bridge: PLX Technology, Inc. Device 8749 (rev ca)
0000:02:09.0 PCI bridge: PLX Technology, Inc. Device 8749 (rev ca)
0000:02:10.0 PCI bridge: PLX Technology, Inc. Device 8749 (rev ca)
0000:03:00.0 Memory controller: Xilinx Corporation Device 8038 (rev ff)
0000:06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
0000:07:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3165 Plus Bluetooth (rev 99)
bryan@bryan-pc:~$

3.3 将 ID 解析为名称

-n : 直接以数字的形式显示设备的 vendor ID 和 device ID。

bryan@bryan-pc:~$ sudo lspci -n
00:00.0 0600: 8086:3e1f (rev 08)
00:01.0 0604: 8086:1901 (rev 08)
00:02.0 0300: 8086:3e91
00:14.0 0c03: 8086:a2af
00:14.2 1180: 8086:a2b1
00:15.0 1180: 8086:a2e0
00:15.1 1180: 8086:a2e1
00:16.0 0780: 8086:a2ba
00:17.0 0106: 8086:a282
00:1c.0 0604: 8086:a296 (rev f0)
00:1d.0 0604: 8086:a298 (rev f0)
00:1e.0 1180: 8086:a2a7
00:1f.0 0601: 8086:a2cc
00:1f.2 0580: 8086:a2a1
00:1f.3 0403: 8086:a2f0
00:1f.4 0c05: 8086:a2a3
01:00.0 0604: 10b5:8749 (rev ca)
01:00.1 0880: 10b5:87d0 (rev ca)
01:00.2 0880: 10b5:87d0 (rev ca)
01:00.3 0880: 10b5:87d0 (rev ca)
01:00.4 0880: 10b5:87d0 (rev ca)
02:08.0 0604: 10b5:8749 (rev ca)
02:09.0 0604: 10b5:8749 (rev ca)
02:10.0 0604: 10b5:8749 (rev ca)
03:00.0 0580: 10ee:8038 (rev ff)
06:00.0 0200: 10ec:8168 (rev 15)
07:00.0 0280: 8086:3166 (rev 99)

-nn : 同时以数字和文字描述两种方式显示设备的 Vendor ID 和 Device ID。

bryan@bryan-pc:~$ sudo lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3e1f] (rev 08)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 08)
00:02.0 VGA compatible controller [0300]: Intel Corporation 8th Gen Core Processor Gaussian Mixture Model [8086:3e91]
00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
00:14.2 Signal processing controller [1180]: Intel Corporation 200 Series PCH Thermal Subsystem [8086:a2b1]
00:15.0 Signal processing controller [1180]: Intel Corporation 200 Series PCH Serial IO I2C Controller #0 [8086:a2e0]
00:15.1 Signal processing controller [1180]: Intel Corporation 200 Series PCH Serial IO I2C Controller #1 [8086:a2e1]
00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
00:1c.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #7 [8086:a296] (rev f0)
00:1d.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #9 [8086:a298] (rev f0)
00:1e.0 Signal processing controller [1180]: Intel Corporation 200 Series/Z370 Chipset Family Serial IO UART Controller #0 [8086:a2a7]
00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:a2cc]
00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
01:00.0 PCI bridge [0604]: PLX Technology, Inc. Device [10b5:8749] (rev ca)
01:00.1 System peripheral [0880]: PLX Technology, Inc. Device [10b5:87d0] (rev ca)
01:00.2 System peripheral [0880]: PLX Technology, Inc. Device [10b5:87d0] (rev ca)
01:00.3 System peripheral [0880]: PLX Technology, Inc. Device [10b5:87d0] (rev ca)
01:00.4 System peripheral [0880]: PLX Technology, Inc. Device [10b5:87d0] (rev ca)
02:08.0 PCI bridge [0604]: PLX Technology, Inc. Device [10b5:8749] (rev ca)
02:09.0 PCI bridge [0604]: PLX Technology, Inc. Device [10b5:8749] (rev ca)
02:10.0 PCI bridge [0604]: PLX Technology, Inc. Device [10b5:8749] (rev ca)
03:00.0 Memory controller [0580]: Xilinx Corporation Device [10ee:8038] (rev ff)
06:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
07:00.0 Network controller [0280]: Intel Corporation Dual Band Wireless-AC 3165 Plus Bluetooth [8086:3166] (rev 99)

3.4 指定设备

通过下面的两种方法指定某一个设备,结合上面介绍的参数,即可完成对特定设备的操作。

-s [[[[<domain>]:]<bus>]:][<device>][.[<func>]] : 通过 domain、bus、device、function 指定某一个设备进行操作。所有的值都是 16 进制,domain 的取值范围是 0~ffff,bus 的取值范围是 0~ff,device 的取值范围是 0~1f,function 的取值范围是 0~7。如果不指定值或者设置为 * 号,则代表“任何值”。例如,“0:”代表 bus 0 上的所有 device;“0”代表 deivice 0 上的所有 functions;“0.3”代表选择所有 bus 上的 device 0 的第 3 个 function;“.4”代表所有 device 的第 4 个 function。

# 列出 domain 0 bus 6 device 0 function 0 的信息
bryan@bryan-pc:~$ sudo lspci -v -s 0000:06:00.0
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
        Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
        Flags: bus master, fast devsel, latency 0, IRQ 18
        I/O ports at e000 [size=256]
        Memory at df304000 (64-bit, non-prefetchable) [size=4K]
        Memory at df300000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 01
        Capabilities: [b0] MSI-X: Enable+ Count=4 Masked-
        Capabilities: [d0] Vital Product Data
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
        Capabilities: [170] Latency Tolerance Reporting
        Capabilities: [178] L1 PM Substates
        Kernel driver in use: r8169
        Kernel modules: r8169

bryan@bryan-pc:~$

-d [<vendor>]:[<device>][:<class>] : 通过 vendor ID、device ID、class ID 来指定一个设备。所有 ID 值都是 16 进制数,如果不值定值或者设置为 * 号,则表示“任何值”。

# 列出 vendor ID = 0x10b5, device ID = 87d0, class ID = 0880 的设备信息
bryan@bryan-pc:~$ sudo lspci -d 10b5:87d0:0880
01:00.1 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
01:00.2 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
01:00.3 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
01:00.4 System peripheral: PLX Technology, Inc. Device 87d0 (rev ca)
bryan@bryan-pc:~$

更多 PCI/PCIe 内容,点击该链接

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/195562.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • MFC的图片按钮

    MFC的图片按钮

  • lmdb数据库_Interbase数据库

    lmdb数据库_Interbase数据库LMDB全称为LightningMemory-MappedDatabase,就是非常快的内存映射型数据库,LMDB使用内存映射文件,可以提供更好的输入/输出性能,对于用于神经网络的大型数据集(比如ImageNet),可以将其存储在LMDB中…

  • CAP原理通俗理解「建议收藏」

    CAP原理通俗理解「建议收藏」在分布式系统中,有一个基本原则叫做CAP,consistence,一致性,availability,可用性,partitiontolerance分区容错性。 一致性,在这里指的是分布式系统的各个副本的值要保持同步,这里强的是空间上的一致,注意和数据库中ACID中的一致性相区分,那个一致性指的是事务执行前后的逻辑一致性,比如你转1000块给别人,不能你的账户少了1000块,对方的账户却没有多10…

  • c语言ioctl函数_min函数用法

    c语言ioctl函数_min函数用法ioctl是设备驱动程序中对设备的I/O通道进行管理的函数。所谓对I/O通道进行管理,就是对设备的一些特性进行控制,例如串口的传输波特率、马达的转速等等。它的调用个数如下: intioctl(intfd,indcmd,…);    其中fd是用户程序打开设备时使用open函数返回的文件标示符,cmd是用户程序对设备的控制命令,至于后面的省略号,那是一些补充参数,一般最多一个,这个参数的…

    2022年10月18日
  • 基于MapReduce的SimRank++算法研究与实现[通俗易懂]

    基于MapReduce的SimRank++算法研究与实现

  • LPCTSTR类型

    LPCTSTR类型如何理解LPCTSTR类型?L表示long指针这是为了兼容Windows3.1等16位操作系统遗留下来的,在win32中以及其他的32为操作系统中,long指针和near指针及far修饰符都是为了兼容的作用。没有实际意义。P表示这是一个指针C表示是一个常量T表示在Win32环境中,有一个_T宏这个宏用来表示你的字符是否使用UNICODE,如果你的

    2022年10月26日

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号