summaryrefslogtreecommitdiffstats
path: root/cpufreq
blob: 4aa15af73f53ccb791ec920f3391be7f2fed58a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

GOVERNOR=ondemand
[ -f /etc/sysconfig/cpufreq ] && . /etc/sysconfig/cpufreq

for cpu in /sys/devices/system/cpu/* ; do
    [ "x$GOVERNOR" != "x" ] && [ -f  $cpu/cpufreq/scaling_governor ] && echo $GOVERNOR > $cpu/cpufreq/scaling_governor
    [ "x$MAX_FREQ" != "x" ] && [ -f  $cpu/cpufreq/scaling_max_freq ] && echo $MAX_FREQ > $cpu/cpufreq/scaling_max_freq
    [ "x$MIN_FREQ" != "x" ] && [ -f  $cpu/cpufreq/scaling_min_freq ] && echo $MIN_FREQ > $cpu/cpufreq/scaling_min_freq
done

exit 0