1lspci(8)                       The PCI Utilities                      lspci(8)
2
3
4

NAME

6       lspci - list all PCI devices
7

SYNOPSIS

9       lspci [options]
10

DESCRIPTION

12       lspci  is  a  utility for displaying information about PCI buses in the
13       system and devices connected to them.
14
15       By default, it shows a brief list of devices. Use the options described
16       below  to  request  either a more verbose output or output intended for
17       parsing by other programs.
18
19       If you are going to report bugs in  PCI  device  drivers  or  in  lspci
20       itself,  please  include  output  of "lspci -vvx" or even better "lspci
21       -vvxxx" (however, see below for possible caveats).
22
23       Some parts of the output, especially in the highly verbose  modes,  are
24       probably  intelligible only to experienced PCI hackers. For exact defi‐
25       nitions of the fields, please consult either the PCI specifications  or
26       the header.h and /usr/include/linux/pci.h include files.
27
28       Access  to  some  parts of the PCI configuration space is restricted to
29       root on many operating systems, so the features of lspci  available  to
30       normal  users  are limited. However, lspci tries its best to display as
31       much as available and mark all other information with  <access  denied>
32       text.
33
34

OPTIONS

36   Basic display modes
37       -m     Dump  PCI  device data in a backward-compatible machine readable
38              form.  See below for details.
39
40       -mm    Dump PCI device data in a machine readable form for easy parsing
41              by scripts.  See below for details.
42
43       -t     Show  a tree-like diagram containing all buses, bridges, devices
44              and connections between them.
45
46
47   Display options
48       -v     Be verbose and display detailed information about all devices.
49
50       -vv    Be very verbose and display more details.  This  level  includes
51              everything deemed useful.
52
53       -vvv   Be  even  more  verbose  and  display  everything we are able to
54              parse, even if it doesn't look interesting at all  (e.g.,  unde‐
55              fined memory regions).
56
57       -k     Show kernel drivers handling each device and also kernel modules
58              capable of handling it.  Turned on by default when -v  is  given
59              in  the  normal  mode of output.  (Currently works only on Linux
60              with kernel 2.6 or newer.)
61
62       -x     Show hexadecimal dump of the standard part of the  configuration
63              space (the first 64 bytes or 128 bytes for CardBus bridges).
64
65       -xxx   Show  hexadecimal  dump of the whole PCI configuration space. It
66              is available only to root as several PCI devices crash when  you
67              try to read some parts of the config space (this behavior proba‐
68              bly doesn't violate the PCI standard, but  it's  at  least  very
69              stupid).  However,  such  devices are rare, so you needn't worry
70              much.
71
72       -xxxx  Show hexadecimal dump of the extended (4096-byte) PCI configura‐
73              tion space available on PCI-X 2.0 and PCI Express buses.
74
75       -b     Bus-centric  view. Show all IRQ numbers and addresses as seen by
76              the cards on the PCI bus instead of as seen by the kernel.
77
78       -D     Always show PCI domain numbers.  By  default,  lspci  suppresses
79              them on machines which have only domain 0.
80
81       -P     Identify  PCI devices by path through each bridge, instead of by
82              bus number.
83
84       -PP    Identify PCI devices by path through each  bridge,  showing  the
85              bus number as well as the device number.
86
87
88   Options to control resolving ID's to names
89       -n     Show  PCI  vendor and device codes as numbers instead of looking
90              them up in the PCI ID list.
91
92       -nn    Show PCI vendor and device codes as both numbers and names.
93
94       -q     Use DNS to query the central PCI ID database if a device is  not
95              found  in the local pci.ids file. If the DNS query succeeds, the
96              result is cached in ~/.pciids-cache and it is recognized in sub‐
97              sequent  runs  even if -q is not given any more. Please use this
98              switch inside automated scripts only with caution to avoid over‐
99              loading the database servers.
100
101       -qq    Same as -q, but the local cache is reset.
102
103       -Q     Query the central database even for entries which are recognized
104              locally.  Use this if you suspect that the  displayed  entry  is
105              wrong.
106
107
108   Options for selection of devices
109       -s [[[[<domain>]:]<bus>]:][<device>][.[<func>]]
110              Show  only devices in the specified domain (in case your machine
111              has several host bridges, they can either  share  a  common  bus
112              number  space  or  each  of them can address a PCI domain of its
113              own; domains are numbered from 0 to ffff), bus (0 to ff), device
114              (0  to  1f) and function (0 to 7).  Each component of the device
115              address can be omitted or set to "*", both meaning "any  value".
116              All  numbers  are  hexadecimal.  E.g., "0:" means all devices on
117              bus 0, "0" means all functions of device 0  on  any  bus,  "0.3"
118              selects  third  function of device 0 on all buses and ".4" shows
119              only the fourth function of each device.
120
121       -d [<vendor>]:[<device>][:<class>]
122              Show only devices with specified vendor, device  and  class  ID.
123              The ID's are given in hexadecimal and may be omitted or given as
124              "*", both meaning "any value".
125
126
127   Other options
128       -i <file>
129              Use    <file>    as    the    PCI    ID    list    instead    of
130              /usr/share/hwdata/pci.ids.
131
132       -p <file>
133              Use  <file> as the map of PCI ID's handled by kernel modules. By
134              default, lspci uses  /lib/modules/kernel_version/modules.pcimap.
135              Applies only to Linux systems with recent enough module tools.
136
137       -M     Invoke  bus  mapping  mode which performs a thorough scan of all
138              PCI devices, including those behind misconfigured bridges,  etc.
139              This option gives meaningful results only with a direct hardware
140              access mode, which usually  requires  root  privileges.   Please
141              note that the bus mapper only scans PCI domain 0.
142
143       --version
144              Shows lspci version. This option should be used stand-alone.
145
146
147   PCI access options
148       The  PCI  utilities  use  the  PCI  library to talk to PCI devices (see
149       pcilib(7) for details). You can use the following options to  influence
150       its behavior:
151
152       -A <method>
153              The  library  supports  a  variety  of methods to access the PCI
154              hardware.  By default, it uses the first  access  method  avail‐
155              able, but you can use this option to override this decision. See
156              -A help for a list of available methods and their descriptions.
157
158       -O <param>=<value>
159              The behavior of the  library  is  controlled  by  several  named
160              parameters.   This  option allows to set the value of any of the
161              parameters. Use -O help for a list of known parameters and their
162              default values.
163
164       -H1    Use  direct hardware access via Intel configuration mechanism 1.
165              (This is a shorthand for -A intel-conf1.)
166
167       -H2    Use direct hardware access via Intel configuration mechanism  2.
168              (This is a shorthand for -A intel-conf2.)
169
170       -F <file>
171              Instead of accessing real hardware, read the list of devices and
172              values of their configuration registers from the given file pro‐
173              duced  by  an  earlier run of lspci -x.  This is very useful for
174              analysis of user-supplied bug reports, because you  can  display
175              the  hardware configuration in any way you want without disturb‐
176              ing the user with requests for more dumps.
177
178       -G     Increase debug level of the library.
179
180

MACHINE READABLE OUTPUT

182       If you intend to process the output of lspci automatically, please  use
183       one of the machine-readable output formats (-m, -vm, -vmm) described in
184       this section. All other formats are likely to change  between  versions
185       of lspci.
186
187
188       All  numbers  are always printed in hexadecimal. If you want to process
189       numeric ID's instead of names, please add the -n switch.
190
191
192   Simple format (-m)
193       In the simple format, each device is described on a single line,  which
194       is  formatted  as  parameters  suitable  for passing to a shell script,
195       i.e., values separated by whitespaces, quoted and escaped if necessary.
196       Some  of the arguments are positional: slot, class, vendor name, device
197       name, subsystem vendor name and subsystem name (the last two are  empty
198       if  the  device  has no subsystem); the remaining arguments are option-
199       like:
200
201
202       -rrev  Revision number.
203
204
205       -pprogif
206              Programming interface.
207
208
209       The relative order of positional arguments and  options  is  undefined.
210       New  options can be added in future versions, but they will always have
211       a single argument not separated from the option by any spaces, so  they
212       can be easily ignored if not recognized.
213
214
215   Verbose format (-vmm)
216       The  verbose  output is a sequence of records separated by blank lines.
217       Each record describes a single device by a sequence of lines, each line
218       containing  a single `tag: value' pair. The tag and the value are sepa‐
219       rated by a single tab character.  Neither the  records  nor  the  lines
220       within a record are in any particular order.  Tags are case-sensitive.
221
222
223       The following tags are defined:
224
225
226       Slot   The    name    of    the   slot   where   the   device   resides
227              ([domain:]bus:device.function).  This tag is always the first in
228              a record.
229
230
231       Class  Name of the class.
232
233
234       Vendor Name of the vendor.
235
236
237       Device Name of the device.
238
239
240       SVendor
241              Name of the subsystem vendor (optional).
242
243
244       SDevice
245              Name of the subsystem (optional).
246
247
248       PhySlot
249              The  physical  slot  where  the  device resides (optional, Linux
250              only).
251
252
253       Rev    Revision number (optional).
254
255
256       ProgIf Programming interface (optional).
257
258
259       Driver Kernel driver currently handling  the  device  (optional,  Linux
260              only).
261
262
263       Module Kernel  module  reporting  that  it  is  capable of handling the
264              device (optional, Linux only).
265
266
267       NUMANode
268              NUMA node this device is connected to (optional, Linux only).
269
270
271       New tags can be added in future versions, so you should silently ignore
272       any tags you don't recognize.
273
274
275   Backward-compatible verbose format (-vm)
276       In  this mode, lspci tries to be perfectly compatible with its old ver‐
277       sions.  It's almost the same as the regular  verbose  format,  but  the
278       Device  tag is used for both the slot and the device name, so it occurs
279       twice in a single record. Please avoid using this  format  in  any  new
280       code.
281
282

FILES

284       /usr/share/hwdata/pci.ids
285              A list of all known PCI ID's (vendors, devices, classes and sub‐
286              classes). Maintained at http://pci-ids.ucw.cz/, use the  update-
287              pciids utility to download the most recent version.
288
289       /usr/share/hwdata/pci.ids.gz
290              If  lspci is compiled with support for compression, this file is
291              tried before pci.ids.
292
293       ~/.pciids-cache
294              All ID's found in the DNS query mode are cached in this file.
295
296

BUGS

298       Sometimes, lspci is not able to decode the configuration registers com‐
299       pletely.  This usually happens when not enough documentation was avail‐
300       able to the authors.  In such cases, it at least prints the <?> mark to
301       signal that there is potentially something more to say. If you know the
302       details, patches will be of course welcome.
303
304       Access to the extended configuration space is currently supported  only
305       by the linux_sysfs back-end.
306
307

SEE ALSO

309       setpci(8), update-pciids(8), pcilib(7)
310
311

AUTHOR

313       The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
314
315
316
317pciutils-3.6.2                  12 August 2018                        lspci(8)
Impressum