Hello,
I was looking into setting up collectd and was reading over the documentation for the cpufreq plugin. In trying to verify the cpufreq setup, I followed the steps here:
https://docs.fedoraproject.org/en-US...req_setup.html
I just updated to kernel 3.4.2-1.fc16.x86_64 and tried 'find /lib/modules -iname "*cpu*" ' which should have returned me a list of modules (among other things) that I could install related to the CPU governors. Instead, I got the following output:
Code:
[root@tspear-linux ~]# find /lib/modules -iname "*cpu*"
/lib/modules/3.3.8-1.fc16.x86_64/kernel/drivers/cpufreq
/lib/modules/3.3.8-1.fc16.x86_64/kernel/drivers/cpufreq/cpufreq_stats.ko
/lib/modules/3.3.8-1.fc16.x86_64/kernel/drivers/hwmon/via-cputemp.ko
/lib/modules/3.3.8-1.fc16.x86_64/kernel/net/netfilter/xt_cpu.ko
/lib/modules/3.3.7-1.fc16.x86_64/kernel/drivers/cpufreq
/lib/modules/3.3.7-1.fc16.x86_64/kernel/drivers/cpufreq/cpufreq_stats.ko
/lib/modules/3.3.7-1.fc16.x86_64/kernel/drivers/hwmon/via-cputemp.ko
/lib/modules/3.3.7-1.fc16.x86_64/kernel/net/netfilter/xt_cpu.ko
/lib/modules/3.4.2-1.fc16.x86_64.debug/kernel/drivers/cpufreq
/lib/modules/3.4.2-1.fc16.x86_64.debug/kernel/drivers/cpufreq/cpufreq_stats.ko
/lib/modules/3.4.2-1.fc16.x86_64.debug/kernel/drivers/hwmon/via-cputemp.ko
/lib/modules/3.4.2-1.fc16.x86_64.debug/kernel/lib/cpu-notifier-error-inject.ko
/lib/modules/3.4.2-1.fc16.x86_64.debug/kernel/net/netfilter/xt_cpu.ko
/lib/modules/3.4.2-1.fc16.x86_64/kernel/drivers/cpufreq
/lib/modules/3.4.2-1.fc16.x86_64/kernel/drivers/cpufreq/cpufreq_stats.ko
/lib/modules/3.4.2-1.fc16.x86_64/kernel/drivers/hwmon/via-cputemp.ko
/lib/modules/3.4.2-1.fc16.x86_64/kernel/net/netfilter/xt_cpu.ko
I've installed kernel-tools, which obsoletes cpufrequtils:
Code:
Package cpufrequtils-008-5.fc16.x86_64 is obsoleted by kernel-tools-3.4.2-1.fc16.x86_64 which is already installed
Code:
cpufrequtils.i686 : CPU Frequency changing related utilities
cpufrequtils.x86_64 : CPU Frequency changing related utilities
cpufrequtils-devel.i686 : CPU frequency changing utilities development files
cpufrequtils-devel.x86_64 : CPU frequency changing utilities development files
Code:
kernel-tools.i686 : Assortment of tools for the Linux kernel
kernel-tools.x86_64 : Assortment of tools for the Linux kernel
I also do not have the following directories:
/lib/modules/[kernel version]/kernel/arch/
/sys/devices/system/cpu/[cpu ID]/cpufreq/
Moreover, I can modprobe cpufreq_ondemand and cpufreq_performance without error, but they do not show up in lsmod, and I get an error when I try to modprobe cpufreq_interactive. I assume performance and ondemand are built into the kernel but interactive is not.
Additionally, I found this in the kernel config which does indicate that governers are built in. Looks like interactive governor is deprecated, as its not even in the list:
Code:
#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
#
# x86 CPU frequency scaling drivers
#
CONFIG_X86_PCC_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_POWERNOW_K8=y
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
CONFIG_X86_P4_CLOCKMOD=y
Also, the directory /sys/devices/system/cpu/cpufreq exists but is an empty directory on my system.
Finally, the kernel-tools package, seems to have installed a daemon called cpupower. It has config in /etc/sysconfig/cpupower:
Code:
[root@tspear-linux ~]# cat /etc/sysconfig/cpupower
# See 'cpupower help' and cpupower(1) for more info
CPUPOWER_START_OPTS="frequency-set -g interactive"
CPUPOWER_STOP_OPTS="frequency-set -g ondemand"
I tried to start it with systemctl, but it dies and gives the following errors in /var/log/messages:
Code:
Jun 24 17:21:24 tspear-linux cpupower[1934]: Setting cpu: 0
Jun 24 17:21:24 tspear-linux cpupower[1934]: Error setting new values. Common errors:
Jun 24 17:21:24 tspear-linux cpupower[1934]: - Do you have proper administration rights? (super-user?)
Jun 24 17:21:24 tspear-linux cpupower[1934]: - Is the governor you requested available and modprobed?
Jun 24 17:21:24 tspear-linux cpupower[1934]: - Trying to set an invalid policy?
Jun 24 17:21:24 tspear-linux cpupower[1934]: - Trying to set a specific frequency, but userspace governor is not available,
Jun 24 17:21:24 tspear-linux cpupower[1934]: for example because of hardware which cannot be set to a specific frequency
Jun 24 17:21:24 tspear-linux cpupower[1934]: or because the userspace governor isn't loaded?
Jun 24 17:21:24 tspear-linux systemd[1]: cpupower.service: main process exited, code=exited, status=237
Jun 24 17:21:24 tspear-linux systemd[1]: Unit cpupower.service entered failed state.
What I would like to know is how to actually utilize the governors when they are built in, and especially, determine which governor is active, or failing that, I suppose that my CPU doesn't support frequency scaling, and that may be why I'm getting the errors.
Code:
[root@tspear-linux ~]# cpupower frequency-set -g ondemand
Setting cpu: 0
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
for example because of hardware which cannot be set to a specific frequency
or because the userspace governor isn't loaded?