Linux get used and unused RAM slots details with dmidecode

With dmidecode we can get number of used and unused RAM slots details on mother board.

Following is the command (We have to run dmidecode command with sudo/root permission):

$ dmidecode -t 17 | grep "Size:"

Output:

Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: 2048 MB
Size: 2048 MB
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: 2048 MB
Size: 2048 MB

Above output shows that there are 4 used slots and 12 unused slots.

To get number of available RAM slots:

$ dmidecode -t 17 | grep -c "Size:"

or

$ dmidecode -t 17 | grep "Size:" | wc -l

Output:

16

-Sany

About these ads

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 )

Google+ photo

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

Connecting to %s