Find The Ram Speed in Linux from a CLI Shell

Here is the next in my series of posts as I tweak the new tools server to reach its full potential. I recently added a Intel i7 965 Extreme chip to the server and I am trying to get all the kinks ironed out. One thing I suspect is that the ram is not operating at its full potential. Both the ram and the chip list that they are capable of reaching a 1600 MHz speed so I want to get them running at that speed. Normally these things are fairly easy in Windows where we have a GUI and all kinds of fancy oveclockers tools but as you know from previous articles this server is a extreme definition of hybrid and it also runs a server version of Cent OS so we have no GUI. This has brought me to discover many new and interesting Linux CLI tools. Today I will show two different ways to check your ram speed and also get some other useful information.

The first tool I found was called dmidecode and its man page is here

On my system the tool was already installed. It actual gives lots of useful BIOS related information however I was only concerned with the ram. The out put isĀ arranged in types so ram is type 17.

Issue the command with type 17 as the argument:

bash

  1. [root@tools ~]# sudo dmidecode --type 17
  2. # dmidecode 2.10
  3. SMBIOS 2.5 present.
  4.  
  5. Handle 0x0011, DMI type 17, 27 bytes
  6. Memory Device
  7.         Array Handle: 0x000F
  8.         Error Information Handle: Not Provided
  9.         Total Width: 72 bits
  10.         Data Width: 64 bits
  11.         Size: 2048 MB
  12.         Form Factor: DIMM
  13.         Set: None
  14.         Locator: DIMM0
  15.         Bank Locator: BANK0
  16.         Type: Other
  17.         Type Detail: Other
  18.         Speed: 1333 MHz
  19.         Manufacturer: Corsair
  20.         Serial Number: 00000000
  21.         Asset Tag: AssetTagNum0
  22.         Part Number: CMD12GX3M6A1600C8
  23.  
  24. Handle 0x0013, DMI type 17, 27 bytes
  25. Memory Device
  26.         Array Handle: 0x000F
  27.         Error Information Handle: Not Provided
  28.         Total Width: 72 bits
  29.         Data Width: 64 bits
  30.         Size: 2048 MB
  31.         Form Factor: DIMM
  32.         Set: None
  33.         Locator: DIMM1
  34.         Bank Locator: BANK1
  35.         Type: Other
  36.         Type Detail: Other
  37.         Speed: 1333 MHz
  38.         Manufacturer: Corsair
  39.         Serial Number: 00000000
  40.         Asset Tag: AssetTagNum1
  41.         Part Number: CMD12GX3M6A1600C8
  42.  
  43. Handle 0x0015, DMI type 17, 27 bytes
  44. Memory Device
  45.         Array Handle: 0x000F
  46.         Error Information Handle: Not Provided
  47.         Total Width: 72 bits
  48.         Data Width: 64 bits
  49.         Size: 2048 MB
  50.         Form Factor: DIMM
  51.         Set: None
  52.         Locator: DIMM2
  53.         Bank Locator: BANK2
  54.         Type: Other
  55.         Type Detail: Other
  56.         Speed: 1333 MHz
  57.         Manufacturer: Manufacturer02
  58.         Serial Number: 00000000
  59.         Asset Tag: AssetTagNum2
  60.         Part Number:
  61.  
  62. Handle 0x0017, DMI type 17, 27 bytes
  63. Memory Device
  64.         Array Handle: 0x000F
  65.         Error Information Handle: Not Provided
  66.         Total Width: 72 bits
  67.         Data Width: 64 bits
  68.         Size: 2048 MB
  69.         Form Factor: DIMM
  70.         Set: None
  71.         Locator: DIMM3
  72.         Bank Locator: BANK3
  73.         Type: Other
  74.         Type Detail: Other
  75.         Speed: 1333 MHz
  76.         Manufacturer: Corsair
  77.         Serial Number: 00000000
  78.         Asset Tag: AssetTagNum3
  79.         Part Number: CMD12GX3M6A1600C8
  80.  
  81. Handle 0x0019, DMI type 17, 27 bytes
  82. Memory Device
  83.         Array Handle: 0x000F
  84.         Error Information Handle: Not Provided
  85.         Total Width: 72 bits
  86.         Data Width: 64 bits
  87.         Size: 2048 MB
  88.         Form Factor: DIMM
  89.         Set: None
  90.         Locator: DIMM4
  91.         Bank Locator: BANK4
  92.         Type: Other
  93.         Type Detail: Other
  94.         Speed: 1333 MHz
  95.         Manufacturer: Corsair
  96.         Serial Number: 00000000
  97.         Asset Tag: AssetTagNum4
  98.         Part Number: CMD12GX3M6A1600C8
  99.  
  100. Handle 0x001B, DMI type 17, 27 bytes
  101. Memory Device
  102.         Array Handle: 0x000F
  103.         Error Information Handle: Not Provided
  104.         Total Width: 72 bits
  105.         Data Width: 64 bits
  106.         Size: 2048 MB
  107.         Form Factor: DIMM
  108.         Set: None
  109.         Locator: DIMM5
  110.         Bank Locator: BANK5
  111.         Type: Other
  112.         Type Detail: Other
  113.         Speed: 1333 MHz
  114.         Manufacturer: Manufacturer05
  115.         Serial Number: 00000000
  116.         Asset Tag: AssetTagNum5
  117.         Part Number:

Or to just get the speed:

bash

  1. [root@tools ~]# sudo dmidecode --type 17 | grep Speed
  2.         Speed: 1333 MHz
  3.         Speed: 1333 MHz
  4.         Speed: 1333 MHz
  5.         Speed: 1333 MHz
  6.         Speed: 1333 MHz
  7.         Speed: 1333 MHz

As you can see my ram is not operating at 1600 MHz which is what I initially suspected. Now since I am not familier with this Linux tool I decided to get a second opinion.

I found a second tool called lshw and its man page is here

This tool was not installed on my system but it was available in my local repo. I also checked the debian repo and the Gentoo repo and it was available in both of those.

A simple yum install lshw was all I needed to install it:

bash

  1. [root@tools ~]# yum install lshw

After reviewing the man page I determined the correct command syntax:

bash

  1. [root@tools ~]# lshw -C memory
  2.   *-firmware
  3.        description: BIOS
  4.        vendor: American Megatrends Inc.
  5.        physical id: 0
  6.        version: P2.60 (10/30/2009)
  7.        size: 64KiB
  8.        capacity: 960KiB
  9.        capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification netboot
  10.   *-cache:0
  11.        description: L1 cache
  12.        physical id: 5
  13.        slot: L1-Cache
  14.        size: 256KiB
  15.        capacity: 256KiB
  16.        capabilities: internal write-through instruction
  17.   *-cache:1
  18.        description: L2 cache
  19.        physical id: 6
  20.        slot: L2-Cache
  21.        size: 1MiB
  22.        capacity: 1MiB
  23.        capabilities: internal write-through unified
  24.   *-cache:2
  25.        description: L3 cache
  26.        physical id: 7
  27.        slot: L3-Cache
  28.        size: 8MiB
  29.        capacity: 8MiB
  30.        capabilities: internal write-back unified
  31.   *-memory
  32.        description: System Memory
  33.        physical id: f
  34.        slot: System board or motherboard
  35.        size: 12GiB
  36.      *-bank:0
  37.           description: DIMM 1333 MHz (0.8 ns)
  38.           product: CMD12GX3M6A1600C8
  39.           vendor: Corsair
  40.           physical id: 0
  41.           serial: 00000000
  42.           slot: DIMM0
  43.           size: 2GiB
  44.           width: 64 bits
  45.           clock: 1333MHz (0.8ns)
  46.      *-bank:1
  47.           description: DIMM 1333 MHz (0.8 ns)
  48.           product: CMD12GX3M6A1600C8
  49.           vendor: Corsair
  50.           physical id: 1
  51.           serial: 00000000
  52.           slot: DIMM1
  53.           size: 2GiB
  54.           width: 64 bits
  55.           clock: 1333MHz (0.8ns)
  56.      *-bank:2
  57.           description: DIMM 1333 MHz (0.8 ns)
  58.           vendor: Manufacturer02
  59.           physical id: 2
  60.           serial: 00000000
  61.           slot: DIMM2
  62.           size: 2GiB
  63.           width: 64 bits
  64.           clock: 1333MHz (0.8ns)
  65.      *-bank:3
  66.           description: DIMM 1333 MHz (0.8 ns)
  67.           product: CMD12GX3M6A1600C8
  68.           vendor: Corsair
  69.           physical id: 3
  70.           serial: 00000000
  71.           slot: DIMM3
  72.           size: 2GiB
  73.           width: 64 bits
  74.           clock: 1333MHz (0.8ns)
  75.      *-bank:4
  76.           description: DIMM 1333 MHz (0.8 ns)
  77.           product: CMD12GX3M6A1600C8
  78.           vendor: Corsair
  79.           physical id: 4
  80.           serial: 00000000
  81.           slot: DIMM4
  82.           size: 2GiB
  83.           width: 64 bits
  84.           clock: 1333MHz (0.8ns)
  85.      *-bank:5
  86.           description: DIMM 1333 MHz (0.8 ns)
  87.           vendor: Manufacturer05
  88.           physical id: 5
  89.           serial: 00000000
  90.           slot: DIMM5
  91.           size: 2GiB
  92.           width: 64 bits
  93.           clock: 1333MHz (0.8ns)

Or there is actually a short version:

bash

  1. [root@tools ~]# lshw -short -C memory
  2. H/W path             Device     Class       Description
  3. =======================================================
  4. /0/0                            memory      64KiB BIOS
  5. /0/4/5                          memory      256KiB L1 cache
  6. /0/4/6                          memory      1MiB L2 cache
  7. /0/4/7                          memory      8MiB L3 cache
  8. /0/f                            memory      12GiB System Memory
  9. /0/f/0                          memory      2GiB DIMM 1333 MHz (0.8 ns)
  10. /0/f/1                          memory      2GiB DIMM 1333 MHz (0.8 ns)
  11. /0/f/2                          memory      2GiB DIMM 1333 MHz (0.8 ns)
  12. /0/f/3                          memory      2GiB DIMM 1333 MHz (0.8 ns)
  13. /0/f/4                          memory      2GiB DIMM 1333 MHz (0.8 ns)
  14. /0/f/5                          memory      2GiB DIMM 1333 MHz (0.8 ns)

So now I have two linux command line tools telling me that my memory is only operating at 1333 MHz so I definitely need to look into why and how to fix it.

I think once I get all this work done I may create a script which will install all these tools and excecute them and create a sort of report for people who are interested in Linux over clocking and general hardware performance.

Share