lspci:显示所有的PCI总线设备信息。
下面试lspci的全部功能介绍:
- $ lspci -
- Usage: lspci [<switches>]
- Basic display modes:
- -mm Produce machine-readable output (single -m for an obsolete format)
-
- -t Show bus tree
-
- Display options:
- -v Be verbose (-vv for very verbose)
-
- -k Show kernel drivers handling each device
-
- -x Show hex-dump of the standard part of the config space
-
- -xxx Show hex-dump of the whole config space (dangerous; root only)
-
- -xxxx Show hex-dump of the 4096-byte extended config space (root only)
-
- -b Bus-centric view (addresses and IRQ's as seen by the bus)
-
- -D Always show domain numbers
-
- Resolving of device ID's to names:
- -n Show numeric ID's
- -nn Show both textual and numeric ID's (names & numbers)
-
- -q Query the PCI ID database for unknown ID's via DNS
-
- -qq As above, but re-query locally cached entries
-
- -Q Query the PCI ID database for all ID's via DNS
-
- Selection of devices:
- -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]] Show only devices in selected slots
-
- -d [<vendor>]:[<device>][:<class>] Show only devices with specified ID's
-
- Other options:
- -i <file> Use specified ID database instead of /usr/share/hwdata/pci.ids
-
- -p <file> Look up kernel modules in a given file instead of default modules.pcimap
-
- -M Enable `bus mapping' mode (dangerous; root only)
-
- PCI access options:
- -A <method> Use the specified PCI access method (see `-A help' for a list)
-
- -O <par>=<val> Set PCI access parameter (see `-O help' for a list)
-
- -G Enable PCI access debugging
-
- -H <mode> Use direct hardware access (<mode> = 1 or 2)
-
- -F <file> Read PCI configuration dump from a given file
-
简单的几个例子:(grep指令:https://blog.csdn.net/rong_toa/article/details/79799127)
- $ lspci | grep -i vga
- 00:0f.0 VGA compatible controller: VMware SVGA II Adapter
- $ lspci -s 00:0f.0
- 00:0f.0 VGA compatible controller: VMware SVGA II Adapter
- $ lspci -mm -s 00:0f.0
- 00:0f.0 "VGA compatible controller" "VMware" "SVGA II Adapter" "VMware" "SVGA II Adapter"
- $ lspci -Q -s 00:0f.0
- 00:0f.0 VGA compatible controller: VMware SVGA II Adapter
- $ lspci -D -s 00:0f.0
- 0000:00:0f.0 VGA compatible controller: VMware SVGA II Adapter
查看详细信息:
- $ lspci -v -s 00:0f.0
- 00:0f.0 VGA compatible controller: VMware SVGA II Adapter (prog-if 00 [VGA controller])
- Subsystem: VMware SVGA II Adapter
- Flags: bus master, medium devsel, latency 64, IRQ 16
- I/O ports at 1070 [size=16]
- Memory at e8000000 (32-bit, prefetchable) [size=128M]
- Memory at fe000000 (32-bit, non-prefetchable) [size=8M]
- [virtual] Expansion ROM at c0000000 [disabled] [size=32K]
- Capabilities: <access denied>
- Kernel driver in use: vmwgfx
- Kernel modules: vmwgfx