
Get memory population in Linux
Created: 2018-08-09 22:29:31 | Last modified: 2020-09-22 22:40:35Access: Read | Views: 102 | Rating: +1 | Tags: linux memory server
A list of commands to get what memory modules are populated in Linux. This is useful for knowing what to install when installing additional memory in a server, pc or laptop without shutting down to open the hood.
If you already have a server installed and running and need to get the memory population and part numbers you can use dmidecode with a few options you can get this information.
Get a list of the memory arrays inside a server/pc/laptop
dmidecode -t 16
Get a full list of the memory bays inside a server/pc/laptop
dmidecode -t memory
Get a list of free memory bays inside a server/pc/laptop (as above but extracted relevant information)
dmidecode -t memory | grep -i size
Example. Get a list unpopulated memory slots in a server
#> dmidecode -t memory | grep -i size
Size: 8192 MB
Size: 8192 MB
Size: No Module Installed
Size: 8192 MB
Size: 8192 MB
Size: No Module Installed
Size: 8192 MB
Size: 8192 MB
Size: No Module Installed
Size: 8192 MB
Size: 8192 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: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
I have a total size of 64GB of memory, since this server only has one CPU I can populate another 4 * 8GB modules to increase the total RAM size to 96GB