lspci 命令用于显示 Linux 系统上的设备和驱动程序

当在个人电脑或服务器上运行 Linux 时,有时需要识别该系统中的硬件。lspci 命令用于显示连接到 PCI 总线的所有设备,从而满足上述需求。该命令由 pciutils 包提供,可用于各种基于 Linux 和 BSD 的操作系统。

基础用法

当普通用户运行 lspci 时,显示的信息可能会受到访问权限限制。使用 sudo 运行该命令可以提供完整的信息。

以下是家庭媒体中心电脑的一个示例。它是一台基于 AMD Phenom CPU 的系统,具有 AMD 芯片组,它还配备了 Atheros 无线控制器和 Nvidia 显卡。

仅运行 lspci 会列出 PCI 总线及其连接的设备。所有硬件设备都列有供应商、名称和型号等详细信息。

   1. $ sudo lspci2. 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS880 Host     Bridge3. 00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780     PCI to PCI bridge (ext gfx port 0)4. 00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880     PCI to PCI bridge (PCIE port 0)5. 00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880     PCI to PCI bridge (PCIE port 1)6. 00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]7. 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0     USB OHCI0 Controller8. 00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0 USB OHCI1 Controller9. 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0/SB8x0/SB9x0 USB EHCI Controller10. 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0/SB8x0/SB9x0 USB OHCI0 Controller11. 00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0 USB OHCI1 Controller12. 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0/SB8x0/SB9x0 USB EHCI Controller13. 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus     Controller (rev 3c)14. 00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0/SB8x0/SB9x0 IDE Controller15. 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0/SB8x0/SB9x0 LPC host controller16. 00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00     PCI to PCI Bridge17. 00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]     SB7x0/SB8x0/SB9x0 USB OHCI2 Controller18. 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h     Processor HyperTransport Configuration19. 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h     Processor Address Map20. 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h     Processor DRAM Controller21. 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h     Processor Miscellaneous Control22. 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h     Processor Link Control23. 01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce     GTX 650] (rev a1)24. 01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller     (rev a1)25. 02:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network     Adapter (PCI-Express) (rev 01)

详细输出

添加 -v 选项会显示每个设备的详细信息,可以使用 -vv-vvv 来获取更多的设备细节。

在 -v 级别,lspci 会显示所有设备的各种子系统和内存地址、中断请求(IRQ)编号和一些其他功能信息。输出信息会非常长。在系统上试一试吧。

使用 grep 过滤搜索

可能会需要缩小搜索范围。例如,RPM Fusion 网站有安装 Nvidia 图形驱动程序的说明,里面就首先使用了 grep 命令来定位显卡信息。下面是在笔记本电脑上得到的输出:

   1. $ sudo lspci | grep -e VGA2. 00:02.0 VGA compatible controller: Intel Corporation UHD Graphics     620 (rev 07)3. $ sudo lspci | grep -e 3D4. 01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce MX130]     (rev a2)

下面(LCTT 译注:原文为 “above”,应为作者笔误)的 grep 命令在媒体中心 PC 上定位了一个 VGA 设备,但没有显示 3D 设备。

   1. $ sudo lspci | grep -e VGA2. 01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce     GTX 650] (rev a1)3. $ sudo lspci | grep -e 3D4. $

按供应商 ID 搜索

还有另一种无需 grep 的方法可以使用。假设想确认一下此计算机是否有其他的 Nvidia 设备,在此之前们还需要一些额外信息,使用-nn选项显示的供应商和设备 ID 号。在媒体中心 PC 上,此选项会给出 VGA 卡、供应商 ID 和设备 ID:

  1. $ sudo lspci -nn | grep -e VGA
  2. 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107 [GeForce GTX 650] [10de:0fc6] (rev a1)

设备名称后的方括号内有用冒号分隔的数字,即供应商和设备 ID。输出表明 Nvidia Corporation 制造的设备的供应商 ID 为 10de。

-d 选项用于指定供应商、设备或类 ID 的所有设备。以下是系统中的所有 Nvidia 设备(保留 -nn 以解析供应商 ID):

   1. $ sudo lspci -nn -d 10de:2. 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation     GK107 [GeForce GTX 650] [10de:0fc6] (rev a1)3. 01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio     Controller [10de:0e1b] (rev a1)

从输出中可以看到,除了显卡之外,还有一个 Nvidia 音频设备。实际上它们都属于同一张 Nvidia GeForce GTX 650 卡,但这仍然是一个很好的示例。

内核模块

结合 PCI 硬件设备,lspci 可以使用 -k 选项显示内核加载了哪些驱动程序模块。将此选项添加到 lspci 命令来查看有关 Nvidia 设备的信息。

   1. $ sudo lspci -nn -k -d 10de:2. 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation     GK107 [GeForce GTX 650] [10de:0fc6] (rev a1)3.  Subsystem: eVga.com. Corp. GK107 [GeForce GTX 650] [3842:2650]4.  Kernel driver in use: nvidia5.  Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia6. 01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio     Controller [10de:0e1b] (rev a1)7.  Subsystem: eVga.com. Corp. GK107 HDMI Audio Controller [3842:2650]8.  Kernel driver in use: snd_hda_intel9.  Kernel modules: snd_hda_intel

可以看到额外显示了两行:正在使用的内核驱动程序 (Kernel driver in use) 和 内核模块 (Kernel modules),其中后者列出了可用于支持该设备的模块。

同步最新状态

新设备和供应商总是在不断迭代。如果看到显示为 unknown 的设备,说明 PCI 设备 ID 数据库可能已过时。有两种方法可以检查更新。-Q 选项会使用 DNS 查询中央数据库,当然,这需要联网。

   $ sudo lspci -Q

还可以通过运行命令 update-pciids来更新本地 PCI ID 数据库。

   1. $ sudo update-pciids2. Downloaded daily snapshot dated 2021-08-22 03:15:01

获取 PCI 总线硬件设备信息的 7 个 Linux lspci 命令示例

【摘要】

lspci 命令可视为" ls + pci "的组合功能。

lspci 将显示有关服务器中所有 PCI 总线的信息及有关连接到 PCI 和 PCIe 总线的所有硬件设备的信息(如 以太网卡、RAID 控制器、视频卡等)。

lspci 实用程序是 pciutils 软件包的一部分如果没有 pciutilis,请将其安装在系统上,如下所示。

\# yum install pciutils

1. 默认用法

默认情况下,它将显示所有设备信息,如下所示。第一个字段是槽信息,格式如下:[domain:]bus:device.function

在这个例子中,由于所有的域都是 0,所以 lspci 不会显示域。

\# lspci
00:00.0 Host bridge: Intel Corporation 5500 I/O Hub to ESI Port (rev 13)
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13)
00:09.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI Express Root Port 9 (rev 13)
00:14.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub System Management Registers (rev 13)
00:14.1 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 13)
00:14.2 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 13)
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02)
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IB (ICH9) 2 port SATA Controller [IDE mode] (rev 02)
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
01:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)
06:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)

注意:在下面的所有示例中,我们将通过从上面的列表中选择几个设备来仅显示部分输出。

2. 以不同格式转储 PCI 信息

如果要将 lspci 命令的输出传递给 shell 脚本,可能需要使用 -m 选项(或 -mm 选项),如下所示。

当要查看子系统信息时,此选项也很有帮助。例如,对于 RAID 控制器,默认输出只是说正在使用 LSI Logic RAID 控制器。但是,以下输出显示子系统,即 DELL PERC H700 集成 RAID 控制器系统。

\# lspci -m
00:00.0 "Host bridge" "Intel Corporation" "5500 I/O Hub to ESI Port" -r13 "Dell" "PowerEdge R610 I/O Hub to ESI Port"
00:09.0 "PCI bridge" "Intel Corporation" "7500/5520/5500/X58 I/O Hub PCI Express Root Port 9" -r13 "" ""
00:14.0 "PIC" "Intel Corporation" "7500/5520/5500/X58 I/O Hub System Management Registers" -r13 "" ""
00:1a.0 "USB controller" "Intel Corporation" "82801I (ICH9 Family) USB UHCI Controller #4" -r02 "Dell" "PowerEdge R610 USB UHCI Controller"
00:1f.0 "ISA bridge" "Intel Corporation" "82801IB (ICH9) LPC Interface Controller" -r02 "Dell" "PowerEdge R610 82801IB (ICH9) LPC Interface Controller"
00:1f.2 "IDE interface" "Intel Corporation" "82801IB (ICH9) 2 port SATA Controller [IDE mode]" -r02 -p8f "Dell" "PowerEdge R610 SATA IDE Controller"
01:00.0 "Ethernet controller" "Broadcom Corporation" "NetXtreme II BCM5709 Gigabit Ethernet" -r20 "Dell" "PowerEdge R610 BCM5709 Gigabit Ethernet"
03:00.0 "RAID bus controller" "LSI Logic / Symbios Logic" "MegaRAID SAS 2108 [Liberator]" -r05 "Dell" "PERC H700 Integrated"
06:03.0 "VGA compatible controller" "Matrox Electronics Systems Ltd." "MGA G200eW WPCM450" -r0a "Dell" "PowerEdge R610 MGA G200eW WPCM450"

3. 以树格式输出

-t 选项将以树格式显示输出,其中包含有关总线的信息,以及设备如何连接到这些总线,如下所示。输出将仅使用数字 ID。

\# lspci -t
-[0000:00]-+-00.0+-01.0-[01]--+-00.0|            \-00.1+-03.0-[02]--+-00.0|            \-00.1+-07.0-[04]--+-09.0-[05]--+-14.0+-14.1+-1c.0-[03]----00.0+-1d.0+-1e.0-[06]----03.0+-1f.0

4. 详细的设备信息

如果想查看特定设备的详细信息,请使用 -v 获取更多信息。这将显示有关所有设备的信息。该命令的输出会很长,需要向下滚动查看相应的部分。

对于详细程度的附加级别,可以使用 -vv 或 -vvv

在以下示例中,我仅给出了 RAID 控制器设备的输出。

\# lspci -v03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)Subsystem: Dell PERC H700 IntegratedFlags: bus master, fast devsel, latency 0, IRQ 16I/O ports at fc00 [size=256]Memory at df1bc000 (64-bit, non-prefetchable) [size=16K]Memory at df1c0000 (64-bit, non-prefetchable) [size=256K]Expansion ROM at df100000 [disabled] [size=256K]Capabilities: [50] Power Management version 3Capabilities: [68] Express Endpoint, MSI 00Capabilities: [d0] Vital Product DataCapabilities: [a8] MSI: Enable- Count=1/1 Maskable- 64bit+Capabilities: [c0] MSI-X: Enable+ Count=15 Masked-Capabilities: [100] Advanced Error ReportingCapabilities: [138] Power Budgeting <?>Kernel driver in use: megaraid_sasKernel modules: megaraid_sas

5. 在输出中显示设备代码

如果要显示 PCI 供应商代码,并且设备代码仅显示为数字,请使用 -n 选项。这不会查找 PCI 文件以获取数字的相应值。

\# lspci -n
01:00.1 0200: 14e4:1639 (rev 20)
02:00.0 0200: 14e4:1639 (rev 20)
02:00.1 0200: 14e4:1639 (rev 20)
03:00.0 0104: 1000:0079 (rev 05)
06:03.0 0300: 102b:0532 (rev 0a)

如果要同时显示描述和编号,请使用选项 -nn,如下所示。

# lspci -nn
01:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet [14e4:1639] (rev 20)
03:00.0 RAID bus controller [0104]: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] [1000:0079] (rev 05)
06:03.0 VGA compatible controller [0300]: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 [102b:0532] (rev 0a)
..

6.查找特定设备

当知道 domain🚌slot.func 格式中的插槽号时,可以查询特定设备,如下所示。在下面的示例中,我们没有指定域号,因为它是 0,可以省略。

\# lspci -s 03:00.0
03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)

当知道 vendor:device 格式的设备编号时,可以查询特定设备,如下所示。

\# lspci -d 1000:0079
03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)

如果只知道供应商 ID 或设备 ID,则可以省略另一个 ID。例如,以下两个命令都将返回与上述相同的输出。

lspci -d:0079
lspci -d 1000

7.显示内核驱动程序

当想知道将处理特定设备操作的内核模块的名称时,这非常有用。请注意,此选项仅适用于 Kernel 2.6 及更高版本。

\# lspci -k
00:1f.2 IDE interface: Intel Corporation 82801IB (ICH9) 2 port SATA Controller [IDE mode] (rev 02)Subsystem: Dell PowerEdge R610 SATA IDE ControllerKernel driver in use: ata_piixKernel modules: ata_generic, pata_acpi, ata_piix
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)Subsystem: Dell PowerEdge R610 BCM5709 Gigabit EthernetKernel driver in use: bnx2Kernel modules: bnx2
03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)Subsystem: Dell PERC H700 IntegratedKernel driver in use: megaraid_sasKernel modules: megaraid_sas        

via:

  • lspci 命令用于显示 Linux 系统上的设备和驱动程 作者:Alan Formy-Duval LCTT 原创编译,Linux中国 荣誉推出 2021-09-17
    https://opensource.com/article/21/9/lspci-linux-hardware

  • 获取 PCI 总线硬件设备信息的 7 个 Linux lspci 命令示例-云社区-华为云 Tiamo_T 发表于 2022/09/08 16:41:32

    https://bbs.huaweicloud.com/blogs/374466

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/web/45076.shtml
繁体地址,请注明出处:http://hk.pswp.cn/web/45076.shtml
英文地址,请注明出处:http://en.pswp.cn/web/45076.shtml

如若内容造成侵权/违法违规/事实不符,请联系英文站点网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

JAVA中的回溯算法解空间树,八皇后问题以及骑士游历问题超详解

1.回溯算法的概念 回溯算法顾名思义就是有回溯的算法 回溯算法实际上一个类似枚举的搜索尝试过程&#xff0c;主要是在搜索尝试过程中寻找问题的解&#xff0c;当发现已不满足求解条件时&#xff0c;就“回溯”返回&#xff0c;尝试别的路径。回溯法是一种选优搜索法&#xff…

E12.【C语言】练习:求两个数的最大公约数

1.枚举 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() {int a 0;int b 0;int tmp 0;scanf("%d %d", &a, &b);if (a < b){for (int i1; i < a; i){if (0a% i && 0b%i)tmp i;}}if (a>b){for (int i 1; i <…

[线性RNN系列] Mamba: S4史诗级升级

前言 iclr24终于可以在openreview上看预印本了 这篇&#xff08;可能是颠覆之作&#xff09;文风一眼c re组出品&#xff1b;效果实在太惊艳了&#xff0c;实验相当完善&#xff0c;忍不住写一篇解读分享分享。 TL;DR &#xff08;overview&#xff09; Structured State-Sp…

Nginx 日志统计分析命令

统计访问量最多的IP地址&#xff1a; awk {print $1} /path/to/nginx/access.log | sort | uniq -c | sort -nr | head -n 10统计不同状态码的出现次数&#xff1a; awk {print $9} /path/to/nginx/access.log | sort | uniq -c | sort -nr统计访问量最多的URL&#xff1a; awk…

SQL Server端口配置指南

SQL Server是微软推出的关系型数据库管理系统&#xff0c;它支持多种操作系统平台。默认情况下&#xff0c;SQL Server使用TCP/IP协议的1433端口进行通信。然而&#xff0c;出于安全或其他考虑&#xff0c;我们可能需要更改SQL Server实例的默认端口。本文将指导你如何更改SQL …

利率债与信用债的区别及其与债券型基金的关系

利率债与信用债的定义及其区别 定义 利率债&#xff1a; 定义&#xff1a;利率债是指由主权或类主权主体&#xff08;如中华人民共和国财政部、国家开发银行等&#xff09;发行的债券。这些债券通常被认为没有信用风险&#xff0c;因为它们由国家信用背书。特点&#xff1a;由…

【Python】 深入了解 Python 字典的 | 更新操作

我白天是个 搞笑废物 表演不在乎 夜晚变成 忧伤怪物 撕扯着孤独 我曾经是个 感性动物 小心地感触 现在变成 无关人物 &#x1f3b5; 张碧晨/王赫野《何物》 Python 3.9 引入了一种新的字典更新操作&#xff0c;即使用 | 运算符合并字典。这种方式不仅简洁…

xshell公钥免密登录

设备&#xff1a;一台linux系统机器&#xff0c;一台windows系统机器 软件&#xff1a;xshell 要求&#xff1a;公钥免密登录 一、生成公钥、私钥 1、打开shell &#xff1b; 点击工具 &#xff1b; 新建用户生成密钥向导 2、生成密钥参数 密钥类型&#xff1a;RS…

element ui ts table重置排序

#日常# 今天带的实习生&#xff0c;在遇到开发过程中&#xff0c;遇到了element ui table 每次查询的时候都需要重置排序方式&#xff0c;而且多个排序是由前端排序。 <el-table :data"tableData" ref"restTable"> </<el-table> <script…

bi项目笔记

1.bi是什么 bi项目就是商业智能系统&#xff0c;也就是数据可视画、报表可视化系统&#xff0c;如下图的就是bi项目了 2.技术栈

Linux rsync文件同步工具

scp的不足 1. 性能问题 单线程传输 SCP只使用单线程进行传输&#xff0c;这意味着在传输大文件或大量小文件时&#xff0c;其传输速度和效率可能不如其他多线程工具。 无法压缩数据传输 SCP不支持内置的压缩机制&#xff0c;这在传输大文件时会导致带宽使用效率较低。 2.…

我花了5年时间训练自己这种能力,希望你也能成功

人生最重要的能力是日拱一卒&#xff0c;即每天做一点点对自己有利的事并持续足够长的时间。作者之前急于求成&#xff0c;减肥失败。同事通过每月改进一件小事成功减肥且知识储备丰富。作者受启发后&#xff0c;通过走楼梯、换代糖等小改变&#xff0c;用 4 年减了 40 斤&…

Hive的基本操作(创建与修改)

必备知识 数据类型 基本类型 类型写法字符char, varchar, string✔整数tinyint, smallint, int✔, bigint✔小数float, double, numeric(m,n), decimal(m,n)✔布尔值boolean✔时间date✔, timestamp✔ 复杂类型(集合类型) 1、数组&#xff1a;array<T> 面向用户提供…

从头开始搭建一套Elasticsearch集群

前言 刚开始使用ES接触的就是rpm或者是云上提供的ES服务&#xff0c;基本上开箱即用。特别是云上的ES服务&#xff0c;开局就是集群版本&#xff0c;提供的是优化后的参数配置、开箱即匹配访问鉴权及常用插件&#xff0c;如无特殊需要基本上屏蔽了所有细节&#xff0c;直接可投…

深入了解 MySQL 的 EXPLAIN 命令

一、什么是 EXPLAIN 命令&#xff1f; EXPLAIN 命令用于显示 MySQL 如何执行某个 SQL 语句&#xff0c;尤其是 SELECT 语句。通过 EXPLAIN 命令&#xff0c;可以看到查询在实际执行前的执行计划&#xff0c;这对于优化查询性能至关重要。 二、EXPLAIN 的基本用法 要使用 EXP…

如何禁用键盘上的特定键或快捷方式?这里有详细步骤

要禁用特定的键盘键或快捷键吗&#xff1f;微软官方应用程序Microsoft PowerToys使这项任务变得非常简单。以下是使用Microsoft PowerToys中的键盘管理器禁用特定键或快捷方式的快速指南。 如果你还没有安装Microsoft PowerToys 如果你的设备上没有安装Microsoft PowerToys&a…

springboot上传图片

前端的name的值必须要和后端的MultipartFile 形参名一致 存储本地

3.2、matlab单目相机标定原理、流程及实验

1、单目相机标定流程及步骤 单目相机标定是通过确定相机的内部和外部参数,以便准确地在图像空间和物体空间之间建立映射关系。下面是单目相机标定的流程及步骤: 搜集标定图像:使用不同角度、距离和姿态拍摄一组标定图像,并确保标定板(可以是棋盘格或者圆形标定板)完整可…

鸿蒙开发:Universal Keystore Kit(密钥管理服务)【匿名密钥证明(C/C++)】

匿名密钥证明(C/C) 在使用本功能时&#xff0c;需确保网络通畅。 在CMake脚本中链接相关动态库 target_link_libraries(entry PUBLIC libhuks_ndk.z.so)开发步骤 确定密钥别名keyAlias&#xff0c;密钥别名最大长度为64字节&#xff1b;初始化参数集&#xff1a;通过[OH_Huk…

AcWing 667. 游戏时间

读取两个整数 A&#x1d434; 和 B&#x1d435;&#xff0c;表示游戏的开始时间和结束时间&#xff0c;以小时为单位。 然后请你计算游戏的持续时间&#xff0c;已知游戏可以在一天开始并在另一天结束&#xff0c;最长持续时间为 2424 小时。 如果 A&#x1d434; 与 B&…