Is there a way to delete the old stats for a fresh start? I have set max CPU-speed to 950 MHz in file cpufrequtils
. My issue is that this limitation is not in action when booting up, during which cpufrequtils
is collecting data as can be seen from output: cpufreq stats: 1.20 GHz:27,27%
. So after boot i would like to reset the stats to zero.
peter@peter-HP-Compaq-2510p:~$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us.
hardware limits: 800 MHz - 1.20 GHz
available frequency steps: 1.20 GHz, 1.07 GHz, 933 MHz, 800 MHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 800 MHz and 950 MHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 933 MHz.
cpufreq stats: 1.20 GHz:27,27%, 1.07 GHz:0,48%, 933 MHz:47,91%, 800 MHz:24,34% (1449)
analyzing CPU 1:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 1
CPUs which need to have their frequency coordinated by software: 1
maximum transition latency: 10.0 us.
hardware limits: 800 MHz - 1.20 GHz
available frequency steps: 1.20 GHz, 1.07 GHz, 933 MHz, 800 MHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 800 MHz and 950 MHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 933 MHz.
cpufreq stats: 1.20 GHz:30,29%, 1.07 GHz:0,29%, 933 MHz:51,91%, 800 MHz:17,52% (763)
peter@peter-HP-Compaq-2510p:~$
Edit: Trying to follow advice given in answer, but there is no reset in folder:
peter@peter-HP-Compaq-2510p:~$ cd /sys/devices/system/cpu/cpu0/cpufreq/stats
peter@peter-HP-Compaq-2510p:/sys/devices/system/cpu/cpu0/cpufreq/stats$ ls -l
total 0
-r--r--r-- 1 root root 4096 apr 28 09:46 time_in_state
-r--r--r-- 1 root root 4096 apr 28 09:46 total_trans
-r--r--r-- 1 root root 4096 apr 28 09:46 trans_table
peter@peter-HP-Compaq-2510p:/sys/devices/system/cpu/cpu0/cpufreq/stats$ dir
time_in_state total_trans trans_table
peter@peter-HP-Compaq-2510p:/sys/devices/system/cpu/cpu0/cpufreq/stats$
echo '1' | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/stats/reset
– WinEunuuchs2Unix Apr 28 '19 at 13:54peter@peter-HP-Compaq-2510p:~$ echo '1' | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/stats/reset tee: '/sys/devices/system/cpu/cpu*/cpufreq/stats/reset': No such file or directory 1
– PeterEriksson Apr 28 '19 at 14:07ll /sys/devices/system/cpu/cpu0/cpufreq/stats/
– WinEunuuchs2Unix Apr 28 '19 at 14:09ls -l
is edited into the question. Obviously, the reset-file isn't included in the installation of cpufreq. – PeterEriksson Apr 28 '19 at 14:15.../stats
sub-directory at all. I've spent hours on this issue and will have to tap out... – WinEunuuchs2Unix Apr 28 '19 at 15:32echo '1' | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/stats/reset
stats went to zero. So this issue must be about different distributions of cpufrequtils? – PeterEriksson Apr 28 '19 at 17:13