Ubuntu 20.04 查看部分硬件信息

生当作开发,死亦为运维。

查看内存信息

执行如下命令:

1
dmidecode --type 17

输出如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0044, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0043
Error Information Handle: Not Provided
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: 0819
Serial Number: 1234567
Asset Tag: 9876543210
Part Number: 7654321
Rank: 2
Configured Memory Speed: 1600 MT/s
Minimum Voltage: Unknown
Maximum Voltage: Unknown
Configured Voltage: Unknown

Handle 0x0045, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0043
Error Information Handle: Not Provided
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: Kingston
Serial Number: 1234567
Asset Tag: 9876543210
Part Number: 7654321
Rank: 2
Configured Memory Speed: 1600 MT/s
Minimum Voltage: Unknown
Maximum Voltage: Unknown
Configured Voltage: Unknown

从以上得到的信息可以看出,该命令能够得到诸如内存大小内存速度内存条数内存代数内存厂商等内存的详细信息。

查看显示器信息

安装 ddcutil

1
apt install ddcutil

执行如下命令:

1
ddcutil detect --verbose

输出类似如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Output level:               Verbose
Reporting DDC data errors: false
Trace groups active: none
Traced functions: none
Traced files: none
Force I2C slave address: false
User defined features: disabled

Invalid display
I2C bus: /dev/i2c-7
I2C address 0x50 (EDID) present: true
Is eDP device: true
/sys/bus/i2c/devices/i2c-7/name: DPDDC-A
EDID synopsis:
Mfg id: BOE
Model:
Serial number:
Manufacture year: 2016
EDID version: 1.4
Product code: 1795
Extra descriptor: NV156FHM-N43
Video input definition: 0x95 - Digital Input (DisplayPort)
Supported features:
Digital display type: RGB 4:4:4
Standard sRGB color space: False
White x,y: 0.312, 0.328
Red x,y: 0.652, 0.340
Green x,y: 0.316, 0.629
Blue x,y: 0.152, 0.063
Extension blocks: 0
EDID source:
EDID hex dump:
+0 +4 +8 +c 0 4 8 c
+0000 00 ff ff ff ff ff ff 00 09 e5 03 07 00 00 00 00 ................
+0010 01 1a 01 04 95 22 13 78 02 00 10 a7 57 51 a1 27 .....".x....WQ.'
+0020 10 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 .PT.............
+0030 01 01 01 01 01 01 96 37 80 a0 70 38 3c 40 30 20 .......7..p8<@0
+0040 36 00 58 c2 10 00 00 1a 00 00 00 00 00 00 00 00 6.X.............
+0050 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 00 42 ...............B
+0060 4f 45 20 43 51 0a 20 20 20 20 20 20 00 00 00 fe OE CQ. ....
+0070 00 4e 56 31 35 36 46 48 4d 2d 4e 34 33 0a 00 8d .NV156FHM-N43...
DDC communication failed
This is an eDP laptop display. Laptop displays do not support DDC/CI.


从以上得到的信息可以看出,该命令能够得到诸如屏幕厂商(BOE)屏幕型号(NV156FHM-N43)屏幕生产年份等屏幕的详细信息。

查看 CPU 详细信息

执行如下命令:

1
lscpu

输出如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Architecture:                    x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Model name: Intel(R) Core(TM) i7-4712MQ CPU @ 2.30GHz
Stepping: 3
CPU MHz: 798.269
CPU max MHz: 3300.0000
CPU min MHz: 800.0000
BogoMIPS: 4589.31
Virtualization: VT-x
L1d cache: 128 KiB
L1i cache: 128 KiB
L2 cache: 1 MiB
L3 cache: 6 MiB
NUMA node0 CPU(s): 0-7
Vulnerability Itlb multihit: KVM: Mitigation: Split huge pages
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling
Vulnerability Srbds: Mitigation; Microcode
Vulnerability Tsx async abort: Not affected
Flags: 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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pe
bs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_dea
dline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 a
vx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d

从以上得到的信息可以看出,该命令能够得到诸如CPU型号CPU核心数CPU当前运行速度CPU睿频速度三级缓存大小指令集支持情况等CPU的详细信息。

查看网卡信息

1
lshw -class network
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
*-network                 
description: Ethernet interface
product: RTL810xE PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: enp2s0
version: 07
serial: 00:f1:f5:19:e9:ce
size: 100Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8106e-1_0.0.1 06/29/12 ip=192.168.100.160 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:18 ioport:3000(size=256) memory:b0000000-b0000fff memory:d0000000-d0003fff