我忘记了笔记本电脑上安装了多少个RAM模块。我不想拧开它,而是想使用bash在控制台上查找它。我如何收集这些信息?
我忘记了笔记本电脑上安装了多少个RAM模块。我不想拧开它,而是想使用bash在控制台上查找它。我如何收集这些信息?
Answers:
就我而言
#dmidecode -t 16
报告此:
Handle 0x000A, 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: Not Provided
Number Of Devices: 2
我想指出的是,一个模块中只有4 GiB的RAM。该信息通过执行以下操作显示:
# dmidecode -t 17
显示如下:
# dmidecode 2.11
SMBIOS 2.7 present.
Handle 0x000B, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000A
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: None
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown
Handle 0x000C, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000A
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: Hynix/Hyundai
Serial Number: 11111111
Asset Tag: None
Part Number: HMT351S6CFR8C-PB
Rank: Unknown
Configured Clock Speed: 1600 MHz
而且,如您所见,Bank 2已满,Bank 0为空。板上只有两个RAM插槽,但它们必须是双通道。
尽管OP希望避免松动检查,但我强烈建议每个人都这样做,因为命令行探针返回的答案可能会产生误导。在我的笔记本电脑上,命令行探针说我有4个插槽(已使用2个,其中2个为空),但拧开后实际上有2个插槽(也许在其他位置有2个隐藏的插槽,但看不到底部面板):
sudo dmidecode | grep -A 9 "System Information"
System Information
Manufacturer: Micro-Star International Co., Ltd.
Product Name: CX61 0NC/CX61 0ND/CX61 0NF/CX61 0NE
Version: REV:1.0
Serial Number: FFFFFFFF
UUID: 03000200-0400-0500-0006-000700080009
Wake-up Type: Power Switch
SKU Number: To be filled by O.E.M.
Family: To be filled by O.E.M.
# -------
sudo dmidecode -t 16
# dmidecode 2.12
SMBIOS 2.7 present.
Handle 0x0024, 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
# -------
sudo dmidecode -t 17
# dmidecode 2.12
SMBIOS 2.7 present.
Handle 0x0025, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0024
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: 830B
Serial Number: 91D82E7B
Asset Tag: 9876543210
Part Number: M2S4G64CB8HG4N-DI
Rank: 2
Configured Clock Speed: 1600 MHz
Handle 0x0027, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0024
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: ChannelA-DIMM1
Bank Locator: BANK 1
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: [Empty]
Serial Number: [Empty]
Asset Tag: 9876543210
Part Number: [Empty]
Rank: Unknown
Configured Clock Speed: Unknown
Handle 0x0028, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0024
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: 830B
Serial Number: 20DC2E7C
Asset Tag: 9876543210
Part Number: M2S4G64CB8HG4N-DI
Rank: 2
Configured Clock Speed: 1600 MHz
Handle 0x002A, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0024
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: ChannelB-DIMM1
Bank Locator: BANK 3
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: [Empty]
Serial Number: [Empty]
Asset Tag: 9876543210
Part Number: [Empty]
Rank: Unknown
Configured Clock Speed: Unknown
Ubuntu 14.04
(and probably unimplemented)
表示bios /芯片组可以处理4个插槽,但是主板制造商决定不将bios可以支持的2个可能的插槽包括在实际的MB中。由于dmidecode与bios对话,而不是与实际的物理螺钉,螺栓和胶水对话,因此它仅知道dmi表中的内容-它可以处理4个插槽,但其中2个没有信息,因此假设是它们只是被卸载,而不是不存在。
这样可以更轻松地了解您需要了解的内容(为清楚起见,插入了空行):
$ sudo dmidecode -t memory | grep -iE "Size|Type:|Speed"
Error Correction Type: None
Size: No Module Installed
Type: Unknown
Speed: Unknown
Configured Clock Speed: Unknown
Size: 4096 MB
Type: DDR3
Speed: 1600 MHz
Configured Clock Speed: 1600 MHz
Size: No Module Installed
Type: Unknown
Speed: Unknown
Configured Clock Speed: Unknown
Size: 4096 MB
Type: DDR3
Speed: 1600 MHz
Configured Clock Speed: 1600 MHz
我通过以下命令使用:
sudo dmidecode -t 17
或使用sudo dmidecode -t 16
以获得较少的详细信息。