If you wish to determine how much memory is installed in a Linux system, or perhaps the maximum amount of memory configurable on a system and the exact number and size of the memory DIMMs installed in the system, then you should use the dmidecode command.
The dmidecode command has a type option ( -t ), that can be used to indicate the type of device you wish to see detailed information for, like bios, system, baseboard, chassis, processor, cache, connector, slot and ... memory.
To retrieve the memory information, run the following command:
You should get an output similar like the one below, but it can obviously differ per Linux system, depending on the hardware (model) and the installed memory.# dmidecode -t memory
In the output above you can see that this particular system has a "Maximum Capacity" of 16 GB, and up to two "Number of Devices" can be installed.# dmidecode -t memory # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0047, DMI type 16, 23 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 16 GB Error Information Handle: Not Provided Number Of Devices: 2 Handle 0x0048, DMI type 17, 34 bytes Memory Device Array Handle: 0x0047 Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 4096 MB Form Factor: SODIMM Set: None Locator: DIMM A Bank Locator: Not Specified Type: DDR3 Type Detail: Synchronous Speed: 1600 MT/s Manufacturer: Hynix/Hyundai Serial Number: 3248A01B Asset Tag: 9876543210 Part Number: HMT351S6CFR8C-PB Rank: 2 Configured Memory Speed: 1600 MT/s Handle 0x004A, DMI type 17, 34 bytes Memory Device Array Handle: 0x0047 Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 4096 MB Form Factor: SODIMM Set: None Locator: DIMM B Bank Locator: Not Specified Type: DDR3 Type Detail: Synchronous Speed: 1600 MT/s Manufacturer: Kingston Serial Number: BA33020F Asset Tag: 9876543210 Part Number: KFYHV1-HYC Rank: 2 Configured Memory Speed: 1600 MT/s
Below it, you see the currently installed Memory Devices, the first one with a size of 4096 MB in slot DIMM A, with the exact Manufacturer and the Part Number listed. In slot DIMM B, you can also see another DIMM of 4096 MB installed, which is of a different vendor.
This information tells you, that the system shown above can be configured up to 16 GB of memory, but currently has two 4 GB memory DIMMs, thus 8 GB installed. In this case, upgrading the system to 16 GB of memory would mean replacing the two 4 GB memory DIMMs with two 8 GB memory DIMMs.
If you found this useful, here's more on the same topic(s) in our blog:
- IP address service processors
- Command line update of HMC
- Red Hat Cluster Suite commands
- Integrated Virtual Ethernet adapter
- Installing VNC server
UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.
Interested in learning more?
Interested in learning more?