SUBSCRIBE via RSS

HOW-TO: Confirm Free Memory Slots on your Server (Linux)

Often times, we system administrators let our fingers do the walking.. sometimes, literally. This is true for just about every activity involving administration. The only time when the system administrator meets face to face with the physical hardware they administer is when they need to replace failed parts or when upgrading hardware.

Upgrading though needs a few pre-requisites that need to be planned out in advance. Memory upgrades being an example, one needs to know what kind of memory is installed on the server, and if there are free memory slot(s). The last mentioned being a very important tidbit of information. A memory upgrade is not possible without free memory slots. This is a major gotcha that you need to avoid.

In the Linux world, this can be done in many ways. Let's discuss two of the more commonly used commands -- dmidecode and lshw.

Using dmidecode. Almost every linux box I have administered came with dmidecode installed by default. It is a rare encounter to find a box without dmidecode installed.

Launch a command terminal and run "sudo dmidecode --type memory". Running dmidecode by itself will spew out a lot of information regarding your machine. Putting the arguments "--type memory", singles out memory devices, keeping the needed info only.

Another argument that will limit the output to just memory listing is "-t 17". These commands will be showing a similar output as below.

dmidecode memory slot populated

As you can see from the above example, DIMM Slot #1 is populated with a 2GB DDR2-800 module. Even the part number and serial of the memory module is detected.

How about when the slot is empty? Take a look at the screenshot below for the output of dmidecode when a slot is empty.

dmidecode memory slot empty

Using lshw. Another very useful command is lshw. It will display all the installed hardware on the system. And just like dmidecode, you may choose to run it only to display or single out memory devices.

Launch a command prompt and run "sudo lshw". Adding "-C memory" or "-class memory" will limit the display to just the memory slots and modules.

lshw class memory

There you go, plan the memory upgrades properly given the above commands. They ensure not only having empty memory slots to fill, but also display the proper memory module to install. Given the above information, you can never go wrong with the upgrade.

You might also be interested in:

Feedback

We at pimp-my-rig strive to keep on improving, help us reach that goal by leaving comments or constructive criticisms. Don't miss out on our next feature -- subscribe via RSS (What is RSS?).

Share This

0 comments: