chek RAM specifications on linux

Subject:

dmidecode --type 17 | more 

ref: https://www.cyberciti.biz/faq/check-ram-speed-linux/

2017-04-04 17:49:40gstlouis

How do I check RAM speed and type (line DDR or DDR2 or DDR3 or DDR4) without opening my computer? I need to purchase RAM and I need to know the exact speed and type installed. How do I find out ram information from a shell prompt?

You need to use biosdecode command line utility. Dmidecode is a tool or dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. The output contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. This command works on Linux, UNIX and *BSD based computers.

 

 

 

How to check ram speed and type on Linux or Unix-like system:

  1. Open the terminal app or log in using ssh.
  2. Type the “sudo dmidecode --type 17” command.
  3. Look out for “Type:” line in the output for ram type and “Speed:” for ram speed.

 

Examples

Open a shell prompt and type the following command as root user:
$ sudo dmidecode --type 17
OR
$ sudo dmidecode --type 17 | more
Sample output:

# dmidecode 2.9 SMBIOS 2.4 present. Handle 0x0018, DMI type 17, 27 bytes Memory Device Array Handle: 0x0017 Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: None Locator: J6H1 Bank Locator: CHAN A DIMM 0 Type: DDR2 Type Detail: Synchronous Speed: 800 MHz (1.2 ns) Manufacturer: 0x2CFFFFFFFFFFFFFF Serial Number: 0x00000000 Asset Tag: Unknown Part Number: 0x5A494F4E203830302D3247422D413131382D Handle 0x001A, DMI type 17, 27 bytes Memory Device Array Handle: 0x0017 Error Information Handle: Not Provided Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: DIMM Set: None Locator: J6H2 Bank Locator: CHAN A DIMM 1 Type: DDR2 Type Detail: None Speed: Unknown Manufacturer: NO DIMM Serial Number: NO DIMM Asset Tag: NO DIMM Part Number: NO DIMM

You can just grep speed and skip all other the details using the following syntax:

dmidecode --type 17 | grep -i speed

Sample outputs:

Speed: 1333 MHz (0.8 ns) Speed: 1333 MHz (0.8 ns)

Say hello to lshw

You can use the following command too:
$ sudo lshw -short -C memory
Sample outputs:

/0/0 memory 64KiB BIOS /0/55/45 memory 1MiB L2 cache /0/55/46 memory 256KiB L1 cache /0/55/47 memory 8MiB L3 cache /0/48 memory 32GiB System Memory /0/48/0 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns) /0/48/1 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns) /0/48/2 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns) /0/48/3 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)

gstlouis
vote
2017-04-04 17:50:11