{"id":8294,"date":"2019-01-17T23:45:13","date_gmt":"2019-01-17T23:45:13","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=8294"},"modified":"2019-03-08T22:04:00","modified_gmt":"2019-03-08T22:04:00","slug":"how-to-find-cpu-minimum-current-maximum-frequency-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/17\/how-to-find-cpu-minimum-current-maximum-frequency-in-linux\/","title":{"rendered":"How to find cpu minimum, current &amp; maximum frequency in linux ?"},"content":{"rendered":"<h3 class=\"post-title entry-title\">How to find cpu minimum, current &amp; maximum frequency in linux ?<\/h3>\n<div class=\"post-header\">\n<div class=\"post-header-line-1\"><\/div>\n<\/div>\n<div id=\"post-body-3746485465539408176\" class=\"post-body entry-content\">\n<div dir=\"ltr\">\n<div dir=\"ltr\">cpu manufacturers pro-grammatically reduce the frequency of the processor. You can find out the current and possible frequency with the command:<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">How to find available frequencies ?<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">cat \u00a0\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/scaling_available_frequencies<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Sample output:<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">cat \u00a0\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/scaling_available_frequencies<\/div>\n<div dir=\"ltr\">2933000 2128000 1596000<\/div>\n<div dir=\"ltr\">2933000 2128000 1596000<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Finding each core \u00a0\u00a0minimum, current &amp; maximum frequency<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">grep &#8221; \/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_{min,cur,max}_freq<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Sample output:<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_min_freq:1596000<\/div>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_cur_freq:1596000<\/div>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_max_freq:2933000<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Here we can see that the current processor frequency-1596 Mhz and the maximum-2933 Mhz.<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Above example for core 0 if you have N number of cores use *:<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">grep &#8221; \/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/scaling_{min,cur,max}_freq<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Sample output :<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_min_freq:1596000<\/div>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu1\/cpufreq\/scaling_min_freq:1596000<\/div>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_cur_freq:1596000<\/div>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu1\/cpufreq\/scaling_cur_freq:2128000<\/div>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_max_freq:2933000<\/div>\n<div dir=\"ltr\">\/sys\/devices\/system\/cpu\/cpu1\/cpufreq\/scaling_max_freq:2933000<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">How to find cpu count ?<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">grep -c &#8216;model name&#8217; \/proc\/cpuinfo<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Sample output :<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">2<\/div>\n<div dir=\"ltr\">Use various performance governors.<\/p>\n<p>ondemand: The CPU freq governor &#8220;on-demand&#8221; sets the CPU depending on the current usage.<\/p><\/div>\n<div dir=\"ltr\">To do this the CPU must have the capability to switch the frequency very quickly.<\/div>\n<div dir=\"ltr\">\nconservative: The CPU freq governor &#8220;conservative&#8221;, much like the &#8220;on-demand&#8221; governor, sets<\/div>\n<div dir=\"ltr\">the CPU depending on the current usage. It differs in behavior in that it gracefully increases<\/div>\n<div dir=\"ltr\">and decreases the CPU speed rather than jumping to max speed the moment there is any<\/div>\n<div dir=\"ltr\">load on the CPU. This behavior is more suitable in a battery powered environment.<\/div>\n<div dir=\"ltr\">\nuserspce: The CPU freq governor &#8220;user-space&#8221; allows the user, or any user-space program<\/div>\n<div dir=\"ltr\">running with UID &#8220;root&#8221;, to set the CPU to a specific frequency by making a sysfs<\/div>\n<div dir=\"ltr\">file &#8220;scaling_setspeed&#8221; available in the CPU-device directory.<\/div>\n<div dir=\"ltr\">\npowersave: The CPU freq governor &#8220;powersave&#8221; sets the CPU statically to the lowest<\/div>\n<div dir=\"ltr\">frequency within the borders of scaling_min_freq and scaling_max_freq.<\/div>\n<div dir=\"ltr\">\nperformance: The CPU freq governor &#8220;performance&#8221; sets the CPU statically to the highest<\/div>\n<div dir=\"ltr\">frequency within the borders of scaling_min_freq and scaling_max_freq.<\/div>\n<p><b><\/p>\n<p><\/b><\/p>\n<div dir=\"ltr\"><b>How to find available_governors?<\/b><\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">cat \/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_available_governors<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Sample output:<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">conservative ondemand userspace powersave performance<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">Set permanently one eg.:<\/p>\n<p>sudo echo &#8220;performance&#8221; &gt; \/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_governor<\/p><\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">cat \/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_governor<\/div>\n<p><b><br \/>\n<\/b><\/p>\n<div dir=\"ltr\">performance<\/div>\n<\/div>\n<\/div>\n<p><a href=\"https:\/\/www.linuxforfreshers.com\/2019\/01\/how-to-find-cpu-minimum-current-maximum.html\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to find cpu minimum, current &amp; maximum frequency in linux ? cpu manufacturers pro-grammatically reduce the frequency of the processor. You can find out the current and possible frequency with the command: How to find available frequencies ? cat \u00a0\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/scaling_available_frequencies Sample output: cat \u00a0\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/scaling_available_frequencies 2933000 2128000 1596000 2933000 2128000 1596000 Finding each core \u00a0\u00a0minimum, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/17\/how-to-find-cpu-minimum-current-maximum-frequency-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to find cpu minimum, current &amp; maximum frequency in linux ?&#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-8294","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\/8294","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=8294"}],"version-history":[{"count":2,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/8294\/revisions"}],"predecessor-version":[{"id":10765,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/8294\/revisions\/10765"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=8294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=8294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=8294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}