]> mj.ucw.cz Git - pciutils.git/blobdiff - lspci.man
The `-P' option has been removed.
[pciutils.git] / lspci.man
index 7f44fd1a160651c70f94b284801017c394060549..e3b1c05ff90c975cd1f0da00ef1eb26a8a5899c6 100644 (file)
--- a/lspci.man
+++ b/lspci.man
@@ -57,6 +57,25 @@ PCI ID list.
 .B -nn
 Show PCI vendor and device codes as both numbers and names.
 .TP
+.B -q
+Use DNS to query the central PCI ID database if a device is not found in the local
+.B pci.ids
+file. If the DNS query succeeds, the result is cached in
+.B ~/.pciids-cache
+and it is recognized in subsequent runs even if
+.B -q
+is not given any more. Please use this switch inside automated scripts only
+with caution to avoid overloading the database servers.
+.TP
+.B -qq
+Same as
+.BR -q ,
+but the local cache is reset.
+.TP
+.B -Q
+Query the central database even for entries which are recognized locally.
+Use this if you suspect that the displayed entry is wrong.
+.TP
 .B -x
 Show hexadecimal dump of the standard part of the configuration space (the first
 64 bytes or 128 bytes for CardBus bridges).
@@ -73,6 +92,13 @@ devices are rare, so you needn't worry much.
 Show hexadecimal dump of the extended (4096-byte) PCI configuration space available
 on PCI-X 2.0 and PCI Express buses.
 .TP
+.B -k
+Show kernel drivers handling each device and also kernel modules capable of handling it.
+Turned on by default when
+.B -v
+is given in the normal mode of output.
+(Currently works only on Linux with kernel 2.6 or newer.)
+.TP
 .B -b
 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.
@@ -100,10 +126,21 @@ Use
 <file>
 as the PCI ID list instead of @IDSDIR@/pci.ids.
 .TP
+.B -p <file>
+Use
+.B
+<file>
+as the map of PCI ID's handled by kernel modules. By default, lspci uses
+.RI /lib/modules/ kernel_version /modules.pcimap.
+Applies only to Linux systems with recent enough module tools.
+.TP
 .B -m
-Dump PCI device data in machine readable form (both normal and verbose format supported)
-for easy parsing by scripts. Please don't use any other formats for this purpose, they
-are likely to change in the future versions of lspci.
+Dump PCI device data in a backward-compatible machine readable form.
+See below for details.
+.TP
+.B -mm
+Dump PCI device data in a machine readable form for easy parsing by scripts.
+See below for details.
 .TP
 .B -D
 Always show PCI domain numbers. By default, lspci suppresses them on machines which
@@ -117,7 +154,7 @@ the results are identical to normal listing modes, modulo bugs in lspci). Please
 that the bus mapper doesn't support PCI domains and scans only domain 0.
 .TP
 .B --version
-Shows 
+Shows
 .I lspci
 version. This option should be used stand-alone.
 
@@ -131,7 +168,8 @@ the following access methods:
 The
 .B /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.
+to all users, the rest only to root. Supports extended configuration space, PCI domains
+and information on attached kernel drivers.
 .TP
 .B linux_proc
 The
@@ -154,13 +192,18 @@ The
 .B /dev/pci
 device on FreeBSD. Requires root privileges.
 .TP
-.B aix_device
-Access method used on AIX. Requires root privileges.
+.B obsd_device
+The
+.B /dev/pci
+device on OpenBSD. Requires root privileges.
 .TP
 .B nbsd_libpci
 The
 .B /dev/pci0
 device on NetBSD accessed using the local libpci library.
+.TP
+.B aix_device
+Access method used on AIX. Requires root privileges.
 
 .P
 By default, PCILIB uses the first available access method and displays no debugging
@@ -187,6 +230,117 @@ requests for more dumps.
 .B -G
 Increase debug level of the library.
 
+.SH MACHINE READABLE OUTPUT
+If you intend to process the output of lspci automatically, please use one of the
+machine-readable output formats
+.RB ( -m ,
+.BR -vm ,
+.BR -vmm )
+described in this section. All other formats are likely to change
+between versions of lspci.
+
+.P
+All numbers are always printed in hexadecimal. If you want to process numeric ID's instead of
+names, please add the
+.B -n
+switch.
+
+.SS 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:
+
+.TP
+.BI -r rev
+Revision number.
+
+.TP
+.BI -p progif
+Programming interface.
+
+.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.
+
+.SS 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
+.RI ` tag :
+.IR value '
+pair. The
+.I tag
+and the
+.I 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.
+
+.P
+The following tags are defined:
+
+.TP
+.B Slot
+The name of the slot where the device resides
+.RI ([ domain :] bus : device . function ).
+This tag is always the first in a record.
+
+.TP
+.B Class
+Name of the class.
+
+.TP
+.B Vendor
+Name of the vendor.
+
+.TP
+.B Device
+Name of the device.
+
+.TP
+.B SVendor
+Name of the subsystem vendor (optional).
+
+.TP
+.B SDevice
+Name of the subsystem (optional).
+
+.TP
+.B Rev
+Revision number (optional).
+
+.TP
+.B ProgIf
+Programming interface (optional).
+
+.TP
+.B Driver
+Kernel driver currently handling the device (optional, Linux only).
+
+.TP
+.B Module
+Kernel module reporting that it is capable of handling the device
+(optional, Linux only).
+
+.P
+New tags can be added in future versions, so you should silently ignore any tags you don't recognize.
+
+.SS 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
+.B
+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.
+
 .SH FILES
 .TP
 .B @IDSDIR@/pci.ids
@@ -198,12 +352,28 @@ utility to download the most recent version.
 .B @IDSDIR@/pci.ids.gz
 If lspci is compiled with support for compression, this file is tried before pci.ids.
 .TP
+.B ~/.pciids-cache
+All ID's found in the DNS query mode are cached in this file.
+.TP
 .B /proc/bus/pci
 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
 .I devices
 file containing a list of all PCI devices.
 
+.SH BUGS
+
+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 <?>
+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
+.B linux_sysfs
+back-end.
+
 .SH SEE ALSO
 .BR setpci (8),
 .BR update-pciids (8)