模版网站是什么意思,kn95口罩,深圳市宝安区建设工程交易中心,推荐的网站lspci 显示Linux系统的pci设备最简单的方法就是使用lspci命令#xff0c;前提是要安装pciutils包#xff08;centos在最小化安装时不会自带该包#xff0c;需要自己下载安装#xff09;
pciutils包的源码github地址为#xff1a; https://github.com/pciutils/pciutils
…lspci 显示Linux系统的pci设备最简单的方法就是使用lspci命令前提是要安装pciutils包centos在最小化安装时不会自带该包需要自己下载安装
pciutils包的源码github地址为 https://github.com/pciutils/pciutils
从该项目的README文件可以知道其主要提供三个命令lspci、setpci和update-pciids。 - lspci: displays detailed information about all PCI buses and devices. - setpci: allows to read from and write to PCI device configuration registers. For example, you can adjust the latency timers with it. CAUTION: There is a couple of dangerous points and caveats, please read the manual page first! - update-pciids: download the current version of the pci.ids file. update-pciids命令会从网上更新pci.ids文件该文件包含着pci设备的vendor id和device id 与厂商名称、型号名称的对应关系一旦更改该文件那么lspcishow出来的东西就会发生变化。
不同Linux发行版本的pci.ids文件的位置有所不同比如centos一般在/usr/share/hwdata/pci.ids而Debian一般在/usr/share/misc/pci.idslspci命令的路径一般在centos下的/usr/sbin/lspci而在Debian下一般为/use/bin/lspciupdate-pciids一般在/usr/sbin/update-pciids这些路径如果是手动编译安装pciutils则可以自行定制关于如何编译安装可参考pciutils-3.6.2。
同样不同发行版本的pciutils也有差异比如centos的update-pciids和Debian的 update-pciids是有区别的最重要的区别在于其pci.ids更新的源不同
在Debian中 #!/bin/sh #URLhttp://pci-ids.ucw.cz/pci.ids URLhttp://pciids.sourceforge.net/v2.2/pci.ids FILE/usr/share/misc/pci.ids 在centos中 #!/bin/sh [ $1 -q ] quiettrue || quietfalse set -e SRChttp://pci-ids.ucw.cz/v2.2/pci.ids DEST/usr/share/hwdata/pci.ids 在Linux的源码中也有一个名为include/linux/pci_ids.h的头文件该文件的内容定义了各个pci设备vendor_id和device_id.
同样在qemu中也存在这么一个头文件里面也是定义了各个pci设备vendor_id和device_id.