![当 dmidecode 显示“速度:未知”且 lshw 挂起时,如何获取内存速度](https://linux22.com/image/1382733/%E5%BD%93%20dmidecode%20%E6%98%BE%E7%A4%BA%E2%80%9C%E9%80%9F%E5%BA%A6%EF%BC%9A%E6%9C%AA%E7%9F%A5%E2%80%9D%E4%B8%94%20lshw%20%E6%8C%82%E8%B5%B7%E6%97%B6%EF%BC%8C%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E5%86%85%E5%AD%98%E9%80%9F%E5%BA%A6.png)
我想获得内存速度信息,但dmidecode -t memory
它却显示Speed: Unknown
并lshw
打印出字符串DMI
,然后什么也不做,直到我将其杀死。
还有其他方法可以获取这些信息吗?或者一些神奇的参数lshw
可以dmidecode
强制它们真正做它们应该做的事情?
root@server:~# dmidecode -t memory
# dmidecode 2.9
SMBIOS 2.5 present.
Handle 0x0027, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 8 GB
Error Information Handle: Not Provided
Number Of Devices: 2
Handle 0x0029, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0027
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: DIMM A1
Bank Locator: BANK0
Type: Other
Type Detail: Synchronous
Speed: Unknown
Manufacturer: Manufacturer0
Serial Number: SerNum0
Asset Tag: AssetTagNum0
Part Number: PartNum0
Handle 0x002B, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0027
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: DIMM
Set: None
Locator: DIMM B1
Bank Locator: BANK1
Type: Other
Type Detail: Synchronous
Speed: Unknown
Manufacturer: Manufacturer1
Serial Number: SerNum1
Asset Tag: AssetTagNum1
Part Number: PartNum1
。
root@server:~# lshw -version
B.02.14
root@server:~# lshw
DMI
答案1
你可以使用dmesg
它从内核中提取此类信息
root@server ~]# dmesg |grep -i memory |grep core
[ 1.518759] nouveau [ DRM] 0: core 208MHz shader 416MHz memory 100MHz voltage 1200mV fanspeed 100%
[ 1.518762] nouveau [ DRM] 1: core 460MHz shader 920MHz memory 400MHz voltage 1200mV fanspeed 100%
[ 1.518764] nouveau [ DRM] c: core 459MHz shader 918MHz memory 399MHz voltage 1200mV
[ 2.141818] nouveau [ DRM] 0: core 208MHz shader 416MHz memory 100MHz voltage 1200mV fanspeed 100%
[ 2.141821] nouveau [ DRM] 1: core 460MHz shader 920MHz memory 400MHz voltage 1200mV fanspeed 100%
[ 2.141823] nouveau [ DRM] c: core 459MHz shader 918MHz memory 399MHz voltage 1200mV
dmesg 适用于提取任何设备信息;即dmesg |grep -i scsi
或dmesg |grep -i usb
只是dmesg| more
查看所有信息