linux 查看 内存条具体信息, 几根内存条 命令
sudo dmidecode | grep -A16 "Memory Device$"

需要root 权限..

[life@localhost mp3blaster-3.2.5]$ sudo dmidecode grep -A16 "Memory Device$"
[sudo] password for life:
Memory Device
Array Handle: 0x000F
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 256 MB
Form Factor: DIMM
Set: 1
Locator: DIMM1
Bank Locator: DIMM1
Type: DRAM
Type Detail: Synchronous
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified

Memory Device
Array Handle: 0x000F
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: DIMM
Set: 1
Locator: DIMM2
Bank Locator: DIMM2
Type: DRAM
Type Detail: Synchronous
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
--
Memory Device
Array Handle: 0x000F
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: 1
Locator: DIMM3
Bank Locator: DIMM3
Type: DRAM
Type Detail: Unknown
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified

1.内存条数:
dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Range

2.内存最大容量:
dmidecode|grep -P 'Maximum\s+Capacity'

3.内存频率:
dmidecode|grep -A16 "Memory Device"|grep Speed