LSPCI
Lspci is a command-line utility in Linux and Unix operating systems that is used to display information about all the PCI (Peripheral Component Interconnect) buses and devices connected to the system. It provides detailed information about the hardware components, including their vendor and device IDs, subsystems, and other attributes. The lspci command is often used for diagnosing hardware-related issues and identifying the specific hardware components installed in a system.
How to use LSPCI
Here is an example of using the lspci command in a Linux terminal:
1 2 3 4 5 6 7 8 | |
This output shows information about various hardware components in the system, including the vendor and device IDs, the device type, and the revision number.
Show details about devices
To show detailed information about a specific device using lspci, you can specify the device’s bus address using the lspci -s option.
1 2 3 4 5 6 7 8 9 10 11 | |
This output shows detailed information about the VGA compatible controller, including its subsystem, memory addresses, I/O ports, and kernel driver.
Verbose output of lspci
The -v (verbose) and -vv (very verbose) parameters in lspci are used to increase the level of detail in the output.
• The -v option provides additional information about the devices, including the vendor and device IDs, subsystem IDs, and more.
• The -vv option provides even more detailed information, including the device’s capabilities, IRQ settings, and ASPM (Active State Power Management) settings.
For example, to show the ASPM settings for the PCI Express device with bus address 00:1c.0, you can run the following command:
1 2 | |
Most useful commands
| Command | Description |
|---|---|
lspci |
List all PCI devices in the system. |
lspci -v |
List all PCI devices in the system with verbose output, including vendor and device IDs, subsystem IDs, and more. |
lspci -vv |
List all PCI devices in the system with very verbose output, including device capabilities, IRQ settings, and ASPM (Active State Power Management) settings. |
lspci -s <bus_address> |
Display information for a specific PCI device with the specified bus address. |
lspci -k |
Show kernel driver in use for each device. |
lspci -n |
Show numeric IDs for vendor and device instead of names. |
lspci -nn |
Show numeric IDs for vendor, device, subsystem vendor, and subsystem device instead of names. |
lspci -t |
Display a tree-like diagram of the PCI bus hierarchy. |
lspci -D |
Show only PCI devices that are not behind a bridge. |
lspci -H1 |
Show device numbers in hexadecimal format instead of decimal. |
lspci -x |
Show hex dump of the PCI configuration space for each device. |