红联Linux门户
Linux帮助

Linux系统查看PCI/USB设备信息

发布时间:2016-04-30 10:00:19来源:zhukun.net作者:linux人

Linux系统查看PCI设备信息,基本是使用lspci命令,如果找不到该命令,那么需要先安装pciutils软件包。


列出系统的PCI设备:
[root@os2 ~]# lspci
00:00.0 Host bridge: Intel Corporation Xeon E5/Core i7 DMI2 (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 1a (rev 07)
00:03.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode (rev 07)
00:05.0 System peripheral: Intel Corporation Xeon E5/Core i7 Address Map, VTd_Misc, System Management (rev 07)
00:05.2 System peripheral: Intel Corporation Xeon E5/Core i7 Control Status and Global Errors (rev 07)
00:05.4 PIC: Intel Corporation Xeon E5/Core i7 I/O APIC (rev 07)
00:11.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Virtual Root Port (rev 06)
00:16.0 Communication controller: Intel Corporation C600/X79 series chipset MEI Controller #1 (rev 05)
00:16.1 Communication controller: Intel Corporation C600/X79 series chipset MEI Controller #2 (rev 05)
00:1a.0 USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #2 (rev 06)
00:1c.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Root Port 1 (rev b6)
00:1c.7 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Root Port 8 (rev b6)
00:1d.0 USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #1 (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation C600/X79 series chipset LPC Controller (rev 06)
00:1f.2 IDE interface: Intel Corporation C600/X79 series chipset 4-Port SATA IDE Controller (rev 06)
00:1f.3 SMBus: Intel Corporation C600/X79 series chipset SMBus Host Controller (rev 06)
00:1f.5 IDE interface: Intel Corporation C600/X79 series chipset 2-Port SATA IDE Controller (rev 06)
05:00.0 RAID bus controller: Adaptec Series 6 - 6G SAS/PCIe 2 (rev 01)
06:00.0 Serial Attached SCSI controller: Intel Corporation C602 chipset 4-Port SATA Storage Control Unit (rev 06)
06:00.3 SMBus: Intel Corporation C600/X79 series chipset SMBus Controller 0 (rev 06)
07:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
09:00.0 PCI bridge: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge (rev 02)
0a:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 21)
7f:08.0 System peripheral: Intel Corporation Xeon E5/Core i7 QPI Link 0 (rev 07)
7f:08.3 System peripheral: Intel Corporation Xeon E5/Core i7 QPI Link Reut 0 (rev 07)


注意:如果有显示unknown device,说明/usr/share/hwdata/pci.ids文件太旧,没有及时更新。


查看设备的vendor id和device id(同样可以在/usr/share/hwdata/pci.ids文件中查看)
[root@os2 ~]# lspci -n | grep 00:01.0
00:01.0 0604: 8086:3c02 (rev 07)


查看设备详细信息:
[root@os2 ~]# lspci -xxxxx -s 00:1f.5    #x越多,列出的信息越详细
00:1f.5 IDE interface: Intel Corporation C600/X79 series chipset 2-Port SATA IDE Controller (rev 06)
00: 86 80 08 1d 05 00 b0 02 06 85 01 01 00 00 00 00
10: 71 90 00 00 61 90 00 00 51 90 00 00 41 90 00 00
20: 31 90 00 00 21 90 00 00 00 00 00 00 86 80 08 1d
30: 00 00 00 00 70 00 00 00 00 00 00 00 0b 02 00 00
40: 00 80 00 80 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 01 b0 03 00 08 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 13 00 06 03 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 87 0f 07 08 00 00 00 00

[root@os2 ~]# lspci -vv -s 00:1f.5    #v越多,列出的信息越详细
00:1f.5 IDE interface: Intel Corporation C600/X79 series chipset 2-Port SATA IDE Controller (rev 06) (prog-if 85 [Master SecO PriO])
Subsystem: Intel Corporation C600/X79 series chipset 2-Port SATA IDE Controller
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin B routed to IRQ 19
Region 0: I/O ports at 9070 [size=8]
Region 1: I/O ports at 9060 [size=4]
Region 2: I/O ports at 9050 [size=8]
Region 3: I/O ports at 9040 [size=4]
Region 4: I/O ports at 9030 [size=16]
Region 5: I/O ports at 9020 [size=16]
Capabilities: [70] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [b0] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Kernel driver in use: ata_piix
Kernel modules: ata_generic, pata_acpi, ata_piix


补充:
查看系统中的USB设备,可以在安装usbutils包以后,使用lsusb命令查看。


本文永久更新地址:http://www.linuxdiyf.com/linux/20232.html