{"id":11146,"date":"2019-03-09T22:00:11","date_gmt":"2019-03-09T22:00:11","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=11146"},"modified":"2019-03-09T22:00:11","modified_gmt":"2019-03-09T22:00:11","slug":"corefreq-a-powerful-cpu-monitoring-tool-for-linux-systems","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/09\/corefreq-a-powerful-cpu-monitoring-tool-for-linux-systems\/","title":{"rendered":"CoreFreq \u2013 A Powerful CPU Monitoring Tool for Linux Systems"},"content":{"rendered":"<p><strong>CoreFreq<\/strong>\u00a0is a\u00a0<a href=\"https:\/\/www.tecmint.com\/bcc-best-linux-performance-monitoring-tools\/\" target=\"_blank\" rel=\"noopener\">CPU monitoring program<\/a>\u00a0intended for the Intel 64-bits processor and supports architectures such as Atom, Core2, Nehalem, SandyBridge and above, AMD Family 0F.<\/p>\n<p>Its core is established on a kernel module which helps to retrieve internal performance counters from each CPU core, and works in relation with a daemon which gathers the data and a small console client links to the daemon and displays collected data.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/CoreFreq-CPU-Monitoring.gif\"><img decoding=\"async\" class=\"size-full wp-image-24508\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/CoreFreq-CPU-Monitoring.gif\" sizes=\"(max-width: 808px) 100vw, 808px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/CoreFreq-CPU-Monitoring.gif 808w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/CoreFreq-CPU-Monitoring-768x464.gif 768w\" alt=\"CoreFreq CPU Monitoring\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p>It offers a groundwork to recapture CPU data with a high degree of accuracy:<\/p>\n<ol>\n<li>Core frequencies &amp; ratios; SpeedStep (EIST), Turbo Boost, Hyper-Threading (HTT) as well as Base Clock.<\/li>\n<li>Performance counters in conjunction with Time Stamp Counter (TSC), Unhalted Core Cycles (UCC), Unhalted Reference Cycles (URC).<\/li>\n<li>Number of instructions per cycle or second, IPS, IPC, or CPI.<\/li>\n<li>CPU C-States C0 C1 C3 C6 C7 \u2013 C1E \u2013 Auto\/UnDemotion of C1 C3.<\/li>\n<li>DTS Temperature along with Tjunction Max, Thermal Monitoring TM1 TM2 state.<\/li>\n<li>Topology map including Caches for boostrap together with application CPU.<\/li>\n<li>Processor features, brand plus architecture strings.<\/li>\n<\/ol>\n<p><strong>Note<\/strong>: This tool is more useful and appropriate for expert Linux users and experienced system administrators, however, novice users can gradually learn how to purposefully use it.<\/p>\n<h4>How Does CoreFreq Works<\/h4>\n<p>It functions by invoking a Linux Kernel module which then uses:<\/p>\n<ol>\n<li>asm code to keep the readings of the performance counters as close as possible.<\/li>\n<li>per-CPU, effects slab data memory plus high-resolution timer.<\/li>\n<li>compliant with suspend \/ resume and CPU Hot-Plug.<\/li>\n<li>a shared memory to protect kernel from the user-space part of the program.<\/li>\n<li>atomic synchronization of threads to do away with mutexes and deadlock.<\/li>\n<\/ol>\n<h3>How to Install CoreFreq in Linux<\/h3>\n<p>To install\u00a0<strong>CoreFreq<\/strong>, first you need to install the prerequisites (<strong>Development Tools<\/strong>) to compile and build the program from source.<\/p>\n<pre>$ sudo yum group install 'Development Tools'           [<strong>On CentOS\/RHEL<\/strong>]\r\n$ sudo dnf  group install 'Development Tools'          [<strong>On Fedora 22+ Versions<\/strong>]\r\n# sudo apt-get install dkms git libpthread-stubs0-dev  [<strong>On Debian\/Ubuntu<\/strong>] \r\n<\/pre>\n<p>Next clone the\u00a0<strong>CoreFreq<\/strong>\u00a0source code from the Github repository, move into the download folder and compile and build the program:<\/p>\n<pre>$ git clone https:\/\/github.com\/cyring\/CoreFreq.git\r\n$ cd CoreFreq\r\n$ make \r\n<\/pre>\n<div id=\"attachment_24510\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/make-corefreq.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24510\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/make-corefreq.png\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/make-corefreq.png 810w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/make-corefreq-768x254.png 768w\" alt=\"Build CoreFreq Program\" width=\"810\" height=\"268\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Build CoreFreq Program<\/p>\n<\/div>\n<p><strong>Note<\/strong>: Arch Linux users can install\u00a0<a href=\"https:\/\/aur.archlinux.org\/packages\/corefreq-git\" target=\"_blank\" rel=\"nofollow noopener\">corefreq-git<\/a>\u00a0from the AUR.<\/p>\n<p>Now run the following commands to load the Linux kernel module from local directory followed by the daemon:<\/p>\n<pre>$ sudo insmod corefreqk.ko\r\n$ sudo .\/corefreqd\r\n<\/pre>\n<p>Then, start the client, as a user.<\/p>\n<pre>$ .\/corefreq-cli\r\n<\/pre>\n<div id=\"attachment_24512\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/CoreFreq-Linux-CPU-Monitoring.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24512\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/CoreFreq-Linux-CPU-Monitoring.gif\" sizes=\"auto, (max-width: 866px) 100vw, 866px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/CoreFreq-Linux-CPU-Monitoring.gif 866w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/CoreFreq-Linux-CPU-Monitoring-768x454.gif 768w\" alt=\"CoreFreq Linux CPU Monitoring\" width=\"866\" height=\"512\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">CoreFreq Linux CPU Monitoring<\/p>\n<\/div>\n<p>From the interface above, you can use shortcut keys:<\/p>\n<ol>\n<li><code>F2<\/code>\u00a0to display a usage menu as seen at the top section of the screen.<\/li>\n<li><code>Right<\/code>\u00a0and\u00a0<code>Left<\/code>\u00a0arrows to move over the menu tabs.<\/li>\n<li><code>Up<\/code>\u00a0and\u00a0<code>Down<\/code>\u00a0arrows to select a menu item, then click [<strong>Enter<\/strong>].<\/li>\n<li><code>F4<\/code>\u00a0will close the program.<\/li>\n<li><code>h<\/code>\u00a0will open a quick reference.<\/li>\n<\/ol>\n<p>To view all usage options, type the command below:<\/p>\n<pre>$ .\/corefreq-cli -h\r\n<\/pre>\n<div class=\"code-label\">CoreFreq Options<\/div>\n<pre>CoreFreq.  Copyright (C) 2015-2017 CYRIL INGENIERIE\r\n\r\nusage:\tcorefreq-cli [-option &lt;arguments&gt;]\r\n\t-t\tShow Top (default)\r\n\t-d\tShow Dashboard\r\n\t\t  arguments: &lt;left&gt; &lt;top&gt; &lt;marginWidth&gt; &lt;marginHeight&gt;\r\n\t-c\tMonitor Counters\r\n\t-i\tMonitor Instructions\r\n\t-s\tPrint System Information\r\n\t-M\tPrint Memory Controller\r\n\t-m\tPrint Topology\r\n\t-u\tPrint CPUID\r\n\t-k\tPrint Kernel\r\n\t-h\tPrint out this message\r\n\r\nExit status:\r\n0\tif OK,\r\n1\tif problems,\r\n&gt;1\tif serious trouble.\r\n\r\nReport bugs to labs[at]cyring.fr\r\n<\/pre>\n<p>To print info about the kernel, run:<\/p>\n<pre>$ .\/corefreq-cli -k\r\n<\/pre>\n<p>Print CPU identification details:<\/p>\n<pre>$ .\/corefreq-cli -u\r\n<\/pre>\n<p>You can as well monitor CPU instructions in real-time:<\/p>\n<pre>$ .\/corefreq-cli -i\r\n<\/pre>\n<p>Enable tracing of counters as below:<\/p>\n<pre>$ .\/corefreq-cli -c\r\n<\/pre>\n<p>For more information and usage, visit the CoreFreq Github repository:\u00a0<a href=\"https:\/\/github.com\/cyring\/CoreFreq\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/cyring\/CoreFreq<\/a><\/p>\n<p>In this article, we reviewed a powerful CPU monitoring tool, which may be more useful to Linux experts or experienced system administrators as compared to novice users.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/corefreq-linux-cpu-monitoring-tool\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CoreFreq\u00a0is a\u00a0CPU monitoring program\u00a0intended for the Intel 64-bits processor and supports architectures such as Atom, Core2, Nehalem, SandyBridge and above, AMD Family 0F. Its core is established on a kernel module which helps to retrieve internal performance counters from each CPU core, and works in relation with a daemon which gathers the data and a &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/09\/corefreq-a-powerful-cpu-monitoring-tool-for-linux-systems\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CoreFreq \u2013 A Powerful CPU Monitoring Tool for Linux Systems&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11146","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=11146"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11146\/revisions"}],"predecessor-version":[{"id":11147,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11146\/revisions\/11147"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=11146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=11146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=11146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}