mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-20 16:02:59 +02:00
collectd: move cpufreq plugin init because arm has no cpufrequtils
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -41,8 +41,6 @@ case "${1}" in
|
||||
case "$driver" in
|
||||
intel_pstate)
|
||||
# pstate use internal gov so skip this setting
|
||||
# activate cpufreq collectd module
|
||||
sed -i -e "s|^#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf
|
||||
echo_ok;
|
||||
;;
|
||||
*)
|
||||
@@ -51,9 +49,6 @@ case "${1}" in
|
||||
# Set the governor to ondemand to test if it works
|
||||
cpufreq-set -g ondemand
|
||||
if [ ${?} = 0 ]; then
|
||||
# activate cpufreq collectd module
|
||||
sed -i -e "s|^#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf
|
||||
|
||||
# Set the governor to ondemand for all cpus
|
||||
for i in `seq 0 $CPUCOUNT`;
|
||||
do
|
||||
|
||||
@@ -88,6 +88,13 @@ case "$1" in
|
||||
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/cpufreq/policy0/cpuinfo_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
|
||||
|
||||
Reference in New Issue
Block a user