From 3a370415ad9418e298207c8743c3cc26fff6e311 Mon Sep 17 00:00:00 2001 From: William Daniau Date: Thu, 31 May 2012 09:18:33 +0200 Subject: [PATCH] Added a script to set performance mode on processors --- build.sh | 2 ++ performance.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100755 performance.sh diff --git a/build.sh b/build.sh index 9c80954..1306cc2 100755 --- a/build.sh +++ b/build.sh @@ -5,6 +5,7 @@ echo "FR + sous kde clic droit sur kpowersave " echo "FR -> Définir les règles de fréquence du processeur" echo "FR -> Performances" echo "FR + avec les cpufrequtils en root : cpufreq-set -g performance" +echo "FR + Vous pouvez aussi exécuter en root le script performance.sh" echo echo "FR Si ce n'est pas fait tapez C pour interrompre " echo "FR sinon continuez avec " @@ -14,6 +15,7 @@ echo "EN + under kde right-clic on kpowersave " echo "EN -> Processor frequency rules" echo "EN -> Performances" echo "EN + with cpufrequtils under root : cpufreq-set -g performance" +echo "EN + you can also launch as root the script performance.sh" echo echo "EN If it is not the case type C to interrupt now " echo "EN otherwise continue with " diff --git a/performance.sh b/performance.sh new file mode 100755 index 0000000..eb30b2f --- /dev/null +++ b/performance.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Run this script as root to set the processors to performance + +# set all processor to performance +ncpu=`cat /proc/cpuinfo | grep processor | cut -d':' -f 2 | tail -1` +for i in `seq 0 $ncpu` +do +#cpufreq-set -g performance -c $i +echo performance > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor +done + -- 2.16.4