博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
lspci通过系统总线查看硬件设备信息
阅读量:7290 次
发布时间:2019-06-30

本文共 4852 字,大约阅读时间需要 16 分钟。

lspci - 列出所有PCI设备

PCI 的科普:

PCI(Peripheral Component Interconnect),是一种连接电子计算机主板和外部设备的总线标准。

常见的PCI卡包括网卡、声卡、调制解调器、电视卡和磁盘控制器,还有USB和串口等端口。原本显卡通常也是PCI设备,但很快其带宽已不足以支持显卡的性能。PCI显卡现在仅用在需要额外的外接显示器或主板上没有AGP和PCI Express槽的情况。

先看下lspci执行的效果,可以查看到硬件信息:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04)00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #2 (rev d4)00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)00:1f.0 ISA bridge: Intel Corporation QM87 Express LPC Controller (rev 04)00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8192EE PCIe Wireless Network Adapter

来几个简单的例子吧:

lspci -mm   machine-readable(怎么翻译??)输出

$ lspci -mm00:00.0 "Host bridge" "Intel Corporation" "Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller" -r06 "Lenovo" "Device 2210"00:02.0 "VGA compatible controller" "Intel Corporation" "4th Gen Core Processor Integrated Graphics Controller" -r06 "Lenovo" "Device 2210"00:03.0 "Audio device" "Intel Corporation" "Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller" -r06 "Lenovo" "Device 2210"00:14.0 "USB controller" "Intel Corporation" "8 Series/C220 Series Chipset Family USB xHCI" -r04 -p30 "Lenovo" "Device 2210"00:16.0 "Communication controller" "Intel Corporation" "8 Series/C220 Series Chipset Family MEI Controller #1" -r04 "Lenovo" "Device 2210"00:19.0 "Ethernet controller" "Intel Corporation" "Ethernet Connection I217-LM" -r04 "Lenovo" "Device 2210"00:1a.0 "USB controller" "Intel Corporation" "8 Series/C220 Series Chipset Family USB EHCI #2" -r04 -p20 "Lenovo" "Device 2210"00:1b.0 "Audio device" "Intel Corporation" "8 Series/C220 Series Chipset High Definition Audio Controller" -r04 "Lenovo" "Device 2210"00:1c.0 "PCI bridge" "Intel Corporation" "8 Series/C220 Series Chipset Family PCI Express Root Port #1" -rd4 "" ""00:1c.1 "PCI bridge" "Intel Corporation" "8 Series/C220 Series Chipset Family PCI Express Root Port #2" -rd4 "" ""00:1c.2 "PCI bridge" "Intel Corporation" "8 Series/C220 Series Chipset Family PCI Express Root Port #3" -rd4 "" ""00:1d.0 "USB controller" "Intel Corporation" "8 Series/C220 Series Chipset Family USB EHCI #1" -r04 -p20 "Lenovo" "Device 2210"00:1f.0 "ISA bridge" "Intel Corporation" "QM87 Express LPC Controller" -r04 "Lenovo" "Device 2210"00:1f.2 "SATA controller" "Intel Corporation" "8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode]" -r04 -p01 "Lenovo" "Device 2210"00:1f.3 "SMBus" "Intel Corporation" "8 Series/C220 Series Chipset Family SMBus Controller" -r04 "Lenovo" "Device 2210"03:00.0 "Unassigned class [ff00]" "Realtek Semiconductor Co., Ltd." "RTS5227 PCI Express Card Reader" -r01 "Lenovo" "Device 2210"04:00.0 "Network controller" "Realtek Semiconductor Co., Ltd." "RTL8192EE PCIe Wireless Network Adapter" "Realtek Semiconductor Co., Ltd." "Device 001b"

lspci -v | grep 8192  查看详细信息(全部的话,信息太多,就用grep过滤下吧):

$ lspci -v | grep 819204:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8192EE PCIe Wireless Network Adapter    Kernel driver in use: r8192ee

lspci -vv | grep 8192  查看更详细信息(糗,这边2个没有区别):

$ lspci -vv | grep 819204:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8192EE PCIe Wireless Network Adapter    Kernel driver in use: r8192ee

lpci -k  查看每个硬件对应的驱动

$ lspci -k | grep 819204:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8192EE PCIe Wireless Network Adapter    Kernel driver in use: r8192ee

其他的比较深奥,暂时就不看了,今天还有很多命令需要科普呢。

 

参考:

转载于:https://www.cnblogs.com/leftthen/p/4038942.html

你可能感兴趣的文章
js 与或运算符 || && 妙用
查看>>
react-conponent-secondesElapsed
查看>>
DFS 10.1.5.253 1501
查看>>
vue 项目分享
查看>>
smb
查看>>
3.算法-二叉树遍历
查看>>
File类
查看>>
基于层次关联的鲁棒多目标跟踪
查看>>
Python基础---异常
查看>>
动态调用WebService 通用方法Moss 中 传统开发中都可用。
查看>>
【cocos2d-x 024】 LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
查看>>
概述C# Cast()
查看>>
LeetCode - 9. Palindrome Number
查看>>
IOS的 new Date()格式化问题
查看>>
sharepoint webpart 获取文档库下的所有文件夹名
查看>>
java数据结构和算法--------第六章
查看>>
关于php如何连贯操作类方法(以数据库为例)
查看>>
25th SEP, 要好好的走下去
查看>>
BZOJ4822[Cqoi2017]老C的任务——树状数组(二维数点)
查看>>
BZOJ1299[LLH邀请赛]巧克力棒——Nim游戏+搜索
查看>>