原文地址:http://blog.sina.com.cn/s/blog_69cc2f0b0100wk5g.html
1、查看内存槽数、那个槽位插了内存,大小是多少
sudo dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Range
或者
dmidecode -t 17
2、查看最大支持内存数
sudo dmidecode|grep -P 'Maximum\s+Capacity'
或者
sudo dmidecode -t 16
3、查看槽位上内存的速率,没插就是unknown。
sudo dmidecode|grep -A16 "Memory Device"|grep 'Speed'
附录:
dmidecode支持的数字参数:
Type Information
----------------------------------------
0 BIOS
1 System
2 BaseBoard
3 Chassis
4 Processor
5 MemoryController
6 MemoryModule
7 Cache
8 PortConnector
9 SystemSlots
10 On BoardDevices
11 OEMStrings
12 SystemConfiguration Options
13 BIOSLanguage
14 GroupAssociations
15 System EventLog
16 PhysicalMemory Array
17 MemoryDevice
18 32-bit MemoryError
19 Memory ArrayMapped Address
20 Memory DeviceMapped Address
21 Built-inPointing Device
22 PortableBattery
23 SystemReset
24 HardwareSecurity
25 System PowerControls
26 VoltageProbe
27 CoolingDevice
28 TemperatureProbe
29 ElectricalCurrent Probe
30 Out-of-bandRemote Access
31 Boot IntegrityServices
32 SystemBoot
33 64-bit MemoryError
34 ManagementDevice
35 ManagementDevice Component
36 ManagementDevice Threshold Data
37 MemoryChannel
38 IPMIDevice
39 PowerSupply