Linux + Administrator = Linuxator

Linux Adminstrator’s blog

  • Blog Stats

    • 19,755 hits

Using dmidecode to find out what memory chips you have

Posted by Maciej Sołtysiak on October 28, 2008

Every once in a while admins need to add more RAM to the server. If you don’t have the exact specs handy (not everyone has a CMDB to do a quick lookup) you need to somehow get the crucial information using software. Here’s how I do it using dmidecode.

The story

For starters it’s good to know your motherboard details. dmidecode can output data from many sections called DMI types. Actually if you take a look into man 8 dmidecode you’ll see that there are 39 of those, including things like Power Supply, OEM Strings, Processor, Chassis or Cache. There also is a type called Base Board Information. Its numeric type is 2 and it is actually very easy to output just that with the following command:

root@dns:~# dmidecode -t 2
# dmidecode 2.9
SMBIOS 2.4 present.

Handle 0x0005, DMI type 2, 16 bytes
Base Board Information
        Manufacturer: Intel
        Product Name: S3000AH
        Version: D40859-208
        Serial Number: AZAY73900054
        Asset Tag: Not Specified
        Features:
                Board is a hosting board
                Board is replaceable
        Location In Chassis: Not Specified
        Chassis Handle: 0x0000
        Type: Motherboard
        Contained Object Handles: 0

Here we can see that I have an Intel S3000AH motherboard. With that I can find out the exact specifications and see that it supports:

Dual memory-channel, four DIMM slots for DDR2
533/667 MHz
Unbuffered ECC/non-ECC DIMMs (8 GB Max)

So far so good, I know my limits, let’s sniff around some more for Physical Memory Array (type 16):

root@dns:~# dmidecode -t 16
# dmidecode 2.9
SMBIOS 2.4 present.

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

This confirmed the ECC type, Maximum Capacity and number of memory banks/slots. Good! Now let’s see what chips are actually in there? Let’s look for Memory Device types.

root@dns:~# dmidecode -t 17
# dmidecode 2.9
SMBIOS 2.4 present.

Handle 0x0023, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0022
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 1024 MB
        Form Factor: DIMM
        Set: None
        Locator: J8J1
        Bank Locator: CHAN A DIMM 1
        Type: DDR2
        Type Detail: Synchronous
        Speed: 533 MHz (1.9 ns)
        Manufacturer: 0x7F98000000000000
        Serial Number: 0x813625B6
        Asset Tag: Unknown
        Part Number: 0x393930353332312D3030312E4130334C4600

Handle 0x0025, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0022
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: No Module Installed
        Form Factor: DIMM
        Set: None
        Locator: J8J2
        Bank Locator: CHAN A DIMM 2
        Type: DDR2
        Type Detail: None
        Speed: Unknown
        Manufacturer: NO DIMM
        Serial Number: NO DIMM
        Asset Tag: NO DIMM
        Part Number: NO DIMM

Handle 0x0026, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0022
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 1024 MB
        Form Factor: DIMM
        Set: None
        Locator: J9J1
        Bank Locator: CHAN B DIMM 1
        Type: DDR2
        Type Detail: Synchronous
        Speed: 533 MHz (1.9 ns)
        Manufacturer: 0x7F98000000000000
        Serial Number: 0x82363EB6
        Asset Tag: Unknown
        Part Number: 0x393930353332312D3030312E4130334C4600

Handle 0x0028, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x0022
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: No Module Installed
        Form Factor: DIMM
        Set: None
        Locator: J9J2
        Bank Locator: CHAN B DIMM 2
        Type: DDR2
        Type Detail: None
        Speed: Unknown
        Manufacturer: NO DIMM
        Serial Number: NO DIMM
        Asset Tag: NO DIMM
        Part Number: NO DIMM

Now here we have 4 sections. First two are Channel A and the other two are Channel B. This output shows I have one 1GB 533 MHz DDR in the first bank of each channel, totalling 2GB of RAM. Now I can go shopping!

Conclussion

When you are in need of information about hardware specs on a Linux box, you can use dmidecode to fetch all you need without actually having to be near the machine or have any documentation. All the details I needed with RAM in this story could be easily provided by one dmidecode -t 2,16,17. Hope you find that useful. I did :-)

Advertisement

11 Responses to “Using dmidecode to find out what memory chips you have”

  1. [...] Comments (RSS) « Using dmidecode to find out what memory chips you have [...]

  2. [...] 32-bit) I decided to upgrade RAM from current 2GB to 4GB or more. That's why last week I was first checking out if the motherboard and chipset can actually handle 4GB and more using dmidecode. They do, so now [...]

  3. Phlogi said

    Thanks, thats awesome :)

  4. Mereo said

    Good info… but need to recommend you a comment SPAM filter because it’s crawling with them.

  5. Dayvid V. said

    Nice Post.
    Right now I’m writting am app that get information about a lot of devices.
    I’m using libhal, libhd, libparted, hwinfo, dmidecode, ifconfig, (…)!
    But with memory, I am having one trouble … what about dmidecode -t 6?
    there are some ‘modules’ that I just can’t figure it out what REALLY they are!

  6. Hi Dayvid!

    dmidecode -t 6 provides wrong data for me on one HW box, on other HWs and VMs I have it returns nothing. For me this one’s pretty useless. Good luck with your app!

    Maciej

  7. [...] Install dmidecode and read this information: http://linuxator.wordpress.com/2008/10/28/using-dmidecode-to-find-out-what-memory-chips-you-have/ [...]

  8. omar said

    I just used the dmicode -16 to find out the max amount in my clevo and here my output:

    (please don’t tell me I have 32 GB upgrade space in this machine)

    SMBIOS 2.7 present.

    Handle 0×0007, DMI type 16, 23 bytes
    Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 32 GB
    Error Information Handle: 0×0029
    Number Of Devices: 4

    • Why? That’s what dmidecode … decodes. You should have up to 4 slots, with maximum total of 32GB. Isn’t that correct?

      You could use dmidecode -t 2 to check your product name against specification on vendor’s website.
      Hope that helps!

  9. omar said

    oops… dmidecode, I typed it wrong

  10. Thanks, glad to hear :-)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.