548 lines
14 KiB
HTML
548 lines
14 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of lspci</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>lspci</H1>
|
|
Section: The PCI Utilities (8)<BR>Updated: 25 January 2020<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
lspci - list all PCI devices
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>lspci</B>
|
|
|
|
[<B>options</B>]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>lspci</B>
|
|
|
|
is a utility for displaying information about PCI buses in the system and
|
|
devices connected to them.
|
|
<P>
|
|
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.
|
|
<P>
|
|
If you are going to report bugs in PCI device drivers or in
|
|
<I>lspci</I>
|
|
|
|
itself, please include output of "lspci -vvx" or even better "lspci -vvxxx"
|
|
(however, see below for possible caveats).
|
|
<P>
|
|
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
|
|
<B>header.h</B>
|
|
|
|
and
|
|
<B>/usr/include/linux/pci.h</B>
|
|
|
|
include files.
|
|
<P>
|
|
Access to some parts of the PCI configuration space is restricted to root
|
|
on many operating systems, so the features of
|
|
<I>lspci</I>
|
|
|
|
available to normal users are limited. However,
|
|
<I>lspci</I>
|
|
|
|
tries its best to display as much as available and mark all other
|
|
information with
|
|
<I><access denied></I>
|
|
|
|
text.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Basic display modes</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-m</B>
|
|
|
|
<DD>
|
|
Dump PCI device data in a backward-compatible machine readable form.
|
|
See below for details.
|
|
<DT id="2"><B>-mm</B>
|
|
|
|
<DD>
|
|
Dump PCI device data in a machine readable form for easy parsing by scripts.
|
|
See below for details.
|
|
<DT id="3"><B>-t</B>
|
|
|
|
<DD>
|
|
Show a tree-like diagram containing all buses, bridges, devices and connections
|
|
between them.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Display options</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="4"><B>-v</B>
|
|
|
|
<DD>
|
|
Be verbose and display detailed information about all devices.
|
|
<DT id="5"><B>-vv</B>
|
|
|
|
<DD>
|
|
Be very verbose and display more details. This level includes everything deemed
|
|
useful.
|
|
<DT id="6"><B>-vvv</B>
|
|
|
|
<DD>
|
|
Be even more verbose and display everything we are able to parse,
|
|
even if it doesn't look interesting at all (e.g., undefined memory regions).
|
|
<DT id="7"><B>-k</B>
|
|
|
|
<DD>
|
|
Show kernel drivers handling each device and also kernel modules capable of handling it.
|
|
Turned on by default when
|
|
<B>-v</B>
|
|
|
|
is given in the normal mode of output.
|
|
(Currently works only on Linux with kernel 2.6 or newer.)
|
|
<DT id="8"><B>-x</B>
|
|
|
|
<DD>
|
|
Show hexadecimal dump of the standard part of the configuration space (the first
|
|
64 bytes or 128 bytes for CardBus bridges).
|
|
<DT id="9"><B>-xxx</B>
|
|
|
|
<DD>
|
|
Show hexadecimal dump of the whole PCI configuration space. It is available only to root
|
|
as several PCI devices
|
|
<B>crash</B>
|
|
|
|
when you try to read some parts of the config space (this behavior probably
|
|
doesn't violate the PCI standard, but it's at least very stupid). However, such
|
|
devices are rare, so you needn't worry much.
|
|
<DT id="10"><B>-xxxx</B>
|
|
|
|
<DD>
|
|
Show hexadecimal dump of the extended (4096-byte) PCI configuration space available
|
|
on PCI-X 2.0 and PCI Express buses.
|
|
<DT id="11"><B>-b</B>
|
|
|
|
<DD>
|
|
Bus-centric view. Show all IRQ numbers and addresses as seen by the cards on the
|
|
PCI bus instead of as seen by the kernel.
|
|
<DT id="12"><B>-D</B>
|
|
|
|
<DD>
|
|
Always show PCI domain numbers. By default, lspci suppresses them on machines which
|
|
have only domain 0.
|
|
<DT id="13"><B>-P</B>
|
|
|
|
<DD>
|
|
Identify PCI devices by path through each bridge, instead of by bus number.
|
|
<DT id="14"><B>-PP</B>
|
|
|
|
<DD>
|
|
Identify PCI devices by path through each bridge, showing the bus number as
|
|
well as the device number.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Options to control resolving ID's to names</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="15"><B>-n</B>
|
|
|
|
<DD>
|
|
Show PCI vendor and device codes as numbers instead of looking them up in the
|
|
PCI ID list.
|
|
<DT id="16"><B>-nn</B>
|
|
|
|
<DD>
|
|
Show PCI vendor and device codes as both numbers and names.
|
|
<DT id="17"><B>-q</B>
|
|
|
|
<DD>
|
|
Use DNS to query the central PCI ID database if a device is not found in the local
|
|
<B>pci.ids</B>
|
|
|
|
file. If the DNS query succeeds, the result is cached in
|
|
<B>~/.pciids-cache</B>
|
|
|
|
and it is recognized in subsequent runs even if
|
|
<B>-q</B>
|
|
|
|
is not given any more. Please use this switch inside automated scripts only
|
|
with caution to avoid overloading the database servers.
|
|
<DT id="18"><B>-qq</B>
|
|
|
|
<DD>
|
|
Same as
|
|
<B>-q</B>,
|
|
|
|
but the local cache is reset.
|
|
<DT id="19"><B>-Q</B>
|
|
|
|
<DD>
|
|
Query the central database even for entries which are recognized locally.
|
|
Use this if you suspect that the displayed entry is wrong.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H3>Options for selection of devices</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="20"><B>-s [[[[<domain>]:]<bus>]:][<device>][.[<func>]]</B>
|
|
|
|
<DD>
|
|
Show only devices in the specified domain (in case your machine has several host bridges,
|
|
they can either share a common bus number space or each of them can address a PCI domain
|
|
of its own; domains are numbered from 0 to ffff), bus (0 to ff), device (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.
|
|
<DT id="21"><B>-d [<vendor>]:[<device>][:<class>]</B>
|
|
|
|
<DD>
|
|
Show only devices with specified vendor, device and class ID. The ID's are
|
|
given in hexadecimal and may be omitted or given as "*", both meaning
|
|
"any value".
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>Other options</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="22"><B>-i <file></B>
|
|
|
|
<DD>
|
|
Use
|
|
<B><file></B>
|
|
|
|
as the PCI ID list instead of /usr/share/misc/pci.ids.
|
|
<DT id="23"><B>-p <file></B>
|
|
|
|
<DD>
|
|
Use
|
|
<B><file></B>
|
|
|
|
as the map of PCI ID's handled by kernel modules. By default, lspci uses
|
|
/lib/modules/<I>kernel_version</I>/modules.pcimap.
|
|
|
|
Applies only to Linux systems with recent enough module tools.
|
|
<DT id="24"><B>-M</B>
|
|
|
|
<DD>
|
|
Invoke bus mapping mode which performs a thorough scan of all PCI devices, including
|
|
those behind misconfigured bridges, etc. This option gives meaningful results only
|
|
with a direct hardware access mode, which usually requires root privileges.
|
|
Please note that the bus mapper only scans PCI domain 0.
|
|
<DT id="25"><B>--version</B>
|
|
|
|
<DD>
|
|
Shows
|
|
<I>lspci</I>
|
|
|
|
version. This option should be used stand-alone.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAK"> </A>
|
|
<H3>PCI access options</H3>
|
|
|
|
<P>
|
|
|
|
The PCI utilities use the PCI library to talk to PCI devices (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pcilib">pcilib</A></B>(7) for details). You can use the following options to
|
|
influence its behavior:
|
|
<DL COMPACT>
|
|
<DT id="26"><B>-A <method></B>
|
|
|
|
<DD>
|
|
The library supports a variety of methods to access the PCI hardware.
|
|
By default, it uses the first access method available, but you can use
|
|
this option to override this decision. See <B>-A help</B> for a list of
|
|
available methods and their descriptions.
|
|
<DT id="27"><B>-O <param>=<value></B>
|
|
|
|
<DD>
|
|
The behavior of the library is controlled by several named parameters.
|
|
This option allows one to set the value of any of the parameters. Use <B>-O help</B>
|
|
for a list of known parameters and their default values.
|
|
<DT id="28"><B>-H1</B>
|
|
|
|
<DD>
|
|
Use direct hardware access via Intel configuration mechanism 1.
|
|
(This is a shorthand for <B>-A intel-conf1</B>.)
|
|
<DT id="29"><B>-H2</B>
|
|
|
|
<DD>
|
|
Use direct hardware access via Intel configuration mechanism 2.
|
|
(This is a shorthand for <B>-A intel-conf2</B>.)
|
|
<DT id="30"><B>-F <file></B>
|
|
|
|
<DD>
|
|
Instead of accessing real hardware, read the list of devices and values of their
|
|
configuration registers from the given file produced by an earlier run 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.
|
|
<DT id="31"><B>-G</B>
|
|
|
|
<DD>
|
|
Increase debug level of the library.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAL"> </A>
|
|
<H2>MACHINE READABLE OUTPUT</H2>
|
|
|
|
If you intend to process the output of lspci automatically, please use one of the
|
|
machine-readable output formats
|
|
(<B>-m</B>,
|
|
|
|
<B>-vm</B>,
|
|
|
|
<B>-vmm</B>)
|
|
|
|
described in this section. All other formats are likely to change
|
|
between versions of lspci.
|
|
<P>
|
|
<P>
|
|
|
|
All numbers are always printed in hexadecimal. If you want to process numeric ID's instead of
|
|
names, please add the
|
|
<B>-n</B>
|
|
|
|
switch.
|
|
<P>
|
|
<A NAME="lbAM"> </A>
|
|
<H3>Simple format (-m)</H3>
|
|
|
|
<P>
|
|
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:
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="32"><B>-r</B><I>rev</I>
|
|
|
|
<DD>
|
|
Revision number.
|
|
<P>
|
|
<DT id="33"><B>-p</B><I>progif</I>
|
|
|
|
<DD>
|
|
Programming interface.
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
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.
|
|
<P>
|
|
<A NAME="lbAN"> </A>
|
|
<H3>Verbose format (-vmm)</H3>
|
|
|
|
<P>
|
|
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
|
|
`<I>tag</I>:
|
|
|
|
<I>value</I>'
|
|
|
|
pair. The
|
|
<I>tag</I>
|
|
|
|
and the
|
|
<I>value</I>
|
|
|
|
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.
|
|
<P>
|
|
<P>
|
|
|
|
The following tags are defined:
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="34"><B>Slot</B>
|
|
|
|
<DD>
|
|
The name of the slot where the device resides
|
|
([<I>domain</I>:]<I>bus</I>:<I>device</I>.<I>function</I>).
|
|
|
|
This tag is always the first in a record.
|
|
<P>
|
|
<DT id="35"><B>Class</B>
|
|
|
|
<DD>
|
|
Name of the class.
|
|
<P>
|
|
<DT id="36"><B>Vendor</B>
|
|
|
|
<DD>
|
|
Name of the vendor.
|
|
<P>
|
|
<DT id="37"><B>Device</B>
|
|
|
|
<DD>
|
|
Name of the device.
|
|
<P>
|
|
<DT id="38"><B>SVendor</B>
|
|
|
|
<DD>
|
|
Name of the subsystem vendor (optional).
|
|
<P>
|
|
<DT id="39"><B>SDevice</B>
|
|
|
|
<DD>
|
|
Name of the subsystem (optional).
|
|
<P>
|
|
<DT id="40"><B>PhySlot</B>
|
|
|
|
<DD>
|
|
The physical slot where the device resides (optional, Linux only).
|
|
<P>
|
|
<DT id="41"><B>Rev</B>
|
|
|
|
<DD>
|
|
Revision number (optional).
|
|
<P>
|
|
<DT id="42"><B>ProgIf</B>
|
|
|
|
<DD>
|
|
Programming interface (optional).
|
|
<P>
|
|
<DT id="43"><B>Driver</B>
|
|
|
|
<DD>
|
|
Kernel driver currently handling the device (optional, Linux only).
|
|
<P>
|
|
<DT id="44"><B>Module</B>
|
|
|
|
<DD>
|
|
Kernel module reporting that it is capable of handling the device
|
|
(optional, Linux only). Multiple lines with this tag can occur.
|
|
<P>
|
|
<DT id="45"><B>NUMANode</B>
|
|
|
|
<DD>
|
|
NUMA node this device is connected to (optional, Linux only).
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
New tags can be added in future versions, so you should silently ignore any tags you don't recognize.
|
|
<P>
|
|
<A NAME="lbAO"> </A>
|
|
<H3>Backward-compatible verbose format (-vm)</H3>
|
|
|
|
<P>
|
|
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
|
|
<B>Device</B>
|
|
|
|
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.
|
|
<P>
|
|
<A NAME="lbAP"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="46"><B>/usr/share/misc/pci.ids</B>
|
|
|
|
<DD>
|
|
A list of all known PCI ID's (vendors, devices, classes and subclasses). Maintained
|
|
at <A HREF="https://pci-ids.ucw.cz/,">https://pci-ids.ucw.cz/,</A> use the
|
|
<B>update-pciids</B>
|
|
|
|
utility to download the most recent version.
|
|
<DT id="47"><B>/usr/share/misc/pci.ids.gz</B>
|
|
|
|
<DD>
|
|
If lspci is compiled with support for compression, this file is tried before pci.ids.
|
|
<DT id="48"><B>~/.pciids-cache</B>
|
|
|
|
<DD>
|
|
All ID's found in the DNS query mode are cached in this file.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAQ"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
<P>
|
|
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
|
|
<B><?></B>
|
|
|
|
mark to signal that there is potentially something more to say. If you know
|
|
the details, patches will be of course welcome.
|
|
<P>
|
|
Access to the extended configuration space is currently supported only by the
|
|
<B>linux_sysfs</B>
|
|
|
|
back-end.
|
|
<P>
|
|
<A NAME="lbAR"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+setpci">setpci</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+pci.ids">pci.ids</A></B>(5),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+update-pciids">update-pciids</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pcilib">pcilib</A></B>(7)
|
|
|
|
<P>
|
|
<A NAME="lbAS"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
The PCI Utilities are maintained by Martin Mares <<A HREF="mailto:mj@ucw.cz">mj@ucw.cz</A>>.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="49"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="50"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="51"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="52"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DL>
|
|
<DT id="53"><A HREF="#lbAF">Basic display modes</A><DD>
|
|
<DT id="54"><A HREF="#lbAG">Display options</A><DD>
|
|
<DT id="55"><A HREF="#lbAH">Options to control resolving ID's to names</A><DD>
|
|
<DT id="56"><A HREF="#lbAI">Options for selection of devices</A><DD>
|
|
<DT id="57"><A HREF="#lbAJ">Other options</A><DD>
|
|
<DT id="58"><A HREF="#lbAK">PCI access options</A><DD>
|
|
</DL>
|
|
<DT id="59"><A HREF="#lbAL">MACHINE READABLE OUTPUT</A><DD>
|
|
<DL>
|
|
<DT id="60"><A HREF="#lbAM">Simple format (-m)</A><DD>
|
|
<DT id="61"><A HREF="#lbAN">Verbose format (-vmm)</A><DD>
|
|
<DT id="62"><A HREF="#lbAO">Backward-compatible verbose format (-vm)</A><DD>
|
|
</DL>
|
|
<DT id="63"><A HREF="#lbAP">FILES</A><DD>
|
|
<DT id="64"><A HREF="#lbAQ">BUGS</A><DD>
|
|
<DT id="65"><A HREF="#lbAR">SEE ALSO</A><DD>
|
|
<DT id="66"><A HREF="#lbAS">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:13 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|