diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py index fc6c568..f6322c7 100644 --- a/tuned/plugins/plugin_cpu.py +++ b/tuned/plugins/plugin_cpu.py @@ -5,6 +5,7 @@ from tuned.utils.commands import commands import os import struct +import errno log = tuned.logs.get() @@ -52,19 +53,19 @@ class CPULatencyPlugin(base.Plugin): } def _check_cpupower(self): - if self._cmd.execute(["cpupower", "frequency-info"])[0] == 0: + if self._cmd.execute(["cpupower", "frequency-info"], no_errors = [errno.ENOENT])[0] == 0: self._has_cpupower = True else: self._has_cpupower = False - log.warning("using sysfs fallback, is cpupower installed?") + log.warning("unable to run cpupower tool, using sysfs fallback, is cpupower installed?") def _check_energy_perf_bias(self): self._has_energy_perf_bias = False - retcode = self._cmd.execute(["x86_energy_perf_policy", "-r"])[0] + retcode = self._cmd.execute(["x86_energy_perf_policy", "-r"], no_errors = [errno.ENOENT])[0] if retcode == 0: self._has_energy_perf_bias = True elif retcode == -1: - log.warning("error executing x86_energy_perf_policy tool, ignoring CPU energy performance bias, is the tool installed?") + log.warning("unable to run x86_energy_perf_policy tool, ignoring CPU energy performance bias, is the tool installed?") else: log.warning("your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias")