Find Linux RAM Information Command

by on February 15, 2012 · 13 comments· LAST UPDATED February 27, 2012

in

How do I find out ram information under Linux operating systems?

You can use the following commands to find information about RAM under Linux operating systems.

Find Used and Free RAM Info Command

You need to use the free command:
# free
# free -m

             total       used       free     shared    buffers     cached
Mem:          7930       4103       3826          0         59       2060
-/+ buffers/cache:       1983       5946
Swap:        15487          0      15487

(Fig. 01: Display amount of free and used memory in the system)

Find Out Ram Speed, Make, Form Factor, Type and Other Information

You need to use the dmidecode command:
# dmidecode --type 17
OR
# dmidecode --type memory
OR
# dmidecode -t 17
Sample outputs:

 # dmidecode 2.11
SMBIOS 2.5 present.
Handle 0x0017, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM1A
	Bank Locator: Bank1
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: 5185
	Serial Number: 05009F22
	Asset Tag: Not Specified
	Part Number: 72T232220HFA3SB

(Fig. 01: Finding RAM Speed, Manufacturer, Type such as DDR2, and other info)

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 13 comments… read them below or add one }

1 ray February 26, 2012 at 2:30 am

free -m
dmidecode

Reply

2 Paul February 26, 2012 at 3:05 am

Hi,

probably just a typo, it should be:

# dmidecode –type 17

Thanks for very informative site,

Paul

Reply

3 nixCraft February 27, 2012 at 1:32 am

Thanks for the heads up! The faq has been updated.

Reply

4 Josh March 5, 2012 at 4:22 pm

htop

is also a good command if you like a graphical display of RAM

Reply

5 Daniel Vieceli March 13, 2012 at 2:08 am

Good , i like htop.

Reply

6 Collin B April 10, 2012 at 6:18 pm

less /proc/meminfo will give you detailed information on your systems memory. This is where all other utilities are pulling the information from.

Reply

7 Ron October 26, 2012 at 12:03 am

If dmidecode pulls RAM info from /proc/meminfo then it’s using some super-dodecahedral secret decoder ring because “speed” and “type” aren’t there in “cat /proc/meminfo”.

Reply

8 بدور June 19, 2013 at 5:04 pm

عندي سؤال اذا ممكن حدا يجاوبني
how display information in ram?

Reply

9 Ron June 19, 2013 at 8:48 pm

Are you asking how to display the *contents* of RAM?

Reply

10 Kevin Chadwick November 14, 2013 at 5:48 pm

So now you need to install and lookup a command to find out such basic information as the memory type when Linux used to tell you in dmesg and the BSD’s still do.

I guess ‘modern’ Linux get’s more like windows every day. Will we be seeing vendor and product id codes in ALL cases rather than names next and hex error codes and unusable interfaces such as the registry requiring a second screen with a web browser to interpret becoming the norm.

Reply

11 Sairaju jena January 8, 2014 at 8:13 am

nice code.

Reply

12 Ron January 8, 2014 at 7:06 pm

such basic information as the memory type when Linux used to tell you in dmesg

That must have been a *long* time ago, since I’ve been using Linux since around Y2K (not for that reason though) and don’t remember dmesg ever having the level of detail that dmidecode has.

Reply

13 Pili February 21, 2014 at 1:31 am

Ron > those are called “Super Cow Powers”

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: