if [ "${machine:0:3}" = "arm" ]; then
touch /etc/sysconfig/lm_sensors
fi
+ if [ "${machine:0:7}" = "aarch64" ]; then
+ touch /etc/sysconfig/lm_sensors
+ fi
+
+ # Do not search for sensors when running on AWS
+ if [ -e "/var/run/aws-instance-id" ]; then
+ touch /etc/sysconfig/lm_sensors
+ fi
# At first run search for sensors with sensors-detect
if [ ! -e /etc/sysconfig/lm_sensors ]; then
sed -i -e 's|^#include "/etc/collectd.thermal"$|include "/etc/collectd.thermal"|g' /etc/collectd.conf
fi
+ # Enable cpufreq plugin if cpufreq found
+ if [ ! -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_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
+ fi
+
# Enable swap plugin if swap found
if [ "$(swapon -s | wc -l)" == "0" ]; then
sed -i -e "s|^LoadPlugin swap|#LoadPlugin swap|g" /etc/collectd.conf