SYNOPSIS
lspci [options]
DESCRIPTION
lspci is a utility for displaying information about all PCI buses in
the system and all 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, is
probably intelligible only to experienced PCI hackers. For the 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.
OPTIONS
-v Be verbose and display detailed information about all devices.
-vv Be very verbose and display more details. This level includes
everything deemed useful.
-vvv Be even more verbose and display everything we are able to
parse, even if it doesn't look interesting at all (e.g., unde-
fined memory regions).
-n Show PCI vendor and device codes as numbers instead of looking
them up in the PCI ID list.
-nn Show PCI vendor and device codes as both numbers and names.
-x Show hexadecimal dump of the standard part of the configuration
space (the first 64 bytes or 128 bytes for CardBus bridges).
-xxx Show hexadecimal dump of the whole PCI configuration space. It
is available only to root as several PCI devices crash when you
try to read some parts of the config space (this behavior proba-
bly doesn't violate the PCI standard, but it's at least very
stupid). However, such devices are rare, so you needn't worry
much.
(0 to 1f) and function (0 to 7). Each component of the device
address can be omitted or set to "*", both meaning "any value".
All numbers are hexadecimal. E.g., "0:" means all devices on
bus 0, "0" means all functions of device 0 on any bus, "0.3"
selects third function of device 0 on all buses and ".4" shows
only the fourth function of each device.
-d [<vendor>]:[<device>]
Show only devices with specified vendor and device ID. Both ID's
are given in hexadecimal and may be omitted or given as "*",
both meaning "any value".
-i <file>
Use <file> as the PCI ID list instead of
/usr/local/share/pci.ids.
-m Dump PCI device data in a backward-compatible machine readable
form. See below for details.
-mm Dump PCI device data in a machine readable form for easy parsing
by scripts. See below for details.
-D Always show PCI domain numbers. By default, lspci suppresses
them on machines which have only domain 0.
-M Invoke bus mapping mode which performs a thorough scan of all
PCI devices, including those behind misconfigured bridges etc.
This option is available only to root and it gives meaningful
results only if combined with direct hardware access mode (oth-
erwise the results are identical to normal listing modes, modulo
bugs in lspci). Please note that the bus mapper doesn't support
PCI domains and scans only domain 0.
--version
Shows lspci version. This option should be used stand-alone.
PCILIB AND ITS OPTIONS
The PCI utilities use PCILIB (a portable library providing platform-
independent functions for PCI configuration space access) to talk to
the PCI cards. It supports the following access methods:
linux_sysfs
The /sys filesystem on Linux 2.6 and newer. The standard header
of the config space is available to all users, the rest only to
root. Supports extended configuration space and PCI domains.
linux_proc
The /proc/bus/pci interface supported by Linux 2.1 and newer.
The standard header of the config space is available to all
users, the rest only to root.
The /dev/pci device on FreeBSD. Requires root privileges.
obsd_device
The /dev/pci device on OpenBSD. Requires root privileges.
nbsd_libpci
The /dev/pci0 device on NetBSD accessed using the local libpci
library.
aix_device
Access method used on AIX. Requires root privileges.
By default, PCILIB uses the first available access method and displays
no debugging messages, but you can use the following switches to con-
trol its behavior:
-P <dir>
Force use of the linux_proc access method, using <dir> instead
of /proc/bus/pci.
-H1 Use direct hardware access via Intel configuration mechanism 1.
-H2 Use direct hardware access via Intel configuration mechanism 2.
-F <file>
Extract all information from given file containing output of
lspci -x. This is very useful for analysis of user-supplied bug
reports, because you can display the hardware configuration in
any way you want without disturbing the user with requests for
more dumps.
-G Increase debug level of the library.
MACHINE READABLE OUTPUT
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
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 sepa-
rated 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:
Slot The name of the slot where the device resides
([domain:]bus:device.function). This tag is always the first in
a record.
Class Name of the class.
Vendor Name of the vendor.
Device Name of the device.
SVendor
Name of the subsystem vendor (optional).
SDevice
Name of the subsystem (optional).
Rev Revision number (optional).
ProgIf Programming interface (optional).
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 ver-
sions. 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
An interface to PCI bus configuration space provided by the
post-2.1.82 Linux kernels. Contains per-bus subdirectories with
per-card config space files and a devices file containing a list
of all PCI devices.
BUGS
Sometimes, lspci is not able to decode the configuration registers com-
pletely. This usually happens when not enough documentation was avail-
able 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.
SEE ALSO
setpci(8), update-pciids(8)
AUTHOR
The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
pciutils-2.2.8 19 October 2007 lspci(8)
Man(1) output converted with
man2html