Linuxでハードウェア情報を取得する様々な方法を紹介したいと思います。CPUやディスクの情報を取得するにも、様々なコマンドが存在していますので、実際にこの記事を読んで頂いて、どのコマンドの結果が最も必要なものなのか確認してみましょう。
CPU情報
lscpuコマンド
lscpuコマンドを使うと、CPUに関する情報を詳しく表示することが出来ます。
$ lscpu
実際にCPU情報を取得した結果は次のようになります。
lscpu
アーキテクチャ: x86_64
CPU 操作モード: 32-bit, 64-bit
Address sizes: 36 bits physical, 48 bits virtual
バイト順序: Little Endian
CPU: 4
オンラインになっている CPU のリスト: 0-3
ベンダー ID: GenuineIntel
モデル名: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
CPU ファミリー: 6
モデル: 58
コアあたりのスレッド数: 1
ソケットあたりのコア数: 4
ソケット数: 1
ステッピング: 9
CPU(s) scaling MHz: 84%
CPU 最大 MHz: 3600.0000
CPU 最小 MHz: 1600.0000
BogoMIPS: 6385.57
フラグ: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopolo
gy nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_faul
t epb pti ssbd ibrs ibpb stibp fsgsbase smep erms xsaveopt dtherm ida arat pln pts md_clear flush_l1d
Caches (sum of all):
L1d: 128 KiB (4 instances)
L1i: 128 KiB (4 instances)
L2: 1 MiB (4 instances)
L3: 6 MiB (1 instance)
NUMA:
NUMA ノード数: 1
NUMA ノード 0 CPU: 0-3
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: KVM: Mitigation: VMX unsupported
L1tf: Mitigation; PTE Inversion
Mds: Mitigation; Clear CPU buffers; SMT disabled
Meltdown: Mitigation; PTI
Mmio stale data: Unknown: No mitigations
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Srbds: Vulnerable: No microcode
Tsx async abort: Not affected
cpufetchコマンド
cpufetchというコマンドを実行すると、次のようにCPUのメーカー名がグラフィカルに表示されるとともに、CPUの詳細情報が表示されます。
システム情報とLinuxの情報表示
neofetchというコマンドを使うことによって、システムの情報とLinuxの情報を纏めて取得することが出来ます。
メモリ情報の表示
パソコンに装填されているメモリー情報を取得するには、dmidecodeコマンドを実行します。「-memory」オプションを付けることによってメモリーの情報を取得して表示できます。
$ sudo dmidecode -t memory
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
Handle 0x0007, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 32 GB
Error Information Handle: Not Provided
Number Of Devices: 4
Handle 0x000D, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0007
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM4
Bank Locator: BANK 0
Type: Unknown
Type Detail: None
Handle 0x000E, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0007
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4 GB
Form Factor: DIMM
Set: None
Locator: DIMM3
Bank Locator: BANK 1
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Samsung
Serial Number: 13FD6337
Asset Tag: 9876543210
Part Number: M378B5173QH0-CK0
Rank: 1
Configured Memory Speed: 1600 MT/s
Handle 0x0011, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0007
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: DIMM2
Bank Locator: BANK 2
Type: Unknown
Type Detail: None
Handle 0x0012, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0007
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4 GB
Form Factor: DIMM
Set: None
Locator: DIMM1
Bank Locator: BANK 3
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: Samsung
Serial Number: 13FD6302
Asset Tag: 9876543210
Part Number: M378B5173QH0-CK0
Rank: 1
Configured Memory Speed: 1600 MT/s
BIOS情報の取得
BIOSの情報を取得するには、dmidecodeコマンドに「-t bios」オプションを付けて実行するとBIOS情報を取得して表示することが出来ます。
sudo dmidecode -t bios
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: Hewlett-Packard
Version: K01 v02.90
Release Date: 07/16/2013
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 16 MB
Characteristics:
PCI is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
EDD is supported
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 2.90
Handle 0x0020, DMI type 13, 22 bytes
BIOS Language Information
Language Description Format: Long
Installable Languages: 12
en|US|iso8859-1
fr|FR|iso8859-1
es|ES|iso8859-1
de|DE|iso8859-1
it|IT|iso8859-1
da|DK|iso8859-1
fi|FI|iso8859-1
nl|NL|iso8859-1
no|NO|iso8859-1
pt|PT|iso8859-1
sv|SE|iso8859-1
ja|JP|unicode
Currently Installed Language: en|US|iso8859-1
システム情報取得
システム自体の情報を取得するには、dmidecodeコマンドに「-t system」オプションを付けて実行します。するとシステム自体の情報を取得できます。
$ sudo dmidecode -t system
dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Hewlett-Packard
Product Name: HP Compaq Elite 8300 SFF
Version: Not Specified
Serial Number: MXL3422ZW4
UUID: 4c61e900-327e-11e3-a52c-2c44fd0d47bc
Wake-up Type: Power Switch
SKU Number: E1Z46UT#ABA
Family: 103C_53307F G=D
Handle 0x000A, DMI type 32, 20 bytes
System Boot Information
Status: No errors detected
ディスク情報表示
lsblkコマンド
lsblkコマンドを実行することにより、ハードディスク、SSD、USB、CD-ROM、DVD-ROM等のブロックデバイスの情報を表示することが出来ます。
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop38 7:38 0 172.4M 1 loop /snap/chromium/2993
loop39 7:39 0 150.6M 1 loop /snap/thunderbird/585
loop40 7:40 0 564K 1 loop /snap/snapd-desktop-integration/247
loop41 7:41 0 175.7M 1 loop /snap/chromium/3002
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 487M 0 part /boot/efi
├─sda2 8:2 0 923.2G 0 part /var/snap/firefox/common/host-hunspell
│ /
└─sda3 8:3 0 7.9G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
hdparmコマンド
hdparmコマンドの「-I」オプションを利用すると、ハードディスクやSSDのメーカー名やシリアル番号、ディスクの規格情報、ディスク容量などの情報を取得することが出来ます。
$ sudo hdparm -I /dev/sda
/dev/sda:
ATA device, with non-removable media
Model Number: TOSHIBA DT01ACA100
Serial Number: 83JE41KNS
Firmware Revision: MS2OA7C0
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Used: unknown (minor revision code 0x0029)
Supported: 9 8 7 6 5
Likely used: 9
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 1953525168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 953869 MBytes
device size with M = 1000*1000: 1000204 MBytes (1000 GB)
cache/buffer size = 23652 KBytes (type=DualPortCache)
Form Factor: 3.5 inch
Nominal Media Rotation Rate: 7200
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: disabled
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
Advanced Power Management feature set
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* 64-bit World wide name
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Phy event counters
* READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
* DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Write Same (AC2)
* SCT Error Recovery Control (AC3)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
* Extended number of user addressable sectors
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
supported: enhanced erase
160min for SECURITY ERASE UNIT. 162min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000039ff6f03e8a
NAA : 5
IEEE OUI : 000039
Unique ID : ff6f03e8a
Checksum: correct
sdparmコマンド
sdparmコマンドでも同じような情報を取得して表示することが出来ます。
sudo sdparm /dev/sda1
/dev/sda1: ATA TOSHIBA DT01ACA1 A7C0
Read write error recovery mode page:
AWRE 1 [cha: n, def: 1]
ARRE 0 [cha: n, def: 0]
PER 0 [cha: n, def: 0]
Caching (SBC) mode page:
IC 0 [cha: n, def: 0]
WCE 1 [cha: y, def: 1]
RCD 0 [cha: n, def: 0]
Control mode page:
TST 0 [cha: n, def: 0]
SWP 0 [cha: n, def: 0]
lshwコマンド
lshwコマンドの「-short」と「-C disk」というオプションを使うと、次のようにディスクなどのブロックデバイスの情報を簡易的に表示することが出来ます。どんなディスクが接続されているのかサクッと確認したい場合に使えるコマンドです。
sudo lshw -short -C disk
H/W path デバイス クラス 詳細
====================================================
/0/100/1f.2/0 /dev/sda disk 1TB TOSHIBA DT01ACA1
/0/100/1f.2/1 /dev/cdrom disk DVD-RAM GHA3N
smartctlコマンド
smartctlコマンドを使うと、ハードディスクやSSDのさらなる詳しい情報を取得することが出来ます。ディスクに備わっている診断機能であるSMART(Self-Monitoring, Analysis and Reporting Technology)から取得した情報を表示できますので、ディスクの稼働状況や不良情報や障害情報なども確認することが出来ます。ディスクの交換時期を把握するのに役立ちます。
$ sudo smartctl -d ata -a -i /dev/sda
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-48-generic] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Toshiba 3.5" DT01ACA... Desktop HDD
Device Model: TOSHIBA DT01ACA100
Serial Number: 83JE41KNS
LU WWN Device Id: 5 000039 ff6f03e8a
Firmware Version: MS2OA7C0
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5528
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Dec 8 22:25:13 2024 MST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 7313) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 122) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 094 016 Pre-fail Always - 0
2 Throughput_Performance 0x0027 142 100 054 Pre-fail Always - 71
3 Spin_Up_Time 0x0023 134 100 024 Pre-fail Always - 170 (Average 173)
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 160
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x002f 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0025 115 100 020 Pre-fail Offline - 34
9 Power_On_Hours 0x0032 087 087 000 Old_age Always - 96309
10 Spin_Retry_Count 0x0033 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 148
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0033 100 100 097 Pre-fail Always - 0
185 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 65535
187 Reported_Uncorrect 0x0032 099 099 000 Old_age Always - 1
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 142147585
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 070 062 000 Old_age Always - 30 (Min/Max 29/33)
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 733
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 733
194 Temperature_Celsius 0x0022 200 157 000 Old_age Always - 30 (Min/Max 20/38)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
SMART Error Log Version: 1
ATA Error Count: 1
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 1 occurred at disk power-on lifetime: 19984 hours (832 days + 16 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 41 08 60 72 ca 03 Error: UNC at LBA = 0x03ca7260 = 63599200
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 08 a0 60 72 ca 40 00 1d+17:19:45.755 READ FPDMA QUEUED
60 08 98 58 72 ca 40 00 1d+17:19:45.754 READ FPDMA QUEUED
60 08 90 50 72 ca 40 00 1d+17:19:45.752 READ FPDMA QUEUED
60 08 88 48 72 ca 40 00 1d+17:19:45.751 READ FPDMA QUEUED
60 08 80 40 72 ca 40 00 1d+17:19:45.750 READ FPDMA QUEUED
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Interrupted (host reset) 90% 1 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
The above only provides legacy SMART information - try 'smartctl -x' for more
USB機器情報表示
lsusbコマンド
接続されているUSB機器の情報を表示するにはlsusbコマンドを実行します。
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 003 Device 003: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
usb-devicesコマンド
usb-devicesコマンドを実行することによって、接続されているUSB機器の詳細情報を取得して表示することが出来ます。
$ usb-devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 3
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=06.08
S: Manufacturer=Linux 6.8.0-48-generic ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=0000:00:1a.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 6
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=8087 ProdID=0024 Rev=00.00
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 3
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=06.08
S: Manufacturer=Linux 6.8.0-48-generic ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=0000:00:1d.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 8
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=8087 ProdID=0024 Rev=00.00
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=256ms
T: Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 4
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=06.08
S: Manufacturer=Linux 6.8.0-48-generic xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0000:00:14.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=c05a Rev=54.00
S: Manufacturer=Logitech
S: Product=USB Optical Mouse
C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=98mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 6 Ivl=10ms
T: Bus=03 Lev=01 Prnt=02 Port=03 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=c31c Rev=49.00
S: Manufacturer=Logitech
S: Product=USB Keyboard
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=90mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=82(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=5000 MxCh= 4
D: Ver= 3.00 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1
P: Vendor=1d6b ProdID=0003 Rev=06.08
S: Manufacturer=Linux 6.8.0-48-generic xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0000:00:14.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
PCIデバイス情報表示
PCIデバイスの情報を表示するには、lspciコマンドを実行します。PCIデバイスとは、パソコンの基盤であるマザーボードと、周辺機器を接続するためのインターフェースです。これらに接続されている機器の一覧を取得して表示することが出来ます。
$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4)
00:1f.0 ISA bridge: Intel Corporation Q77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
まとめ
様々なLinuxコマンドでハードウェア情報を取得することが出来ます。Linuxが稼働しているハードウェアがどのようなものなのか、どのような機器が接続されているのか把握することは非常に重要ですので、これらのコマンドを使って、自分がどのようなLinuxマシンを使っているのか確認しましょう。