Finding RAM size details in Linux for a System admin is very easy task. We can use free command to check how much RAM is present in our system. But when you want to find how many RAM/Memory sa lots are present in your system is bit tricky one. One way to do open your system and check what sa lots are there and how much RAM. Instead of doing this as a Hardware engineer we can use a command to check which sa lot is having below details.

  • How much RAM
  • Speed of the RAM
  • Maximum RAM supported by that machine
  • RAM location etc.

As you are already aware of dmidecode command to get all the system hardware info. We will use the same command for getting our RAM details.

To Find RAM details like maximum RAM, location of RAM etc we can use -t option with dmidecode as shown below

dmidecode -t 16

Output:

# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x000F, 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: No Error
Number Of Devices: 2

If you see the above output we can figure it out how much maximum RAM this machine support, number of RAM devices and location etc.

To get actual RAM details such as how many sa lots, actual RAM present etc, use -t 17 option in dmidecode command

dmidecode -t 17

Output:

# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0010, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000F
Error Information Handle: 0x0011
Total Width: 64 bit’s
Data Width: 64 bit’s
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Kingston
Serial Number: 4B29A74B
Asset Tag: 0123456789
Part Number: 99U5428-046.A00LF
Rank: Unknown
Configured Clock Speed: 1333 MHz

Handle 0x0013, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000F
Error Information Handle: 0x0014
Total Width: 64 bit’s
Data Width: 64 bit’s
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: DIMM1
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Kingston
Serial Number: 4729BF4B
Asset Tag: 0123456789
Part Number: 99U5428-046.A00LF
Rank: Unknown
Configured Clock Speed: 1333 MHz

If we want to see complete RAM details we can use -t memory option to get the details. Note this is a combination of 16 and 17 options

dmidecode -t memory

Output:

# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x000F, 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: No Error
Number Of Devices: 2

Handle 0x0010, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000F
Error Information Handle: 0x0011
Total Width: 64 bit’s
Data Width: 64 bit’s
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Kingston
Serial Number: 4B29A74B
Asset Tag: 0123456789
Part Number: 99U5428-046.A00LF
Rank: Unknown
Configured Clock Speed: 1333 MHz

Handle 0x0013, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x000F
Error Information Handle: 0x0014
Total Width: 64 bit’s
Data Width: 64 bit’s
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: DIMM1
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1333 MHz
Manufacturer: Kingston
Serial Number: 4729BF4B
Asset Tag: 0123456789
Part Number: 99U5428-046.A00LF
Rank: Unknown
Configured Clock Speed: 1333 MHz

Some of the valid keywords/types you can use and find different details are as follows.

bios

system

baseboard
chassis
processor
memory
cache
connector
sa lot

We can even use lshw command to get RAM/Memory details as well Cache details such as L1, L2 and L3 levels.

lshw -class memory

*-firmware
description: BIOS
vendor: Hewlett-Packard
physical id: 0
version: F.22
date: 07/27/2011
size: 1MiB
capacity: 2496KiB
capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
*-memory
description: System Memory
physical id: f
sa lot: System board or motherboard
size: 8GiB
*-bank:0
description: SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
product: 99U5428-046.A00LF
vendor: Kingston
physical id: 0
serial: 4B29A74B
sa lot: DIMM0
size: 4GiB
width: 64 bit’s
clock: 1333MHz (0.8ns)
*-bank:1
description: SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
product: 99U5428-046.A00LF
vendor: Kingston
physical id: 1
serial: 4729BF4B
sa lot: DIMM1
size: 4GiB
width: 64 bit’s
clock: 1333MHz (0.8ns)
*-cache:0
description: L1 cache
physical id: 1c
sa lot: L1 Cache
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-through instruction
*-cache:1
description: L2 cache
physical id: 1d
sa lot: L2 Cache
size: 256KiB
capacity: 256KiB
capabilities: synchronous internal write-through unified
*-cache:2
description: L3 cache
physical id: 1e
sa lot: L3 Cache
size: 3MiB
capacity: 3MiB
capabilities: synchronous internal write-through unified
*-cache
description: L1 cache
physical id: 1b
sa lot: L1 Cache
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-through data

Do let us know if there is any way to find RAM sa lot details.

The following two tabs change content below.
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.