Answers:
应该这样做:
sudo lshw -short -C memory
lshw
在memory
类中使用命令:
$ sudo lshw -C memory
# Some things about firmware and caches
*-memory
description: System Memory
physical id: 13
slot: System board or motherboard
size: 8GiB
*-bank:0
description: DIMM [empty]
product: [Empty]
vendor: [Empty]
physical id: 0
serial: [Empty]
slot: ChannelA-DIMM0
*-bank:1
description: SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
product: M471B5273DH0-CK0
vendor: Samsung
physical id: 1
serial: 34A8C7AF
slot: ChannelA-DIMM1
size: 4GiB
width: 64 bits
clock: 1600MHz (0.6ns)
# More banks.
如您所见,我正在使用DDR3 1600MHz RAM。
另一种选择是dmidecode
:
$ sudo dmidecode -t memory
# dmidecode 2.9
SMBIOS 2.5 present.
Handle 0x003B, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: Unknown
Error Information Handle: Not Provided
Number Of Devices: 8
Handle 0x003D, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x003B
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: DIMM
Set: None
Locator: DIMM_A1
Bank Locator: NODE 0 CHANNEL 0 DIMM 0
Type: Other
Type Detail: Synchronous
Speed: 1067 MHz (0.9 ns)
Manufacturer: 0x0198
Serial Number: 0xB12A9593
Asset Tag: Unknown
Part Number: 9965426-037.A00LF
# more such devices
这是用于与ECC存储器的服务器(如可以从可见Error Correction Type
字段和之间的差值Data Width
和Total Width
)。
这两个工具都是ubuntu-standard
软件包的依赖项,默认情况下应在所有Ubuntu系统上可用。曾经有另一个名为的工具hwinfo
,自13.10起,该工具不再适用于Ubuntu。
我只能使用来获得此信息dmidecode
,但不能grepping的是,使用正确的类型更干净:
sudo dmidecode --type memory
sudo dmidecode -t memory | less -N
这将为您提供可能需要的所有信息,可能是:
sudo dmidecode | grep -A 15 Memory