Check CPU usage in Linux with XFreq

XFreq is an awesome tool to check CPU usage in Linux for Intel CPUs, offers both CLI and GUI interface, xfreq-gui and xfreq-cli respectively.

This is exclusively for Intel CPU’s, covers current Intel 6th generation Skylake CPU series as well as old Core 2 series. The GUI shows different widgets, covering various CPU related information like CPU frequency, CPU load, temperature, Turbo Boost and others.

The XFreq follows a client-server model to check CPU usage in Linux/UNIX, first start the XFreq server as root then check CPU usage with the previous tools as normal user.


Install XFreq in GNU/Linux

Though this software is around us since January of 2014, but not available in the software repository of any GNU/Linux distribution, so we have to compile it from source.

I’m using Debian Testing for compilation, the procedure is exactly same for any other Debian based distros like Ubuntu, Linux Mint. For other distros, just modify the package install commands.

1 . Install necessary softwares to compile XFreq,

 sudo apt-get install git build-essential libc6-dev libx11-dev 

2 . Get the latest source code from this github repo

cd ~/

git clone

3 . Compile XFreq

cd xfreq/

make -j2

That’s all building complete, there is no default install rule, till now, you can install it wherever you like, I’m copying the binaries to /usr/local/bin/ for easier access.

cd ~/xfreq

sudo cp svr/bin/xfreq-intel /usr/local/bin/
sudo cp gui/bin/xfreq-gui /usr/local/bin/
sudo cp cli/bin/xfreq-cli /usr/local/bin/

You could also strip the binaries to make them smaller in size.

 sudo strip -s /usr/local/bin/xfreq-* 


XFreq, check CPU usage in Linux

First load some kernel modules, so the server part could collect the necessary data,

 sudo modprobe msr
sudo modprobe dmi-sysfs  # optional 

XFreq-intel is the server part, before starting the server, let’s have a look at few available server configuration options.

  1. -h      Print the help messages
  2. -A     Print out the built-in CPU architectures
  3. -c      Pick up an architecture, an integer, from the previous command.
  4. -B     Enable SmBIOS , 1 enable, 0 disable
  5. -S     Set clock source, look at the -S option in help meaasge

Just starting the server may show incorrect results, I’ve to use those extra options too, look at the command bellow.

 sudo xfreq-intel -S 1 -B 1 -c 26 

Open up another terminal window/tab and run the xfreq-cli or xfreq-gui application, this time no root privilege required


A screenshot bellow, click to zoomcheck cpu usage linux xfreq

Now the CLI part, nothing fancy here, just start the server with proper options as root and run xfreq-cli in another terminal tab. This should look like bellow.

Average C-states
Turbo     C0      C1      C3      C6      C7
40.90%   5.44%   6.34%   0.16    0.00%  88.05%

CPU#  F=1333.00 x R  Temp     IPS   IPC      CPI       Task scheduling
  0   696.40    0.52   42     0.00  0.06   17.25                (    0)
  1   187.64    0.14   42     0.01  0.33    3.00                (    0)
  2   374.17    0.28   47     0.00  0.05   18.21                (    0)
  3  1418.57    1.06   47     0.01  0.10    9.86                (    0)


Credits and conclusion

Special thanks to the developer,


XFreq also runs on FreeBSD, and I’ll say it’s a great tool as CPU usage monitor and also to know various CPU related info, extremely helpful for beginners, the downside is XFreq supports only Intel CPUs.

Do you have any question or suggestion ? Just drop a comment, I’ll be happy to talk about it.


3 Responses

  1. CyrIng says:

    Thank you for your article.

    It’s the first time, I can see XFreq running with a SandyBridge. What a great surprise to see c7 states in action !
    I have also noticed that your BCLK was badly estimated, 1333MHz sounds wrong, beside oc
    I would recommend to click TSC in GUI or start server with it. I suspect that BIOS FSB freq was badly read by XFreq.
    Sandy Base Clock should be 100MHz

    Without any users interested in, I gave up XFreq for CoreFreq

    CoreFreq is a Linux device driver which targets precision and low CPU overhead.
    Still experimental, no GUI, it has no dependency with the msr.ko Linux module.

    Let me know how I can improve the software .


    • Arnab says:

      Hi and it’s awesome to hear from the XFreq developer.

      When I switch to clock source to TSC or any other sources except BIOS, CPU core frequencies are heavily messed up, 20~60 MHz !!!! and the base clock is around 99.79 MHz, and 100 MHz whiile using SPEC or ROM as source. Yeah, the FSB frequency is 1333 MHz.

      Surely I’ll try CoreFreq as soon as possible, and will write up here.

      And how can I send you some feedback ? through mail ?

      • CyrIng says:

        Yes, feel free to use the email supplied in comment .
        Also, you would better contact me through G+

        Btw, 99-100 MHz looks OK,
        which multiplied by a 29 ratio results to an operational frequency of 2,9 GHz

        If your cores run low freq < 60 MHz, perhaps they are doing anything? Thus, give some load to the system, such as 7zip benchmark, or p5burn, mmxburn, etc
        You may see Turbo in action when 1 or few cores are "stressed"

Leave a Reply

Your email address will not be published. Required fields are marked *