comando LSPCI
Comandos para saber qual versão do Gnu/Linux instalado, versão do Kernel, tipo de hardware .
O comando lspci
Nesta pequena dica linux irei mostra uma introdução ao comando lspic do linux.
O lspci mostra as informações dos componentes de hardware conectados ao barramento pci e identificado pela sistema linux.
Esse é um comando útil que pode nos ajudar a identificar problemas ou modulos correspondente aos drivers, Possui varias opções no qual detalhamos algumas abaixo:
# lspci –help
lspci: invalid option — ‘-‘
Usage: lspci []
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 [[[[]:]]:][][.[]] Show only devices in selected slots
-d []:[] Show only devices with specified ID’s
Other options:
-i Use specified ID database instead of /usr/share/misc/pci.ids.gz
-p 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 Use the specified PCI access method (see `-A help’ for a list)
-O = Set PCI access parameter (see `-O help’ for a list)
-G Enable PCI access debugging
-H Use direct hardware access ( = 1 or 2)
-F Read PCI configuration dump from a given file
Exemplo de saida do lspci:
# lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)
00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Whistler [Radeon HD 6630M/6650M/6750M/7670M/7690M]
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
09:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
0b:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
Exemplo de saida do lspci usando -T mostrando em formato de arvore o Hardware:
# lspci -t
-[0000:00]-+-00.0
+-01.0-[01]—-00.0
+-02.0
+-16.0
+-1a.0
+-1b.0
+-1c.0-[03-04]–
+-1c.1-[05-06]—-00.0
+-1c.3-[09-0a]—-00.0
+-1c.4-[0b-0c]—-00.0
+-1c.7-[11-16]–
+-1d.0
+-1f.0
+-1f.2
-1f.3
Exemplo de saida do lspci usando -vv mostrando verbose do Hardware:
# lspci -vv
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
Subsystem: Dell Device 04b3
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- Latency: 0
Capabilities:
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Latency: 0, Cache Line Size: 64 bytes
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 0000e000-0000efff
Memory behind bridge: f7b00000-f7bfffff
Prefetchable memory behind bridge: 00000000e0000000-00000000efffffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities:
Kernel driver in use: pcieport
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: Dell Device 04cd
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- Latency: 0
Interrupt: pin A routed to IRQ 50
Region 0: Memory at f6400000 (64-bit, non-prefetchable) [size=4M]
Region 2: Memory at d0000000 (64-bit, prefetchable) [size=256M]
Region 4: I/O ports at f000 [size=64]
Expansion ROM at [disabled]
Capabilities:
Kernel driver in use: i915