I want to add more RAM to my server running Ubuntu Linux. How do I find out my current RAM chip information such as its speed, type and manufacturer name within a Linux system without opening the case?
You need to use the dmidecode command which is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system's hardware components (such as RAM), as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve hardware information without having to probe for the actual hardware. Open a command-line terminal (select Applications > Accessories > Terminal), and then type:
$ sudo dmidecode --type memory
OR
# dmidecode --type memory | less
OR
$ sudo dmidecode --type 17
Sample outputs:
# dmidecode 2.10 SMBIOS version fixup (2.51 -> 2.6). SMBIOS 2.6 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: 4 Handle 0x0012, DMI type 17, 27 bytes Memory Device Array Handle: 0x0011 Error Information Handle: No Error Total Width: 72 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: 1 Locator: DIMM#1A Bank Locator: Bank 1 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0013, DMI type 17, 27 bytes Memory Device Array Handle: 0x0011 Error Information Handle: No Error Total Width: 72 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: 1 Locator: DIMM#2A Bank Locator: Bank 2 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0014, DMI type 17, 27 bytes Memory Device Array Handle: 0x0011 Error Information Handle: No Error Total Width: 72 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: 1 Locator: DIMM#1B Bank Locator: Bank 1 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Handle 0x0015, DMI type 17, 27 bytes Memory Device Array Handle: 0x0011 Error Information Handle: No Error Total Width: 72 bits Data Width: 64 bits Size: 2048 MB Form Factor: DIMM Set: 1 Locator: DIMM#2B Bank Locator: Bank 2 Type: DDR2 Type Detail: Synchronous Speed: 667 MHz Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 5 comments… read them below or add one }
This is very useful, thanks! I tested the commands out on OpenSuSe 11.3 and they work great. This is a lot quicker than having to start a hardware management app to find out what dimm slots are in use before doing a memory upgrade.
thx – good howto; for me i needed to run dmidcode -t; then selected memory; then grep’d for each ram chip to see how it was detected (trying to mix 2GB and 4GB dimms
)
dmidecode -t memory| grep -e Handle -e Size
:)
Thanks! That was helpful! If you just want to check for free memory you can do “free -m”
The very thing I was looking for. Thanks.
As a general information, “Maximum Capacity” or “Maximum Memory Module Size” and “Maximum Total Memory Size” may not provide true information. I ran this command on a PC with two 1GB memory modules installed (totalling 2GB RAM, two slots available overall), yet dmidecode reported that the system would allow only 512MB per module, and maximum of 1024MB.
It is actually rather general behavior, that numbers drags behind (or wont be updated at all), when it comes to the amount of maximum installable memory listed in the datasheets. Usually the newer memory modules works just fine even if the totalling amount goes above listed numbers – as long as the newer memory specs otherwise match the requirements. As an example, PC2-5300 1024MB memory modules fits and works with the abovementioned PC just fine, it’s just that in the days when the motherboard was published, the available memory size for the particular memory types compatible was not higher than 512MB per module.
Wow, thanks! I’m happy to find the screwdriver and open up the case but I knew there had to be a better way to get all the data.