Detailed explanation of lspci commands in CentOS

Source: Internet
Author: User

Detailed explanation of lspci commands in CentOS

Note:
Lspci is a tool used to display all PCI bus devices in the system or all devices connected to the bus.

Parameters:

-V enables lspci to display the details of all devices in redundancy mode. -Vv enables lspci to display more detailed information in redundancy mode (in fact, everything that PCI devices can provide ). The exact meaning of the data is not explained on this manual page. For more information, see/usr/include/linux/pci. h or PCI specifications. -N displays the PCI manufacturer and device numbers in numbers instead of searching for them in the pci id database. -X displays the first 64 bytes of the PCI configuration space in hexadecimal format (standard header information ). This parameter is useful for debugging drivers and lspci itself. -Xxx displays the images of all PCI configuration spaces in hexadecimal format. This option is only available for root, and many PCI devices crash when you try to read the undefined part of the configuration space (this operation may not violate the PCI standard, but it is at least stupid ). -B is bus-centric. Display All IRQ numbers and memory addresses, just like what the card on the PCI bus sees, rather than what the core sees. -T displays charts containing all bus, bridges, devices, and their connections in a tree. -S [[<bus>]:] [<slot>] [. [<func>] Only displays the function block information of the specified bus, device on the slot, or device. Any part of the device address can be ignored, or replaced with "*" (meaning all values ). All numbers are hexadecimal. For example, "0:" indicates all devices on bus 0, and "0" indicates all functional blocks of devices on any bus 0; "0.3" selects the third feature block of device 0 on all bus ;「. 4. Only the fourth feature block on each device is listed. -D [<vendor>]: [<device>] Only displays devices with the specified manufacturer and device ID. Both IDs are expressed in hexadecimal notation and can be ignored or replaced with "*" (meaning all values ). -I <file> use <file> as the PCI ID database instead of the preset/usr/share/hwdata/pci. ids. -P <dir> uses <dir> as the directory containing PCI bus information, rather than the preset directory/proc/bus/pci. -M dumps PCI device data in a machine-readable manner (two modes are supported: Normal Mode and redundancy mode), which is then parsed in the manuscript. -M uses the bus ing mode, which comprehensively scans the bus to identify all the devices on the bus, including those behind the wrong bridge. Please note that this operation should only be used during debugging and may cause system crashes (only when devices are faulty, but unfortunately they exist ), this command can only be used by the root user. At the same time, it is meaningless to use the-M parameter in PCI access mode that is not directly exposed to hardware, because the displayed results (excluding the impact of bugs in lspci) are the same as those in common list mode. -- Version: displays the version of lspci. This option should be used independently. The PCILIB option pcilib optionspci tool uses PCILIB (a portable library that provides platform-independent functions to access the PCI configuration space) to interact with the PCI Card. The following options are used to control the database parameters, especially the access mode. By default, PCILIB uses the first available access mode and does not display any debugging information. Each switch option lists a list of hardware/software that it supports. -P <dir> uses the linux 2.1 style configuration to directly access the <dir> directory rather than the/proc/bus/pci directory. (Only available in linux 2.1 or later versions)-H1 uses Intel architecture 1 for direct hardware access. (Only for i386 and compatible machines)-H2 uses Intel architecture 2 for direct hardware access. Warning: This mode can only address the first 16 devices on any bus and is quite unreliable in many cases. (For i386 and compatible machines only)-S uses the PCI system call for access. (It can only be used in Linux on Alpha and Ultra-iSCSI)-F <file> obtains relevant information from the file that is output by the lspci-x command. This is useful when analyzing error reports submitted by users, because you can display hardware configuration information in any way without disturbing users in order to obtain more information. (Available for all systems)-G increases the debugging level of the database. (Applicable to all systems)


Instance:
Instance 1: displays the current hardware configuration without any additional options.

# Lspci00: 00.0 Host bridge: Intel Corporation 3200/3210 Chipset DRAM Controller // motherboard chip. 0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02) 00: 1a. 0 USB Controller: Intel Corporation 82801I (ICH9 Family) usb uhci Controller #4 (rev 02) 00: 1a. 1 USB Controller: Intel Corporation 82801I (ICH9 Family) usb uhci Controller #5 (rev 02) 00: 1a. 2 USB Controller: Intel Corporation 82801I (ICH9 Family) usb uhci Controller #6 (rev 02) 00: 1a. 7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) // USB Controller 00: 1c. 0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) // interface slot 00: 1c. 4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 02) 00: 1d. 0 USB Controller: Intel Corporation 82801I (ICH9 Family) usb uhci Controller #1 (rev 02) 00: 1d. 1 USB Controller: Intel Corporation 82801I (ICH9 Family) usb uhci Controller #2 (rev 02) 00: 1d. 2 USB Controller: Intel Corporation 82801I (ICH9 Family) usb uhci Controller #3 (rev 02) 00: 1d. 7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) 00: 1e. 0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00: 1f. 0 ISA bridge: Intel Corporation 82801IR (ICH9R) LPC Interface Controller (rev 02) 00: 1f. 2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port sata ide Controller (rev 02) 00: 1f. 3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02) 00: 1f. 5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port sata ide Controller (rev 02. 0 VGA compatible controller: Matrox Graphics, Inc. MGA G200e [Pilot] ServerEngines (SEP1) (rev 02) // video card. 0 Ethernet controller: Intel Corporation 82541GI Gigabit Ethernet Controller (rev 05) // Nic


Instance 2: View general details

# lspci -v00:00.0 Host bridge: Intel Corporation 3200/3210 Chipset DRAM Controller        Subsystem: Intel Corporation Unknown device 34d0        Flags: bus master, fast devsel, latency 0        Capabilities: [e0] Vendor Specific Information00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)        Subsystem: Intel Corporation Unknown device 34d0        Flags: bus master, fast devsel, latency 0, IRQ 50        Memory at e1a00000 (32-bit, non-prefetchable) [size=128K]        Memory at e1a20000 (32-bit, non-prefetchable) [size=4K]        I/O ports at 20e0 [size=32]        Capabilities: [c8] Power Management version 2        Capabilities: [d0] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable+        Capabilities: [e0] #13 [0306]


Instance 3: View network card details

# Lspci-s :02. 0-vv // The end of-s is the bus, slots, and functions of each device. 0 Ethernet controller: Intel Corporation 82541GI Gigabit Ethernet Controller (rev 05) Subsystem: Intel Corporation Unknown device 34d0 Control: i/O + Mem + BusMaster + SpecCycle-MemWINV + VGASnoop-ParErr + Stepping-SERR + FastB2B-Status: cap + 66 MHz + UDF-FastB2B-ParErr-DEVSEL = medium> TAbort-<tabort-<mabort-> SERR-<perr-Latency: 32 (63750ns min ), cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 209 Region 0: Memory at e1920000 (32-bit, non-prefetchable) [size = 128 K] Region 1: memory at e1900000 (32-bit, non-prefetchable) [size = 128 K] Region 2: i/O ports at 1000 [size = 64] Expansion ROM at fffe0000 [disabled] [size = 128 K] Capabilities: [dc] Power Management version 2 Flags: PMEClk-DSI + D1-D2-AuxCurrent = 0mA PME (D0 +, D1-, D2-, D3hot +, D3cold +) Status: d0 PME-Enable-DSel = 0 DScale = 1 PME-Capabilities: [e4] PCI-X non-bridge device Command: DPERE-ERO + rb_= 512 OST = 1 Status: dev = 00:00. 0 64bit-133 MHz-SCD-USC-DC = simple DMMRBC = 2048 DMOST = 1 DMCRS = 8 RSCEM-266 MHz-533 MHz-


Appendix:
Appendix 1: to use all the functions of this command, you need to have Linux2.1.82 or a later version that supports the core of the/proc/bus/pci interface. In earlier versions of the core, the PCI tool must use direct hardware access that can only be performed by root, and there is always competition and other problems.
If you want to report the output of "lspci-vvx" in the PCI device driver or the bugs of the lspci itself.

Appendix 2: CentOS bash: lspci: command not found Solution
Most of them use/sbin/lspci, and I find that there is no/sbin in my system. If you use yum installlspci, this package is not displayed.

# Yum whatprovides */lspciLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.grandcloud.cn * extras: mirrors.163.com * updates: mirrors. grandcloud. cnbase/filelists | 3.6 MB 00: 16 extras/filelists_db | 241 kB 00: 00 updates/filelists_db | 2.4 MB 00: 19pciutils-3.1.7-5.el5.x86_64: PCI bus related utilities // pciutils-3.1.7-5.el5.x86_64Repo displayed here: baseMatched from: Filename:/sbin/lspcipciutils-3.1.7-3.el5.x86_64: PCI bus related utilities. repo: installedMatched from: Filename:/sbin/lspci

Therefore, you only need yum install pciutils.

Appendix 3. Files used by lspci
/Usr/share/hwdata/pci. ids: list of all known PCI ids (vendor, device name, class, subclass)
/Proc/bus/pci: the PCI bus configuration space interface provided by the core after linux 2.1.82. Contains sub-directories of each bus (per-bus) and configuration space files of each device card (per-card), as well as a devices file, containing a list of all PCI devices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.