How to get the CPU speed from the hardware in Linux with the dmidecode command.

Posted: August 6, 2017. At: 11:09 PM. This was 2 months ago. Post ID: 6093

How to get the CPU speed from the hardware in Linux with the dmidecode command. This command below will suffice.

[root@localhost jason]# dmidecode --type 17 | grep -i speed
        Speed: 1333 MT/s
        Configured Clock Speed: 1333 MT/s
        Speed: 1333 MT/s
        Configured Clock Speed: 1333 MT/s
        Speed: Unknown
        Configured Clock Speed: Unknown
        Speed: Unknown
        Configured Clock Speed: Unknown

And this is how to see what the maximum amount of RAM that your motherboard can use with the command-line.

[root@localhost jason]# dmidecode --type 16
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
 
Handle 0x000F, DMI type 16, 23 bytes
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: None
        Maximum Capacity: 32 GB
        Error Information Handle: Not Provided
        Number Of Devices: 4

How do we see how much ram is installed in a computer? Easy, just use this command.

[root@localhost jason]# dmidecode --type 19
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
 
Handle 0x0016, DMI type 19, 31 bytes
Memory Array Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x002FFFFFFFF
        Range Size: 12 GB
        Physical Array Handle: 0x000F
        Partition Width: 4

Get information about each RAM slot with dmidecode.

[root@localhost jason]# dmidecode --type 20
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
 
Handle 0x0011, DMI type 20, 35 bytes
Memory Device Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x000FFFFFFFF
        Range Size: 4 GB
        Physical Device Handle: 0x0010
        Memory Array Mapped Address Handle: 0x0016
        Partition Row Position: 1
        Interleave Position: 1
        Interleaved Data Depth: 1
 
Handle 0x0013, DMI type 20, 35 bytes
Memory Device Mapped Address
        Starting Address: 0x00100000000
        Ending Address: 0x002FFFFFFFF
        Range Size: 8 GB
        Physical Device Handle: 0x0012
        Memory Array Mapped Address Handle: 0x0016
        Partition Row Position: 1
        Interleave Position: 1
        Interleaved Data Depth: 1

To get more in-depth information about all of your RAM slots; use this command.

[root@localhost jason]# dmidecode --type 17

And this shows the amount of RAM I have installed. The Ending Address is 0x0017FFFFFFF, which is 6442450943 in decimal.

[root@localhost jason]# dmidecode --type 19
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
 
Handle 0x0016, DMI type 19, 31 bytes
Memory Array Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x002FFFFFFFF
        Range Size: 12 GB
        Physical Array Handle: 0x000F
        Partition Width: 4

This can be shortened like this. Lovely use of sed.

[root@localhost jason]# dmidecode --type 19 | grep Range | sed s/Range/RAM\ Amount:/gi;
        RAM Amount: Size: 12 GB

This dmidecode parameter will get information about your computer case. Although it got nothing much from mine…

[root@localhost jason]# dmidecode --type 3
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
 
Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
        Manufacturer: To Be Filled By O.E.M.
        Type: Desktop
        Lock: Not Present
        Version: To Be Filled By O.E.M.
        Serial Number: To Be Filled By O.E.M.
        Asset Tag: To Be Filled By O.E.M.
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Safe
        Security Status: None
        OEM Information: 0x00000000
        Height: Unspecified
        Number Of Power Cords: 1
        Contained Elements: 0
        SKU Number: To be filled by O.E.M.

And that is how you get information out of your computer with the dmidecode command. Very versatile and easy to use.

No comments have been made. Use this form to start the conversation :)

Leave a Reply