Tuesday, January 12, 2010

Check RAM slot in Linux using dmidecode..

Sometimes.. when a server is running..
It is impossible to check, how many RAM slot still available on this server..
Is quite hard to identify the hardware availability without open up the chasing..

I found out, there is a command called "dmidecode"..
Where it can be grab mostly the information you need..

When run
# dmidecode

can see the server chasing information such as server tag, server model, product model and more...

Let back to our main purpose..
# dmidecode -t -17 | grep Size

to can view the RAM size that been installed and the slot not yet installed RAM.

To check the maximum RAM capacity can installed..
# dmidecode -t 16

Sometimes, may face problem with the command such as No such file or directory..
Which may cause by some module not installed or different distro.

Therefore, ignore the -t 17 or -t 16 when execute and add pipe along with keywords..

# dmidecode | grep Size
same thing can be view, just with extra information which you may not need..

# dmidecode | grep Maximum

Sometimes.. you may forget about the case sensitive letters..
Therefore add the -i to ignore the case sensitive.

# dmidecode | grep -i size
output also same as what you need.

dmidecode can retrieve a lot data..
RAM model, speed also can be retrieve...

It do a really handy works for System Engineer when it come to upgrade devices..


Anonymous said...

Just what I was looking for. Thanks.

Anonymous said...

Thanks a lot for this information.. Though your site came up at 8th or 9th place in google results, fortunately it was the first one I clicked, and got exactly what I was looking for.

Anonymous said...

This is really nice. Cheers.