lspci is a utility for displaying information about PCI buses in the system and devices connected to them.
By default, it shows a brief list of devices. Use the options described below to request either a more verbose output or output intended for parsing by other programs.
If you are going to report bugs in PCI device drivers or in lspci itself, please include output of "lspci -vvx" or even better "lspci -vvxxx" (however, see below for possible caveats).
Some parts of the output, especially in the highly verbose modes, are probably intelligible only to experienced PCI hackers. For exact definitions of the fields, please consult either the PCI specifications or the header.h and /usr/include/linux/pci.h include files.
Access to some parts of the PCI configuration space is restricted to root on many operating systems, so the features of lspci available to normal users are limited. However, lspci tries its best to display as much as available and mark all other information with <access denied> text.
If you intend to process the output of lspci automatically, please use one of the machine-readable output formats (-m, -vm, -vmm) described in this section. All other formats are likely to change between versions of lspci.
All numbers are always printed in hexadecimal. If you want to process numeric ID's instead of names, please add the -n switch.
Simple format (-m)
In the simple format, each device is described on a single line, which is formatted as parameters suitable for passing to a shell script, i.e., values separated by whitespaces, quoted and escaped if necessary. Some of the arguments are positional: slot, class, vendor name, device name, subsystem vendor name and subsystem name (the last two are empty if the device has no subsystem); the remaining arguments are option-like:
- Revision number.
- Programming interface.
The relative order of positional arguments and options is undefined. New options can be added in future versions, but they will always have a single argument not separated from the option by any spaces, so they can be easily ignored if not recognized.
Verbose format (-vmm)
The verbose output is a sequence of records separated by blank lines. Each record describes a single device by a sequence of lines, each line containing a single `tag: value' pair. The tag and the value are separated by a single tab character. Neither the records nor the lines within a record are in any particular order. Tags are case-sensitive.
The following tags are defined:
- The name of the slot where the device resides ([domain:]bus:device.function). This tag is always the first in a record.
- Name of the class.
- Name of the vendor.
- Name of the device.
- Name of the subsystem vendor (optional).
- Name of the subsystem (optional).
- The physical slot where the device resides (optional, Linux only).
- Revision number (optional).
- Programming interface (optional).
- Kernel driver currently handling the device (optional, Linux only).
- Kernel module reporting that it is capable of handling the device (optional, Linux only).
New tags can be added in future versions, so you should silently ignore any tags you don't recognize.
Backward-compatible verbose format (-vm)
In this mode, lspci tries to be perfectly compatible with its old versions. It's almost the same as the regular verbose format, but the Device tag is used for both the slot and the device name, so it occurs twice in a single record. Please avoid using this format in any new code.
Sometimes, lspci is not able to decode the configuration registers completely. This usually happens when not enough documentation was available to the authors. In such cases, it at least prints the <?> mark to signal that there is potentially something more to say. If you know the details, patches will be of course welcome.
Access to the extended configuration space is currently supported only by the linux_sysfs back-end.