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
82   Options to control resolving ID's to names
83       -n     Show  PCI  vendor and device codes as numbers instead of looking
84              them up in the PCI ID list.
85
86       -nn    Show PCI vendor and device codes as both numbers and names.
87
88       -q     Use DNS to query the central PCI ID database if a device is  not
89              found  in the local pci.ids file. If the DNS query succeeds, the
90              result is cached in ~/.pciids-cache and it is recognized in sub‐
91              sequent  runs  even if -q is not given any more. Please use this
92              switch inside automated scripts only with caution to avoid over‐
93              loading the database servers.
94
95       -qq    Same as -q, but the local cache is reset.
96
97       -Q     Query the central database even for entries which are recognized
98              locally.  Use this if you suspect that the  displayed  entry  is
99              wrong.
100
101
102   Options for selection of devices
103       -s [[[[<domain>]:]<bus>]:][<device>][.[<func>]]
104              Show  only devices in the specified domain (in case your machine
105              has several host bridges, they can either  share  a  common  bus
106              number  space  or  each  of them can address a PCI domain of its
107              own; domains are numbered from 0 to ffff), bus (0 to ff), device
108              (0  to  1f) and function (0 to 7).  Each component of the device
109              address can be omitted or set to "*", both meaning "any  value".
110              All  numbers  are  hexadecimal.  E.g., "0:" means all devices on
111              bus 0, "0" means all functions of device 0  on  any  bus,  "0.3"
112              selects  third  function of device 0 on all buses and ".4" shows
113              only the fourth function of each device.
114
115       -d [<vendor>]:[<device>][:<class>]
116              Show only devices with specified vendor, device  and  class  ID.
117              The ID's are given in hexadecimal and may be omitted or given as
118              "*", both meaning "any value".
119
120
121   Other options
122       -i <file>
123              Use    <file>    as    the    PCI    ID    list    instead    of
124              /usr/share/hwdata/pci.ids.
125
126       -p <file>
127              Use  <file> as the map of PCI ID's handled by kernel modules. By
128              default, lspci uses  /lib/modules/kernel_version/modules.pcimap.
129              Applies only to Linux systems with recent enough module tools.
130
131       -M     Invoke  bus  mapping  mode which performs a thorough scan of all
132              PCI devices, including those behind misconfigured bridges,  etc.
133              This option gives meaningful results only with a direct hardware
134              access mode, which usually  requires  root  privileges.   Please
135              note that the bus mapper only scans PCI domain 0.
136
137       --version
138              Shows lspci version. This option should be used stand-alone.
139
140
141   PCI access options
142       The  PCI  utilities  use  the  PCI  library to talk to PCI devices (see
143       pcilib(7) for details). You can use the following options to  influence
144       its behavior:
145
146       -A <method>
147              The  library  supports  a  variety  of methods to access the PCI
148              hardware.  By default, it uses the first  access  method  avail‐
149              able, but you can use this option to override this decision. See
150              -A help for a list of available methods and their descriptions.
151
152       -O <param>=<value>
153              The behavior of the  library  is  controlled  by  several  named
154              parameters.   This  option allows to set the value of any of the
155              parameters. Use -O help for a list of known parameters and their
156              default values.
157
158       -H1    Use  direct hardware access via Intel configuration mechanism 1.
159              (This is a shorthand for -A intel-conf1.)
160
161       -H2    Use direct hardware access via Intel configuration mechanism  2.
162              (This is a shorthand for -A intel-conf2.)
163
164       -F <file>
165              Instead of accessing real hardware, read the list of devices and
166              values of their configuration registers from the given file pro‐
167              duced  by  an  earlier run of lspci -x.  This is very useful for
168              analysis of user-supplied bug reports, because you  can  display
169              the  hardware configuration in any way you want without disturb‐
170              ing the user with requests for more dumps.
171
172       -G     Increase debug level of the library.
173
174

MACHINE READABLE OUTPUT

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

FILES

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

BUGS

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

SEE ALSO

303       setpci(8), update-pciids(8), pcilib(7)
304
305

AUTHOR

307       The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
308
309
310
311pciutils-3.5.6                 17 November 2017                       lspci(8)
Impressum