≡ Menu

dmidecode command

This is an user contributed article.

When it is time to upgrade the memory on a Linux host, it is important to understand the existing memory information of the system, which will help to plan the memory upgrade appropriately without opening server chassis (especially, when you have Linux rack mount server).

What is the current total RAM used in the system?

This can be obtained using free command or from the /proc/meminfo file as shown below. In this example, the current RAM is 1GB.
# free
Sample output:

             total       used       free     shared    buffers     cached
Mem:       2074016    2002592      71424          0     480908     937296
-/+ buffers/cache:     584388    1489628
Swap:      1951888      79116    1872772

You can also display memory ram, info using /proc file, enteR:
# grep MemTotal /proc/meminfo
Sample output:

MemTotal:      1034624 kB

What is the maximum RAM supported by the system?

You can use dmidecode command to query all memory related information from the system DMI table. In this example, the maximum RAM supported by the system is 8 GB as shown below.

# dmidecode -t 16
Sample output:

# dmidecode 2.9
SMBIOS 2.3 present.
Handle 0x1000, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: 8 GB
Error Information Handle: Not Provided
Number Of Devices: 4

How many memory slots are available for expansion?

# dmidecode -t 17 | grep Size
Sample output:

        Size: 512 MB
        Size: 512 MB
        Size: No Module Installed
        Size: No Module Installed


dmidecode can also be used to identify details about several other hardware related information. dmidecode command reads the systems DMI table for the hardware and BIOS information. DMI stands for Desktop Management interface and SMBIOS stands for System Management BIOS.

Distributed Management Task Force maintains the DMI and SMBIOS specification:

biosdecode is a command line utility to parses the BIOS memory and prints information about all structures (or entry points) it knows of. You can find out more information about your hardware such as:
=> IPMI Device
=> Type of memory and speed
=> Chassis Information
=> Temperature Probe
=> Cooling Device
=> Electrical Current Probe
=> Processor and Memory Information
=> Serial numbers
=> BIOS version
=> PCI / PCIe Slots and Speed
=> Much more

biosdecode parses the BIOS memory and prints the following information about all structures :
=> SMBIOS (System Management BIOS)
=> DMI (Desktop Management Interface, a legacy version of SMBIOS)
=> PNP (Plug and Play)
=> ACPI (Advanced Configuration and Power Interface)
=> BIOS32 (BIOS32 Service Directory)
=> PIR (PCI IRQ Routing)
=> 32OS (BIOS32 Extension, Compaq-specific)
=> VPD (Vital Product Data, IBM-specific)
=> FJKEYINF (Application Panel, Fujitsu-specific)

In this tip you will learn about decoding BIOS data (dumping a computer's DMI ) and getting all information about computer hardware without rebooting the server.
[click to continue…]