summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2005-02-06 21:12:25 +0000
committernjl <njl@FreeBSD.org>2005-02-06 21:12:25 +0000
commit944b15ac740f2ee9b49225a2cec551fcd39eacd9 (patch)
tree172a835224e8834a78c3b56f93abad63c9a65d4e /etc/rc.d
parentd79055b325d1f166e95f2c546f39abe82cac6de4 (diff)
downloadFreeBSD-src-944b15ac740f2ee9b49225a2cec551fcd39eacd9.zip
FreeBSD-src-944b15ac740f2ee9b49225a2cec551fcd39eacd9.tar.gz
Add support for cpufreq to power_profile(8). Values for on/offline cpu
frequencies are specified with performance_cpu_freq and economy_cpu_freq. Of course, special values LOW and HIGH are also supported. Also, remove old throttling support.
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/power_profile10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/rc.d/power_profile b/etc/rc.d/power_profile
index 45c341a..dac4b1e 100644
--- a/etc/rc.d/power_profile
+++ b/etc/rc.d/power_profile
@@ -77,10 +77,12 @@ lowest_value="$(sysctl -n hw.acpi.cpu.cx_supported | \
eval value=\$${profile}_cx_lowest
sysctl_set
-node="hw.acpi.cpu.throttle_state"
-highest_value="$(sysctl -n hw.acpi.cpu.throttle_max 2> /dev/null)"
-lowest_value="1"
-eval value=\$${profile}_throttle_state
+node="dev.cpu.0.freq"
+highest_value="$(sysctl -n dev.cpu.0.freq_levels | \
+ awk '{ split($0, a, "[/ ]"); print a[1] }' - 2> /dev/null)"
+lowest_value="$(sysctl -n dev.cpu.0.freq_levels | \
+ awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }' - 2> /dev/null)"
+eval value=\$${profile}_cpu_freq
sysctl_set
exit 0
OpenPOWER on IntegriCloud