collect: fix cpufreq graph on some machines.

the file cpuinfo_cur_freq does not exist on all systems that support collect
cpufreq data.

fixes #11739
This commit is contained in:
Arne Fitzenreiter
2018-07-03 15:07:41 +02:00
parent 64252706ce
commit 37458540bf
2 changed files with 2 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ case "$1" in
fi
# Enable cpufreq plugin if cpufreq found
if [ ! -e /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq ]; then
if [ ! -e /sys/devices/system/cpu/cpufreq/policy0/*_cur_freq ]; then
sed -i -e "s|^LoadPlugin cpufreq|#LoadPlugin cpufreq|g" /etc/collectd.conf
else
sed -i -e "s|^#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf