How to use CoreFreq CPU monitoring software on Linux

last updated in Categories Hardware, Open Source

Recently I came across an excellent software called CoreFreq. It is a CPU monitoring software designed for 64-bits Processors w/ architectures Intel Atom, Core2, Nehalem, SandyBridge and superior, and AMD Family 0F. It runs on 64 bit Linux system. CoreFreq provides a framework to retrieve CPU data with a high degree of precision:


  1. Core frequencies & ratios; SpeedStep (EIST), Turbo Boost, Hyper-Threading (HTT) and Base Clock
  2. Performance counters including Time Stamp Counter (TSC), Unhalted Core Cycles (UCC), Unhalted Reference Cycles (URC)
  3. Number of instructions per cycle or second, IPS, IPC, or CPI
  4. CPU C-States C0 C1 C3 C6 C7 – C1E – Auto/UnDemotion of C1 C3
  5. DTS Temperature and Tjunction Max, Thermal Monitoring TM1 TM2 state
  6. Topology map including Caches for boostrap & application CPU
  7. Processor features, brand & architecture strings

How to install CoreFreq

You must install the prerequisite packages and compilers. For Debian/Ubuntu Linux, enter:
$ sudo apt-get install build-essential dkms git libpthread-stubs0-dev
For CentOS/RHEL/Scientific Linux, run:
$ sudo yum group install "Development Tools"
Type the following command to clone git repo:
$ git clone
Sample outputs:

Fig.01: Download or clone the source code
Fig.01: Download or clone the source code

Compile the CoreFreq program

Type the following commands:
$ cd CoreFreq/
$ make

Sample outputs:

Fig.02: Build the programs
Fig.02: Build the programs

Load the Linux kernel module

Type the following insmod command to load Linux kernel module from local directory:
$ sudo insmod ./corefreqk.ko

How do I use the corefreqd daemon?

First, start the daemon:
$ sudo ./corefreqd &
Sample outputs:

[1] 11906
 CoreFreq Daemon.  Copyright (C) 2015-2017 CYRIL INGENIERIE

Finally, start the client, run:
$ ./corefreq-cli
Without any arguments, the corefreq-cli program displays Top Monitoring as follows:

Animated gif 01: Client program in action
Animated gif 01: Client program in action

How do show dashboard

Start it as follows:
$ ./corefreq-cli -t

How do I print system information

$ ./corefreq-cli -s
Sample outputs:

Fig.03: Show Processor information (BSP)
Fig.03: Show Processor information (BSP)

To see all other options, type:
$ ./corefreq-cli -h

CoreFreq.  Copyright (C) 2015-2017 CYRIL INGENIERIE

usage:	corefreq-cli [-option ]
	-t	Show Top (default)
	-d	Show Dashboard
	-c	Monitor Counters
	-i	Monitor Instructions
	-s	Print System Information
	-M	Print Memory Controller
	-m	Print Topology
	-u	Print CPUID
	-k	Print Kernel
	-h	Print out this message

Exit status:
0	if OK,
1	if problems,
>1	if serious trouble.

Report bugs to labs[at]

See the project page for more options and info.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.


11 comment

  1. Great post!

    A small correction:
    For CentOS installation, it’s “yum groupinstall” (without the space between group and install).

    1. And by the way, you need to press “q” to get the above menu, I am on Gentoo and build it from git .

      Second thing ,when running with -s flag ,it aborted below:

      bhaskar@GentooLinux_21:33:10_Thu Feb 09:~/git-linux/CoreFreq>./corefreq-cli -s
      Processor                             [Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz]
      |- Vendor ID                                                      [GenuineIntel]
      |- Signature                                                             [06_3D]
      |- Stepping                                                                [  4]
      |- Architecture                                               [Broadwell/Mobile]
      |- Online CPU                                                              [4/8]
      |- Base Clock                                                              [ 99]
      |- Ratio Boost:                                                                 
      |                      Min Max  8C  7C  6C  5C  4C  3C  2C  1C                  
      |                        5  22   -   -  25  25  25  25  25  27                  
      Instruction set:                                                                
      |- 3DNow!/Ext [N,N]           AES [Y]      AVX/AVX2 [Y/Y]        BMI1/BMI2 [Y/Y]
      |- CLFSH        [Y]          CMOV [Y]       CMPXCH8   [Y]         CMPXCH16   [Y]
      |- F16C         [Y]           FPU [Y]          FXSR   [Y]        LAHF/SAHF   [Y]
      |- MMX/Ext    [Y/N]       MONITOR [Y]         MOVBE   [Y]         PCLMULDQ   [Y]
      |- POPCNT       [Y]        RDRAND [Y]        RDTSCP   [Y]              SEP   [Y]
      |- SSE          [Y]          SSE2 [Y]          SSE3   [Y]            SSSE3   [Y]
      |- SSE4.1/4A  [Y/N]        SSE4.2 [Y]       SYSCALL   [Y]                       
      |- 1 GB Pages Support                                      1GB-PAGES   [Present]
      |- 100 MHz multiplier Control                            100MHzSteps   [Missing]
      |- Advanced Configuration & Power Interface                     ACPI   [Present]
      |- Advanced Programmable Interrupt Controller                   APIC   [Present]
      |- Core Multi-Processing                                  CMP Legacy   [Missing]
      |- L1 Data Cache Context ID                                  CNXT-ID   [Missing]
      |- Direct Cache Access                                           DCA   [Missing]
      |- Debugging Extension                                            DE   [Present]
      |- Debug Store & Precise Event Based Sampling               DS, PEBS   [Present]
      |- CPL Qualified Debug Store                                  DS-CPL   [Present]
      |- 64-Bit Debug Store                                         DTES64   [Present]
      |- Fast-String Operation                                Fast-Strings   [Present]
      |- Fused Multiply Add                                       FMA|FMA4   [Present]
      |- Hardware Lock Elision                                         HLE   [Missing]
      |- Long Mode 64 bits                                         IA64|LM   [Present]
      |- LightWeight Profiling                                         LWP   [Missing]
      |- Machine-Check Architecture                                    MCA   [Present]
      |- Model Specific Registers                                      MSR   [Present]
      |- Memory Type Range Registers                                  MTRR   [Present]
      |- OS-Enabled Ext. State Management                          OSXSAVE   [Present]
      |- Physical Address Extension                                    PAE   [Present]
      |- Page Attribute Table                                          PAT   [Present]
      |- Pending Break Enable                                          PBE   [Present]
      |- Process Context Identifiers                                  PCID   [Present]
      |- Perfmon and Debug Capability                                 PDCM   [Present]
      |- Page Global Enable                                            PGE   [Present]
      |- Page Size Extension                                           PSE   [Present]
      |- 36-bit Page Size Extension                                  PSE36   [Present]
      |- Processor Serial Number                                       PSN   [Missing]
      |- Restricted Transactional Memory                               RTM   [Missing]
      |- Safer Mode Extensions                                         SMX   [Missing]
      |- Self-Snoop                                                     SS   [Present]
      |- Time Stamp Counter                                            TSC [  Variant]
      |- Time Stamp Counter Deadline                          TSC-DEADLINE   [Present]
      |- Virtual Mode Extension                                        VME   [Present]
      |- Virtual Machine Extensions                                    VMX   [Present]
      |- Extended xAPIC Support                                     x2APIC   [  xAPIC]                                                                                                                                    
      *** Error in `./corefreq-cli': free(): invalid next size (fast): 0x0000000000cfe090 ***
      ======= Backtrace: =========
      ======= Memory map: ========
      00400000-00428000 r-xp 00000000 fb:00 65345                              /home/bhaskar/git-linux/CoreFreq/corefreq-cli
      00627000-00628000 r-xp 00027000 fb:00 65345                              /home/bhaskar/git-linux/CoreFreq/corefreq-cli
      00628000-00629000 rwxp 00028000 fb:00 65345                              /home/bhaskar/git-linux/CoreFreq/corefreq-cli
      00cfe000-00d1f000 rwxp 00000000 00:00 0                                  [heap]
      7f0cdc000000-7f0cdc021000 rwxp 00000000 00:00 0 
      7f0cdc021000-7f0ce0000000 ---p 00000000 00:00 0 
      7f0ce2b76000-7f0ce2b8c000 r-xp 00000000 08:07 21666003                   /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.4/
      7f0ce2b8c000-7f0ce2d8b000 ---p 00016000 08:07 21666003                   /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.4/
      7f0ce2d8b000-7f0ce2d8c000 r-xp 00015000 08:07 21666003                   /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.4/
      7f0ce2d8c000-7f0ce2d8d000 rwxp 00016000 08:07 21666003                   /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.4/
      7f0ce2d8d000-7f0ce2f90000 rw-s 00000000 00:17 80559                      /dev/shm/corefreq-shm
      7f0ce2f90000-7f0ce2fa7000 r-xp 00000000 08:07 54505121                   /lib64/
      7f0ce2fa7000-7f0ce31a6000 ---p 00017000 08:07 54505121                   /lib64/
      7f0ce31a6000-7f0ce31a7000 r-xp 00016000 08:07 54505121                   /lib64/
      7f0ce31a7000-7f0ce31a8000 rwxp 00017000 08:07 54505121                   /lib64/
      7f0ce31a8000-7f0ce31ac000 rwxp 00000000 00:00 0 
      7f0ce31ac000-7f0ce333c000 r-xp 00000000 08:07 54505142                   /lib64/
      7f0ce333c000-7f0ce353b000 ---p 00190000 08:07 54505142                   /lib64/
      7f0ce353b000-7f0ce353f000 r-xp 0018f000 08:07 54505142                   /lib64/
      7f0ce353f000-7f0ce3541000 rwxp 00193000 08:07 54505142                   /lib64/
      7f0ce3541000-7f0ce3545000 rwxp 00000000 00:00 0 
      7f0ce3545000-7f0ce354b000 r-xp 00000000 08:07 54505120                   /lib64/
      7f0ce354b000-7f0ce374b000 ---p 00006000 08:07 54505120                   /lib64/
      7f0ce374b000-7f0ce374c000 r-xp 00006000 08:07 54505120                   /lib64/
      7f0ce374c000-7f0ce374d000 rwxp 00007000 08:07 54505120                   /lib64/
      7f0ce374d000-7f0ce3851000 r-xp 00000000 08:07 54505111                   /lib64/
      7f0ce3851000-7f0ce3a50000 ---p 00104000 08:07 54505111                   /lib64/
      7f0ce3a50000-7f0ce3a51000 r-xp 00103000 08:07 54505111                   /lib64/
      7f0ce3a51000-7f0ce3a52000 rwxp 00104000 08:07 54505111                   /lib64/
      7f0ce3a52000-7f0ce3a75000 r-xp 00000000 08:07 54459364                   /lib64/
      7f0ce3c54000-7f0ce3c58000 rwxp 00000000 00:00 0 
      7f0ce3c73000-7f0ce3c75000 rwxp 00000000 00:00 0 
      7f0ce3c75000-7f0ce3c76000 r-xp 00023000 08:07 54459364                   /lib64/
      7f0ce3c76000-7f0ce3c77000 rwxp 00024000 08:07 54459364                   /lib64/
      7f0ce3c77000-7f0ce3c78000 rwxp 00000000 00:00 0 
      7ffe754b9000-7ffe754da000 rwxp 00000000 00:00 0                          [stack]
      7ffe75503000-7ffe75505000 r--p 00000000 00:00 0                          [vvar]
      7ffe75505000-7ffe75507000 r-xp 00000000 00:00 0                          [vdso]
      ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
  2. I’m concerned that an out-of-the-box implementation of this on a clean CentOS7 VM, installed as a “minimal” and then following specifically the above steps does not work. The Makefile says a certain path does not exist, yet I can manually navigate to that path without error.

  3. Installed successfully the corefreqd/corefreq-cli on two machines

    i need more time to match results
    but on one of the machines it does segment-fault alot..
    takes less then a minute –
    si:) CPU: Dual core Intel Core2 Duo E8400 (-MCP-) cache: 6144 KB
    Clock Speeds: 1: 2003 MHz 2: 2003 MHz

    Feb 07 15:40:13 mylittlesmurver kernel: [275658.846789] corefreq-cli[26978]: segfault at 637337 ip 00007f6f1633c04e sp 00007ffe7a7854c8 error 4 in[7f6f162aa000+1a1000]
    Feb 07 15:40:13 mylittlesmurver kernel: [275658.846789] corefreq-cli[26978]: segfault at 637337 ip 00007f6f1633c04e sp 00007ffe7a7854c8 error 4 in[7f6f162aa000+1a1000]
    Feb 07 15:40:31 mylittlesmurver kernel: [275676.838658] corefreq-cli[26979]: segfault at 6371d6 ip 00007f7ebf00704e sp 00007ffe7ce5a6c8 error 4 in[7f7ebef75000+1a1000]
    Feb 07 15:40:31 mylittlesmurver kernel: [275676.838658] corefreq-cli[26979]: segfault at 6371d6 ip 00007f7ebf00704e sp 00007ffe7ce5a6c8 error 4 in[7f7ebef75000+1a1000]

    1. Hello,

      To eliminate segmentation faults, be sure to deactivate nmi_watchdog, before starting corefreqk.ko driver : this lets the driver access the cores counters without conflict on msr registers.

      In your kernel boot loader (SysLinux, Grub) add :

      See FAQ @

Leave a Comment