On Fri, 12 Dec 2014 14:58:53 +0100, Francois Gouget wrote: > Message 45 claims that with the latest linux-image-3.16.0-4-amd64 > this issue is solved. However this does not seem to be the case > here: > > # dpkg -l linux-image-3.16.0-4-amd64 > ii linux-image-3.16.0-4-amd64 3.16.7-2 amd64 > Linux 3.16 for 64-bit PCs > # lsmod | grep cpufreq_stats > cpufreq_stats 12782 0 > # ls /sys/devices/system/cpu/cpu*/cpufreq/stats/time_in_state > ls: cannot access /sys/devices/system/cpu/cpu*/cpufreq/stats/time_in_state: > No such file or directory
Same with 3.18.0-trunk-amd64.
cpufreq_stats is loaded but there are no
/sys/devices/system/cpu/cpu*/cpufreq/stats directories.
What vicious (aweseome widget library) is doing in its cpufreq.lua:
local cpufreq =
helpers.pathtotable("/sys/devices/system/cpu/cpu"..n.."/cpufreq")
local freq = tonumber(cpufreq.scaling_cur_freq) or
tonumber(cpufreq.cpuinfo_cur_freq)
in some old (or locally patched?) version, and
local cpufreq =
helpers.pathtotable("/sys/devices/system/cpu/"..warg.."/cpufreq")
local freq = tonumber(cpufreq.scaling_cur_freq)
in the packaged version.
I guess someone should find out where cpufreq_stats actually exports
its values; otherwise looking for
/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq might be an
alternative. Although admittedly this only gives a snapshot, while
/stats/time_in_state is supposed to have some, well, statistics over
time.
Cheers,
gregor
--
.''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Supertramp: Where There's A Will
signature.asc
Description: Digital Signature

