Molto spesso è necessario conoscere quali componenti hardware sono connessi alla nostra macchina Linux e non sempre può essere disponibile una App che dal Desktop ci mostri tutto ciò che vogliamo conoscere riguardo ai dispositivi collegati al nostro computer. Per questa ragione alcune volte potremmo avere la necessità di ricorrere alla riga di comando. Ma niente paura; sarà facile come bere un bicchiere d’acqua.
In questa breve guida ho quindi voluto mettere insieme alcuni utili comandi da terminale; quei comandi più comunemente usati, che ci possono mostrare tutti i dettagli più profondi del sistema sul quale vogliamo indagare. Tutti i comandi che vedremo più oltre in questa mini guida, si applicano non solo al nostro PC o al nostro Laptop, ma possono essere utilizzati anche su Server molto complessi, a patto che GNU Linux sia il sistema operativo in esecuzione.
Anche se gran parte di questi comandi possono sembrare un po’ ostici, in realtà ci regalano una grande quantità di informazioni di macchina molto preziose. La corretta interpretazione del risultato che questi comandi ci restituiscono sarà molto utile per una migliore comprensione dell’hardware connesso al nostro sistema.
Prima di iniziare ad esplorare i comandi per l’indagine dell’hardware, credo sia utile definire meglio il contesto ed i prerequisiti.
- Alcuni comandi potrebbero non funzionare semplicemente perché non sono stati installati i pacchetti software necessari. In questo caso andranno installati secondo quanto previsto per la tu distribuzione GNU Linux:
$ sudo apt-get installper le distribuzioni Debian e derivate;$ sudo yum installper le distribuzioni Red Hat e derivate. - I comandi di indagine dell’hardware solitamente necessitano dei privilegi di amministratore (root), quindi è meglio eseguire i comandi preceduti da “sudo”; in questo modo verranno eseguiti con i giusti privilegi di amministratore. In alternativa, si può “diventare” amministratore con i comandi
$ sudo -i, oppure$ su -(entrambi seguiti dalla password di root). - Per amor di sintesi, ho preferito non dilungarmi troppo nella descrizione dei comandi usati più oltre e delle opzioni per ogni singolo comando. Lascio al lettore la scelta di leggere le relative man pages (pagine del manuale) della distribuzione GNU Linux in uso.
Una semplice ma completa lista dell’hardware
Una lista dell’hardware connesso al sistema si può ottenere in diversi modi in una macchina Linux; molto dipende da cosa stiamo cercando e dai dettagli che vogliamo ottenere dei dispositivi trovati.
Ma andiamo con ordine e vediamo quali sono i comandi per esplorare l’hardware del sistema nelle varie aree.
Tutto l’Hardware con ‘lshw’
Il comando più semplice che generalmente viene utilizzato per esplorare i dispositivi interni del nostro sistema GNU Linux è lshw. Questo comando esplora quanto contenuto nei file della directory, la quale è gestita interamente dal sistema operativo. Il risultato di questo comando ritorna l’elenco dei dispositivi così come sono visti dal sistema. In questo esempio ho utilizzato il parametro ‘-short’ per avere una sintesi dei dispositivi; in alternativa il comando ritorna il dettaglio per ogni singolo dispositivo.
# lshw -short
H/W path Device Class Description
system 80FG (LENOVO_MT_80FG ...)
/0 bus Lenovo Z00
/0/0 memory 128KiB BIOS
/0/4 processor Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
/0/4/6 memory 32KiB L1 cache
/0/4/7 memory 256KiB L2 cache
/0/4/8 memory 4MiB L3 cache
/0/5 memory 32KiB L1 cache
/0/25 memory 16GiB System Memory
/0/25/0 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/25/1 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/100 bridge Broadwell-U Host Bridge -OPI
/0/100/2 display HD Graphics 5500
/0/100/3 multimedia Broadwell-U Audio Controller
/0/100/14 bus Wildcat Point-LP USB xHCI Controller
/0/100/14/0 usb2 bus xHCI Host Controller
/0/100/14/0/1 input Microsoft Nano Transceiver 1.1
/0/100/14/0/4 generic USB2.0-CRW
/0/100/14/0/6 multimedia Lenovo EasyCamera
/0/100/14/0/7 generic BCM43142A0
/0/100/14/1 usb3 bus xHCI Host Controller
/0/100/16 communication Wildcat Point-LP MEI Controller #1
/0/100/1b multimedia Wildcat Point-LP High Definition Audio Controller
/0/100/1c bridge Wildcat Point-LP PCI Express Root Port #1
/0/100/1c.2 bridge Wildcat Point-LP PCI Express Root Port #3
/0/100/1c.2/0 enp2s0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
/0/100/1c.3 bridge Wildcat Point-LP PCI Express Root Port #4
/0/100/1c.3/0 wlp3s0 network BCM43142 802.11b/g/n
/0/100/1c.4 bridge Wildcat Point-LP PCI Express Root Port #5
/0/100/1c.4/0 display GM108M [GeForce 840M]
/0/100/1d bus Wildcat Point-LP USB EHCI Controller
/0/100/1d/1 usb1 bus EHCI Host Controller
/0/100/1d/1/1 bus USB hub
/0/100/1f bridge Wildcat Point-LP LPC Controller
/0/100/1f.2 scsi0 storage Wildcat Point-LP SATA Controller [AHCI Mode]
/0/100/1f.2/0 /dev/sda disk 1TB ST1000LM024 HN-M
/0/100/1f.2/0/1 /dev/sda1 volume 999MiB Windows NTFS volume
/0/100/1f.2/0/2 /dev/sda2 volume 259MiB Windows FAT volume
/0/100/1f.2/0/3 /dev/sda3 volume 999MiB Windows FAT volume
/0/100/1f.2/0/4 /dev/sda4 volume 127MiB reserved partition
/0/100/1f.2/0/5 /dev/sda5 volume 889GiB Windows NTFS volume
/0/100/1f.2/0/6 /dev/sda6 volume 24GiB Windows NTFS volume
/0/100/1f.2/0/7 /dev/sda7 volume 14GiB Windows NTFS volume
/0/100/1f.2/1 /dev/sdb disk 250GB Samsung SSD 750
/0/100/1f.2/1/1 /dev/sdb1 volume 500MiB EXT4 volume
/0/100/1f.2/1/2 /dev/sdb2 volume 232GiB Linux LVM Physical Volume partition
/0/100/1f.3 bus Wildcat Point-LP SMBus Controller
/0/1 system PnP device PNP0c02
/0/2 system PnP device PNP0b00
/0/3 generic PnP device INT3f0d
/0/6 input PnP device PNP0303
/0/7 generic PnP device SYN2b37
/0/8 system PnP device PNP0c02
/1 power CRB Battery 0
/2 power OEM Define 5
/3 virbr4-nic network Ethernet interface
/4 virbr0 network Ethernet interface
/5 virbr0-nic network Ethernet interface
/6 virbr5 network Ethernet interface
/7 virbr1 network Ethernet interface
/8 virbr1-nic network Ethernet interface
/9 virbr4 network Ethernet interface
/a virbr5-nic network Ethernet interface
L’hardware diviso per categorie con ‘hwinfo’
Un altro utilissimo comando di utilizzo generico, che mostra una lista completa dell’hardware è hwinfo. Esso mostra una sintesi delle informazioni dell’hardware collegato in modo molto simile al comando precedente, ma con qualche diverso dettaglio di informazione.
Quello che segue è un esempio del risultato del comando hwinfo --short; il quale, sempre per brevità, riporta solo una sintesi. Notare che il parametro del comando precedente aveva come argomento ‘-short’ (con un solo trattino); mentre in questo caso il comando viene utilizzato con l’argomento ‘–short’ (con 2 trattini).
# hwinfo --short
cpu:
Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2146 MHz
Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 1950 MHz
Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2221 MHz
Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2392 MHz
keyboard:
/dev/input/event4 Microsoft Nano Transceiver 1.1
/dev/input/event3 AT Translated Set 2 keyboard
mouse:
/dev/input/mice Microsoft Nano Transceiver 1.1
/dev/input/mice SynPS/2 Synaptics TouchPad
monitor:
LG Display LCD Monitor
graphics card:
nVidia GM108M [GeForce 840M]
Intel HD Graphics 5500
sound:
Intel Wildcat Point-LP High Definition Audio Controller
Intel Broadwell-U Audio Controller
storage:
Intel Wildcat Point-LP SATA Controller [AHCI Mode]
network:
wlp3s0 Broadcom BCM43142 802.11b/g/n
enp2s0 Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller network interface:
virbr1-nic Ethernet network interface
wlp3s0 Ethernet network interface
virbr5-nic Ethernet network interface
virbr5 Ethernet network interface
virbr1 Ethernet network interface
lo Loopback network interface
enp2s0 Ethernet network interface
virbr4 Ethernet network interface
virbr0-nic Ethernet network interface
virbr4-nic Ethernet network interface
virbr0 Ethernet network interface
disk:
/dev/sdb Samsung SSD 750
/dev/sda ST1000LM024 HN-M
partition:
/dev/sdb1 Partition
/dev/sdb2 Partition
/dev/sda1 Partition
/dev/sda2 Partition
/dev/sda3 Partition
/dev/sda4 Partition
/dev/sda5 Partition
/dev/sda6 Partition
/dev/sda7 Partition
usb controller:
Intel Wildcat Point-LP USB EHCI Controller
Intel Wildcat Point-LP USB xHCI Controller
bios:
BIOS
bridge:
Intel Wildcat Point-LP PCI Express Root Port #1
Intel Wildcat Point-LP LPC Controller
Intel Wildcat Point-LP PCI Express Root Port #4
Intel Broadwell-U Host Bridge -OPI
Intel Wildcat Point-LP PCI Express Root Port #5
Intel Wildcat Point-LP PCI Express Root Port #3
hub:
Linux Foundation 3.0 root hub
Linux Foundation 2.0 root hub
Intel Hub
Linux Foundation 2.0 root hub
memory:
Main Memory
unknown:
FPU
DMA controller
PIC
Keyboard controller
Intel Wildcat Point-LP MEI Controller #1
Intel Wildcat Point-LP SMBus Controller
Realtek RTS5129 Card Reader Controller
Broadcom BCM43142A0 Bluetooth module
/dev/input/event20 Syntek Lenovo EasyCamera
/dev/input/event7 Microsoft Nano Transceiver 1.1
In realtà non sembra che nel caso del comando hwinfo siano reperibili le man page, ma la semplice digitazione del comando nel formato hwinfo --help, restituisce un semplice riassunto del significato degli argomenti che si possono passare al comando stesso.
Tutti i dettagli hardware con ‘inxi’
Con il comando inxi, si può ottenere una lista ancora più completa dell’hardware e soprattutto molto chiara. Questo comando è in realtà un enorme script (di più di 10 Kbytes); esso raccoglie tutte le informazioni sfruttando i vari comandi e file di sistema per riportare sul terminale.
# inxi -Fi
System: Host: klamath Kernel: 5.0.13-200.fc29.x86_64 x86_64 bits: 64 Desktop: MATE 1.22.1
Distro: Fedora release 29 (Twenty Nine)
Machine: Type: Laptop System: LENOVO product: 80FG v: Lenovo Z00-00 serial: PF0XXXXX
Mobo: LENOVO model: Lenovo Z00-00 v: 319000YYYYY serial: PF0XXXXX UEFI [Legacy]: LENOVO v: ABCWWWWW
date: 06/20/2014
Battery: ID-1: BAT0 charge: 33.1 Wh condition: 33.1/37.6 Wh (88%)
CPU: Topology: Dual Core model: Intel Core i7-5500U bits: 64 type: MT MCP L2 cache: 4096 KiB
Speed: 1257 MHz min/max: 500/3000 MHz Core speeds (MHz): 1: 1117 2: 875 3: 1049 4: 820
Graphics: Device-1: Intel HD Graphics 5500 driver: i915 v: kernel
Device-2: NVIDIA GM108M [GeForce 840M] driver: nouveau v: kernel
Display: server: Fedora Project X.org 1.20.4 driver: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 5500 (Broadwell GT2) v: 4.5 Mesa 18.3.6
Audio: Device-1: Intel Broadwell-U Audio driver: snd_hda_intel
Device-2: Intel Wildcat Point-LP High Definition Audio driver: snd_hda_intel
Sound Server: ALSA v: k5.0.13-200.fc29.x86_64
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: 68:f7:28:69:86:5c
IP v4: 192.168.0.200/24 type: dynamic noprefixroute scope: global
IP v6: fe80::be2a:2759:a580:af6a/64 type: noprefixroute scope: link
Device-2: Broadcom and subsidiaries BCM43142 802.11b/g/n driver: wl
IF: wlp3s0 state: dormant mac: de:e1:82:07:ae:64
IF-ID-1: virbr0 state: down mac: 52:54:00:71:ac:09
IP v4: 192.168.122.1/24 scope: global
IF-ID-2: virbr0-nic state: down mac: 52:54:00:71:ac:09
IF-ID-3: virbr1 state: down mac: 52:54:00:3f:24:b5
IP v4: 172.16.1.1/24 scope: global
IF-ID-4: virbr1-nic state: down mac: 52:54:00:3f:24:b5
IF-ID-5: virbr4 state: down mac: 52:54:00:1d:3f:40
IP v4: 172.16.16.1/24 scope: global
IF-ID-6: virbr4-nic state: down mac: 52:54:00:1d:3f:40
IF-ID-7: virbr5 state: down mac: 52:54:00:38:74:e0
IP v4: 192.168.100.1/24 scope: global
IF-ID-8: virbr5-nic state: down mac: 52:54:00:38:74:e0
WAN IP: 79.27.244.80
Drives: Local Storage: total: 1.14 TiB used: 470.63 GiB (40.4%)
ID-1: /dev/sda vendor: Seagate model: ST1000LM024 HN-M101MBB size: 931.51 GiB
ID-2: /dev/sdb vendor: Samsung model: SSD 750 EVO 250GB size: 232.89 GiB
Partition: ID-1: / size: 49.09 GiB used: 27.91 GiB (56.8%) fs: ext4 dev: /dev/dm-0
ID-2: /boot size: 476.2 MiB used: 193.6 MiB (40.7%) fs: ext4 dev: /dev/sdb1
ID-3: /home size: 171.71 GiB used: 28.36 GiB (16.5%) fs: ext4 dev: /dev/dm-2
ID-4: swap-1 size: 7.81 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/dm-1
Sensors: System Temperatures: cpu: 48.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info: Processes: 272 Uptime: 8h 15m Memory: 15.58 GiB used: 4.39 GiB (28.2%) Shell: bash inxi: 3.0.32
Anche il comando inxi restituisce una quantità enorme di informazioni raggruppate per categoria, come è mostrato nell’esempio qui sopra. Una peculiarità di inxi consiste nel fatto che è in grado di restituire molte informazioni utili; dalla versione di sistema operativo,al kernel in uso e perfino il tipo di desktop manager attivo. Notare inoltre che sono anche riportate informazioni sulle partizioni dei dischi e sui filesystem montati.
Le Informazioni sui device estratte dal BIOS con ‘dmidecode’
Tutti i comandi visti fin qui attingono direttamente le informazioni direttamente dai dispositivi o accedono a quelle conservate in memoria nel filesystem /proc. Tuttavia, c’è un comando Linux in grado di andare a leggere la struttura dati del SMBIOS (System Management BIOS); in altre parole è in grado di restituire in modo formattato il contenuto della struttura dati del BIOS (Basic Intput Output System) predisposta dal programma eseguito all’accensione della macchina.
Sto parlando del comando dmidecode il quale ha un cospicuo numero di argomenti nella riga di comando; tramite tali argomenti è possibile filtrare le informazioni restituite. Anche in questo caso, incoraggio il lettore a sfogliare le man pages per scoprire in dettaglio tutte i possibili argomenti accettati da questo comando.
Qui di seguito un esempio del risultato di dmidecode di un laptop.
# dmidecode
dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
68 structures occupying 3374 bytes.
Table at 0x000E6F00.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: LENOVO
Version: ABCXXXXX
Release Date: 06/20/2014
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 6144 kB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
EDD is supported
Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
5.25"/360 kB floppy services are supported (int 13h)
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
8042 keyboard services are supported (int 9h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 1.32
Firmware Revision: 1.32
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: LENOVO
Product Name: XXXX
Version: Lenovo Z00-00
Serial Number: PF0XXXXX
UUID: f36609f8-9c6c-11e4-a961-68yyyyyyyyyy
Wake-up Type: Power Switch
SKU Number: LENOVO_MT_80FG_BU_idea_FM_Lenovo Z00-00
Family: IDEAPAD
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: LENOVO
Product Name: Lenovo Z00-00
Version: 3190XXXXXXX
Serial Number: PF0XXXXX
Asset Tag: NO Asset Tag
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Type2 - Board Chassis Location
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
andle 0x0003, DMI type 3, 22 bytes
Chassis Information
Manufacturer: LENOVO
Type: Notebook
Lock: Not Present
Version: Lenovo Z00-00
Serial Number: PF0XXXXX
Asset Tag: NO Asset Tag
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x00000000
Height: Unspecified
Number Of Power Cords: 1
Contained Elements: 0
SKU Number: SKU Number
Handle 0x0004, DMI type 4, 42 bytes
Processor Information
Socket Designation: U3E1
Type: Central Processor
Family: Core i7
Manufacturer: Intel(R) Corporation
ID: D4 06 03 00 FF FB EB BF
Signature: Type 0, Family 6, Model 61, Stepping 4
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
DS (Debug store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
SS (Self-snoop)
HTT (Multi-threading)
TM (Thermal monitor supported)
PBE (Pending break enabled)
Version: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Voltage: 0.9 V
External Clock: 100 MHz
Max Speed: 3000 MHz
Current Speed: 2400 MHz
Status: Populated, Enabled
Upgrade: Socket BGA1168
L1 Cache Handle: 0x0006
L2 Cache Handle: 0x0007
L3 Cache Handle: 0x0008
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Part Number: To Be Filled By O.E.M.
Core Count: 2
Core Enabled: 2
Thread Count: 4
Characteristics:
64-bit capable
Multi-Core
Hardware Thread
Execute Protection
Enhanced Virtualization
Power/Performance Control
Handle 0x0005, DMI type 7, 19 bytes
Cache Information
Socket Designation: L1 Cache
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
Installed Size: 32 kB
Maximum Size: 32 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Parity
System Type: Data
Associativity: 8-way Set-associative
Handle 0x0006, DMI type 7, 19 bytes
Cache Information
Socket Designation: L1 Cache
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
Installed Size: 32 kB
Maximum Size: 32 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Parity
System Type: Instruction
Associativity: 8-way Set-associative
Handle 0x0007, DMI type 7, 19 bytes
Cache Information
Socket Designation: L2 Cache
Configuration: Enabled, Not Socketed, Level 2
Operational Mode: Write Back
Location: Internal
Installed Size: 256 kB
Maximum Size: 256 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Single-bit ECC
System Type: Unified
Associativity: 8-way Set-associative
Handle 0x0008, DMI type 7, 19 bytes
Cache Information
Socket Designation: L3 Cache
Configuration: Enabled, Not Socketed, Level 3
Operational Mode: Write Back
Location: Internal
Installed Size: 4096 kB
Maximum Size: 4096 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Multi-bit ECC
System Type: Unified
Associativity: 16-way Set-associative
Handle 0x0009, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1A1
Internal Connector Type: None
External Reference Designator: Keyboard
External Connector Type: PS/2
Port Type: Keyboard Port
Handle 0x000A, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1A1
Internal Connector Type: None
External Reference Designator: Mouse
External Connector Type: PS/2
Port Type: Mouse Port
Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A1
Internal Connector Type: None
External Reference Designator: TV OUT
External Connector Type: Mini DIN
Port Type: Video Port
Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A2
Internal Connector Type: None
External Reference Designator: CRT
External Connector Type: DB-15 female
Port Type: Video Port
Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A2
Internal Connector Type: None
External Reference Designator: COM 1
External Connector Type: DB-9 male
Port Type: Serial Port 16550A Compatible
Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J5A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0012, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J5A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0013, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J5A2
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0014, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J5A1
Internal Connector Type: None
External Reference Designator: Network
External Connector Type: RJ-45
Port Type: Network Port
Handle 0x0015, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9G2
Internal Connector Type: On Board Floppy
External Reference Designator: OnBoard Floppy Type
External Connector Type: None
Port Type: Other
Handle 0x0016, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J7J1
Internal Connector Type: On Board IDE
External Reference Designator: OnBoard Primary IDE
External Connector Type: None
Port Type: Other
Handle 0x0017, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J30
Internal Connector Type: None
External Reference Designator: Microphone In
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port
Handle 0x0018, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J30
Internal Connector Type: None
External Reference Designator: Line In
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port
Handle 0x0019, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J30
Internal Connector Type: None
External Reference Designator: Speaker Out
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port
Handle 0x001A, DMI type 9, 17 bytes
System Slot Information
Designation: J6C1
Type: x1 PCI Express x1
Current Usage: Available
Length: Other
ID: 1
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.0
Handle 0x001B, DMI type 9, 17 bytes
System Slot Information
Designation: J6D2
Type: x1 PCI Express x1
Current Usage: Available
Length: Other
ID: 2
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.1
Handle 0x001C, DMI type 9, 17 bytes
System Slot Information
Designation: J7C1
Type: x1 PCI Express x1
Current Usage: In Use
Length: Other
ID: 3
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.2
Handle 0x001D, DMI type 9, 17 bytes
System Slot Information
Designation: J7D1
Type: x1 PCI Express x1
Current Usage: In Use
Length: Other
ID: 4
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.3
Handle 0x001E, DMI type 9, 17 bytes
System Slot Information
Designation: J8C1
Type: x4 PCI Express x4
Current Usage: In Use
Length: Other
ID: 5
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.4
Handle 0x001F, DMI type 11, 5 bytes
OEM Strings
String 1: OemString1
String 2: OemString2
String 3: OemString3
Handle 0x0020, DMI type 12, 5 bytes
System Configuration Options
Option 1: ConfigOptions1
Option 2: ConfigOptions2
Option 3: ConfigOptions3
Handle 0x0021, DMI type 13, 22 bytes
BIOS Language Information
Language Description Format: Long
Installable Languages: 8
en|US|iso8859-1,0
fr|CA|iso8859-1,0
zh|TW|unicode,0
ja|JP|unicode,0
it|IT|iso8859-1,0
es|ES|iso8859-1,0
de|DE|iso8859-1,0
pt|PT|iso8859-1,0
Currently Installed Language: en|US|iso8859-1,0
Handle 0x0022, DMI type 14, 23 bytes
Group Associations
Name: Firmware Version Info
Items: 6
0x003C (OEM-specific)
0x003B (OEM-specific)
0x003A (OEM-specific)
0x0039 (OEM-specific)
0x0038 (OEM-specific)
0x0037 (OEM-specific)
Handle 0x0023, DMI type 14, 8 bytes
Group Associations
Name: Intel(R) Silicon View Technology
Items: 1
0x0042 (OEM-specific)
Handle 0x0024, DMI type 15, 29 bytes
System Event Log
Area Length: 0 bytes
Header Start Offset: 0x0000
Header Length: 8192 bytes
Data Start Offset: 0x2000
Access Method: General-purpose non-volatile data functions
Access Address: 0x0000
Status: Valid, Not Full
Change Token: 0x12345678
Header Format: OEM-specific
Supported Log Type Descriptors: 3
Descriptor 1: POST memory resize
Data Format 1: None
Descriptor 2: POST error
Data Format 2: POST results bitmap
Descriptor 3: Log area reset/cleared
Data Format 3: None
Handle 0x0025, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 16 GB
Error Information Handle: No Error
Number Of Devices: 2
Handle 0x0026, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0025
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: SODIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: 0467
Serial Number: 68162346
Asset Tag: 9876543210
Part Number: RMT3160ME6XXXXXXXX
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0027, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0025
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: SODIMM
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: 0467
Serial Number: 68692346
Asset Tag: 9876543210
Part Number: RMT3160ME6XXXXXXXX
Rank: 2
Configured Memory Speed: 1600 MT/s
Handle 0x0028, DMI type 19, 31 bytes
Memory Array Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x003FFFFFFFF
Range Size: 16 GB
Physical Array Handle: 0x0025
Partition Width: 2
Handle 0x0029, DMI type 20, 35 bytes
Memory Device Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x001FFFFFFFF
Range Size: 8 GB
Physical Device Handle: 0x0026
Memory Array Mapped Address Handle: 0x0028
Partition Row Position: 254
Interleave Position: 1
Interleaved Data Depth: 1
Handle 0x002A, DMI type 20, 35 bytes
Memory Device Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x001FFFFFFFF
Range Size: 8 GB
Physical Device Handle: 0x0027
Memory Array Mapped Address Handle: 0x0028
Partition Row Position: 254
Interleave Position: 2
Interleaved Data Depth: 1
Handle 0x002B, DMI type 21, 7 bytes
Built-in Pointing Device
Type: Touch Pad
Interface: PS/2
Buttons: 4
Handle 0x002C, DMI type 22, 26 bytes
Portable Battery
Location: Fake
Manufacturer: -Virtual Battery 0-
Manufacture Date: 08/08/2010
Serial Number: Battery 0
Name: CRB Battery 0
Chemistry: Lithium Ion
Design Capacity: Unknown
Design Voltage: Unknown
SBDS Version: Not Specified
Maximum Error: Unknown
OEM-specific Information: 0x00000000
Handle 0x002D, DMI type 24, 5 bytes
Hardware Security
Power-On Password Status: Disabled
Keyboard Password Status: Disabled
Administrator Password Status: Disabled
Front Panel Reset Status: Disabled
Handle 0x002E, DMI type 26, 24 bytes
Voltage Probe
Description: Voltage Probe Description
Location: Unknown
Status: Unknown
Maximum Value: Unknown
Minimum Value: Unknown
Resolution: Unknown
Tolerance: Unknown
Accuracy: Unknown
OEM-specific Information: 0x00008000
Nominal Value: 0.000 V
Handle 0x002F, DMI type 27, 15 bytes
Cooling Device
Temperature Probe Handle: 0x0030
Type: Fan
Status: OK
OEM-specific Information: 0x00000000
Nominal Speed: 8192 rpm
Description: Cooling Device Description
Handle 0x0030, DMI type 28, 24 bytes
Temperature Probe
Description: Temperature Probe Description
Location: Unknown
Status: Unknown
Maximum Value: Unknown
Minimum Value: Unknown
Resolution: Unknown
Tolerance: Unknown
Accuracy: Unknown
OEM-specific Information: 0x00008000
Nominal Value: 0.0 deg C
Handle 0x0031, DMI type 32, 11 bytes
System Boot Information
Status: No errors detected
Handle 0x0032, DMI type 39, 22 bytes
System Power Supply
Location: OEM Define 0
Name: OEM Define 1
Manufacturer: OEM Define 2
Serial Number: OEM Define 3
Asset Tag: OEM Define 4
Model Part Number: OEM Define 5
Revision: OEM Define 6
Max Power Capacity: 75 W
Status: Not Present
Type: Regulator
Input Voltage Range Switching: Auto-switch
Plugged: No
Hot Replaceable: No
Handle 0x0033, DMI type 40, 17 bytes
Additional Information 1
Referenced Handle: 0x000e
Referenced Offset: 0x05
String: PCIExpressx16
Value: 0xaa
Additional Information 2
Referenced Handle: 0x0000
Referenced Offset: 0x05
String: Compiler Version: VC 9.0
Value: 0x00
Handle 0x0034, DMI type 41, 11 bytes
Onboard Device
Reference Designation: IGD
Type: Video
Status: Disabled
Type Instance: 1
Bus Address: 0000:00:02.0
Handle 0x0035, DMI type 128, 8 bytes
OEM-specific Type
Header and Data:
80 08 35 00 55 AA 55 AA
Strings:
Oem Type 128 Test 1
Oem Type 128 Test 2
Handle 0x0036, DMI type 129, 8 bytes
OEM-specific Type
Header and Data:
81 08 36 00 01 01 02 01
Strings:
Insyde_ASF_001
Insyde_ASF_002
Handle 0x0037, DMI type 130, 20 bytes
OEM-specific Type
Header and Data:
82 14 37 00 24 41 4D 54 01 01 01 01 01 A5 1F 02
00 00 00 00
Handle 0x0038, DMI type 131, 64 bytes
OEM-specific Type
Header and Data:
83 40 38 00 31 00 00 00 00 00 00 00 00 00 00 00
F8 00 C3 9C 00 00 00 00 01 00 00 00 00 00 0A 00
EE 03 1C 00 00 00 00 00 C8 00 FF FF 00 00 00 00
00 FF 00 00 26 00 00 00 76 50 72 6F 00 00 00 00
Handle 0x0039, DMI type 133, 5 bytes
OEM-specific Type
Header and Data:
85 05 39 00 01
Strings:
XXXXXXXXXXXXXXX
Handle 0x003A, DMI type 136, 6 bytes
OEM-specific Type
Header and Data:
88 06 3A 00 FF FF
Handle 0x003B, DMI type 200, 16 bytes
OEM-specific Type
Header and Data:
C8 10 3B 00 01 02 01 20 01 10 01 3D B2 80 01 05
Strings:
IdeaPad
80FG0XXXXX
Handle 0x003C, DMI type 221, 12 bytes
OEM-specific Type
Header and Data:
DD 0C 3C 00 01 01 00 02 03 00 00 00
Strings:
Reference Code - ACPI
Handle 0x003D, DMI type 221, 54 bytes
OEM-specific Type
Header and Data:
DD 36 3D 00 07 01 00 02 03 00 00 00 02 00 02 03
00 01 00 03 00 02 03 00 00 00 04 05 FF FF FF FF
FF 06 00 FF FF FF 09 00 07 00 FF FF FF 09 00 08
00 FF FF FF 00 00
Strings:
Reference Code - SA - System Agent
Reference Code - MRC
SA - PCIe Version
SA-CRID Status
Disabled
SA-CRID Original Value
SA-CRID New Value
OPROM - VBIOS
Handle 0x003E, DMI type 221, 12 bytes
OEM-specific Type
Header and Data:
DD 0C 3E 00 01 01 00 02 03 00 00 00
Strings:
Reference Code - Intel Rapid Start
Handle 0x003F, DMI type 221, 26 bytes
OEM-specific Type
Header and Data:
DD 1A 3F 00 03 01 00 02 03 00 00 00 02 00 00 00
00 11 00 03 00 00 05 00 00 00
Strings:
Reference Code - CPU
uCode Version
TXT ACM version
Handle 0x0040, DMI type 221, 26 bytes
OEM-specific Type
Header and Data:
DD 1A 40 00 03 01 00 02 03 00 00 00 02 00 FF FF
FF FF 00 03 04 0A 00 1C EE 03
Strings:
Reference Code - ME 10.0
MEBx version
ME Firmware Version
1.5MB SKU
Handle 0x0041, DMI type 221, 68 bytes
OEM-specific Type
Header and Data:
DD 44 41 00 09 01 00 02 03 00 00 00 02 03 FF FF
FF FF FF 04 00 FF FF FF 03 00 05 00 FF FF FF 03
00 06 00 FF FF FF FF FF 07 00 19 00 00 00 00 08
00 2C 00 00 00 00 09 00 03 00 00 00 00 0A 00 01
00 00 00 00
Strings:
Reference Code - PCH - Lynxpoint
PCH-CRID Status
Disabled
PCH-CRID Original Value
PCH-CRID New Value
OPROM - RST - RAID
LPTLp Bx Hsio Version
LPTH Cx Hsio Version
PCH9S A0 Hsio Version
WPTLp B0 Hsio Version
Handle 0x0042, DMI type 222, 14 bytes
OEM-specific Type
Header and Data:
DE 0E 42 00 01 99 00 03 10 01 20 02 30 03
Strings:
Memory Init Complete
End of DXE Phase
BIOS Boot Complete
Handle 0xFEFF, DMI type 127, 4 bytes
End Of Table
Notare che l’output è estremamente corposo e ricco di dettagli, forse anche troppo. Tuttavia sono sicuro che al suo interno troverai sicuramente il dispositivo che stai cercando e del quale vuoi saperne di più.
Tutti i dispositivi PCI a portata di mano con ‘lspci’
Per quanto riguarda i dispositivi PCI (Periferal Computer Interconnect), è possibile ottenere un completo e dettagliato elenco dei dispositivi connessi al Bus PCI del sistema, con il comando lspci, del quale, per altro esiste una completa pagina di manuale nelle man pages della tua distribuzione GNU Linux, che ti invito a sfogliare. In altre parole. È vero che i comandi precedenti mostrano tutti i dispositivi connessi al sistema, ma d’altro canto lspci mostra unicamente quelli connessi al Bus PCI, il che rende l’indagine più semplice.
Il comando lspci digitato senza argomenti, ritorna la semplice lista dei dispositivi PCI, come mostrato qui di seguito.
# lspci 00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09) 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) 00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09) 00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03) 00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03) 00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3) 00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3) 00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3) 00:1c.4 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #5 (rev e3) 00:1d.0 USB controller: Intel Corporation Wildcat Point-LP USB EHCI Controller (rev 03) 00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03) 00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10) 03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01) 04:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)
Le cose interessanti del risultato di questo comando sono:
- Il nome dello slot dove risiede il dispositivo, nel formato
[domain:]bus:device.function. - Il tipo di dispositivo (USB controller, PCI bridge, Audio device, ecc.)
- Il nome completo del dispositivo, così come riportato dal dispositivo stesso
Va detto che il comando lspci, nella sua forma di default, è già una lista sintetica, ma può essere estesa a piacere andando sempre più a fondo nella ricerca dei dettagli che si desidera ottenere.
Ad esempio, se si vuole ottenere tutte le caratteristiche dei dispositivi è sufficiente digitare il comando o lspci -vvv, dove l’argomento ‘v‘ è indicato più volte a significare che si desidera ottenere una lista molto dettagliata. Anche qui le man pages ci possono essere di grande aiuto per la comprensione del significato degli argomenti d passare al comando.
Tutti i dispositivi SCSI svelati con ‘lsscsi’
Anche se il comando lsscsi può tornare molto più utile quando stiamo indagando l’hardware di un server, lo possiamo usare anche nei normali PC moderni i quali “vedono” alcuni dispositivi, come ad esempio i dischi SATA, come se fossero dei dispositivi SCSI.
Non a caso l’esempio che segue, è il comando lsscsi che è stato eseguito su un Laptop; esso “vede” 2 dispositivi SATA come se fossero SCSI.
# lsscsi --classic Attached devices: Host: scsi0 Channel: 00 Target: 00 Lun: 00 Vendor: ATA Model: ST1000LM024 HN-M Rev: 0001 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Target: 00 Lun: 00 Vendor: ATA Model: Samsung SSD 750 Rev: 1B6Q Type: Direct-Access ANSI SCSI revision: 05
Notare che nell’esempio è stato usato l’argomento ‘--classic‘ poiché volevo sottolineare la visione nel formato classico dei dispositivi SCSI.
Seppure abbiamo detto che il comando lsscsi è di poca utilità su un semplice PC, esso da il meglio di se su un server con molti dischi o storage connessi al sistema; nel qual caso si possono ottenere informazione dettagliatissime sul tipo di trasporto (‘transport’), sul WWN, sugli SCSI ID, e molto altro ancora.
I dispositivi USB non sono più un mistero con ‘lsusb’
Molto spesso c’è bisogno di sapere subito se un particolare dispositivo connesso ad una porta USB è stato acquisito dal sistema. In questo caso possiamo usare il comando lsusb , il quale esegue una scansione mirata su tutti i dispositivi eventualmente collegati a queste magiche porte.
Questo è un classico esempio “stringato” di ciò che è restituito dal comando lsusb senza alcun argomento.
# lsusb Bus 001 Device 002: ID 8087:8001 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 005: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module Bus 002 Device 004: ID 174f:14be Syntek Bus 002 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 002 Device 002: ID 045e:07fd Microsoft Corp. Nano Transceiver 1.1 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Anche per il comando lsusb ha i suoi argomenti da passare al programma per filtrare il risultato che vogliamo ottenere; come al solito, suggerisco di sfogliare le man pages per approfondire l’argomento.
Conclusioni
Anche se spesso potremmo trovarci in difficoltà per individuare quale dispositivo è connesso al sistema, abbiamo visto che in ambiente GNU Linux esistono diverse soluzioni; una vasta gamma di possibilità per esplorare l’interno della nostra macchina e tutto ciò che è connesso a questa.
Talvolta può capitare di imbattersi in situazioni dove è indispensabile riuscire ad identificare con facilità e rapidità un particolare dispositivo connesso al sistema; ciò è soprattutto vero nei casi in cui è proprio quel device che sta causando problemi al corretto funzionamento del sistema.
Oppure in quei casi in cui si deve aggiungere un ulteriore Hard Disk e verificarne la corretta acquisizione da parte del sistema operativo.
Personalmente credo che avere a disposizione tutti gli strumenti necessari alle indagini tecniche di un malfunzionamento, in un unico posto che sia accessibile facilmente, sia da un po’ come avere in tasca un coltellino svizzero sempre pronto all’uso.
CondividiDisclaimer
Questa pagina potrebbe contenere link di affiliazione. Gli acquisti o gli ordini che effettuerai tramite tali link possono generare commissioni che ci aiutano a sostenere questo sito web.