1. Linux 查看内存的插槽数,已经使用多少插槽。每条内存多大,已使用内存多大:dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Range 
  2.  
  3.    查看内存支持的最大内存容量 
  4.     1.dmidecode|grep -P 'Maximum\s+Capacity' 
  5.     2.MaximumCapacity:64GB3.Linux 
  6.     查看内存的频率 
  7.     1.dmidecode|grep -A16 "Memory Device" 
  8.     2.dmidecode|grep -A16 "Memory Device"|grep 'Speed' 
 
  
  1. [root@localhost ~]# dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Range 
  2.     Size: 4096 MB 
  3.     Size: 4096 MB 
  4. [root@localhost ~]# dmidecode|grep -P 'Maximum\s+Capacity' 
  5.     Maximum Capacity: 4 GB 
  6. [root@localhost ~]# dmidecode|grep -A16 "Memory Device" 
  7. Memory Device 
  8.     Array Handle: 0x1000 
  9.     Error Information Handle: Not Provided 
  10.     Total Width: 64 bits 
  11.     Data Width: 64 bits 
  12.     Size: 4096 MB 
  13.     Form Factor: DIMM 
  14.     Set: None 
  15.     Locator: DIMM_1 
  16.     Bank Locator: Not Specified 
  17.     Type: DDR3 
  18.     Type Detail: Synchronous 
  19.     Speed: 800 MHz 
  20.     Manufacturer: 019800000000     
  21.     Serial Number: A109897B 
  22.     Asset Tag: 05114000 
  23.     Part Number: 99P5471-004.A01LF  
  24. -- 
  25. Memory Device 
  26.     Array Handle: 0x1000 
  27.     Error Information Handle: Not Provided 
  28.     Total Width: 64 bits 
  29.     Data Width: 64 bits 
  30.     Size: 4096 MB 
  31.     Form Factor: DIMM 
  32.     Set: None 
  33.     Locator: DIMM_2 
  34.     Bank Locator: Not Specified 
  35.     Type: DDR3 
  36.     Type Detail: Synchronous 
  37.     Speed: 800 MHz 
  38.     Manufacturer: 019800000000     
  39.     Serial Number: 1F30B3E4 
  40.     Asset Tag: 05114300 
  41.     Part Number: 99P5471-004.A01LF  
  42. -- 
  43. Memory Device Mapped Address 
  44.     Starting Address: 0x00000000000 
  45.     Ending Address: 0x001FFFFFFFF 
  46.     Range Size: 8 GB 
  47.     Physical Device Handle: 0x1100 
  48.     Memory Array Mapped Address Handle: 0x1300 
  49.     Partition Row Position: 1 
  50.     Interleave Position: 1 
  51.     Interleaved Data Depth: 1 
  52.  
  53. Handle 0x1401, DMI type 20, 19 bytes 
  54. Memory Device Mapped Address 
  55.     Starting Address: 0x00000000000 
  56.     Ending Address: 0x001FFFFFFFF 
  57.     Range Size: 8 GB 
  58.     Physical Device Handle: 0x1101 
  59.     Memory Array Mapped Address Handle: 0x1300 
  60.     Partition Row Position: 1 
  61.     Interleave Position: 2 
  62.     Interleaved Data Depth: 1 
  63.  
  64. Handle 0x1410, DMI type 126, 19 bytes 
  65. Inactive 
  66.  
  67. Handle 0x1800, DMI type 24, 5 bytes 
  68. Hardware Security 
  69.     Power-On Password Status: Enabled 
  70.     Keyboard Password Status: Not Implemented 
  71. [root@localhost ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed' 
  72.     Speed: 800 MHz 
  73.     Speed: 800 MHz 
  74. [root@localhost ~]#