Find in Linux if your installed RAM is ECC

By | October 21, 2017

Sometimes really simple questions are hard to answer. One day I got the question from a coworker: “How do I know if some installed RAM is ECC or not”.
The easiest way is to use dmidecode command that dumps in Linux all the system characteristics. But because I had no idea how to see if a RAM chip is ECC or not I made a comparison.

STEP 1: List the memory specs on a server populated with ECC memory

# dmidecode -t memory
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x1000, DMI type 16, 23 bytes
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: Single-bit ECC
        Maximum Capacity: 16 GB
        Error Information Handle: Not Provided
        Number Of Devices: 2

Handle 0x1100, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 8192 MB
        Form Factor: DIMM
        Set: None
        Locator: PROC  1 DIMM  1
        Bank Locator: Not Specified
        Type: DDR3
        Type Detail: Synchronous Unbuffered (Unregistered)
        Speed: 1333 MT/s
        Manufacturer: UNKNOWN
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: NOT AVAILABLE
        Rank: 2
        Configured Clock Speed: 1333 MT/s
        Minimum Voltage: 1.5 V
        Maximum Voltage: 1.5 V
        Configured Voltage: 1.5 V

Handle 0x1101, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 8192 MB
        Form Factor: DIMM
        Set: 1
        Locator: PROC  1 DIMM  2
        Bank Locator: Not Specified
        Type: DDR3
        Type Detail: Synchronous Unbuffered (Unregistered)
        Speed: 1333 MT/s
        Manufacturer: UNKNOWN
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: NOT AVAILABLE
        Rank: 2
        Configured Clock Speed: 1333 MT/s
        Minimum Voltage: 1.5 V
        Maximum Voltage: 1.5 V
        Configured Voltage: 1.5 V

STEP 2: List the memory specs on a machine populated with NON ECC memory

]# dmidecode -t memory
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.

Handle 0x0011, DMI type 16, 15 bytes
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: None
        Maximum Capacity: 4 GB
        Error Information Handle: Not Provided
        Number Of Devices: 2

Handle 0x0012, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0011
        Error Information Handle: No Error
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 2048 MB
        Form Factor: SODIMM
        Set: 1
        Locator: M1
        Bank Locator: Bank 0
        Type: DDR2
        Type Detail: Synchronous
        Speed: 800 MT/s
        Manufacturer: AD00000000000000
        Serial Number: 6140466F
        Asset Tag: 0918
        Part Number: HYMP125S64CP8-S6

Handle 0x0013, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0011
        Error Information Handle: No Error
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 4096 MB
        Form Factor: SODIMM
        Set: 1
        Locator: M2
        Bank Locator: Bank 1
        Type: DDR2
        Type Detail: Synchronous
        Speed: 800 MT/s
        Manufacturer: 0000000000000000
        Serial Number: 6010B403
        Asset Tag: 1110
        Part Number: HMP351S6AFR8C-S6

We can see in the first dump that the motherboard supports ECC:

Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: Single-bit ECC
        Maximum Capacity: 16 GB
        Error Information Handle: Not Provided
        Number Of Devices: 2

and in the second ECC is not supported. This is what I expected as the first machine is a HP Server and the second is a Dell laptop

Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: None
        Maximum Capacity: 4 GB
        Error Information Handle: Not Provided
        Number Of Devices: 2

But looking at the individual DIMM entries from the dumps (2 DIMMs on HP server and 2 DIMMs on the laptop) there is no explicit ECC or Error Correction Type Entry field.

The secret entry that makes the difference is this:

On HP server DIMM1:

Handle 0x1100, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 8192 MB

On the Dell Laptop DIMM1:

Handle 0x0012, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0011
        Error Information Handle: No Error
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 2048 MB
        Form Factor: SODIMM

As you can see on the ECC DIMM the reported Total Width is 72 bits and on the non ECC the reported Total Width is 64 bits. So this is our cue. In case of ECC memory besides the normal 64 bits (Data Width) we have some extra 8 bits for Error Correction.

Contribute to this site maintenance !

This is a self hosted site, on own hardware and Internet connection. The old, down to earth way 🙂. If you think that you found something useful here please contribute. Choose the form below (default 1 EUR) or donate using Bitcoin (default 0.0001 BTC) using the QR code. Thank you !

€1.00

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.