Commit 3a370415ad9418e298207c8743c3cc26fff6e311
1 parent
833843a439
Exists in
master
Added a script to set performance mode on processors
Showing 2 changed files with 14 additions and 0 deletions Side-by-side Diff
build.sh
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | echo "FR -> Définir les règles de fréquence du processeur" |
6 | 6 | echo "FR -> Performances" |
7 | 7 | echo "FR + avec les cpufrequtils en root : cpufreq-set -g performance" |
8 | +echo "FR + Vous pouvez aussi exécuter en root le script performance.sh" | |
8 | 9 | echo |
9 | 10 | echo "FR Si ce n'est pas fait tapez <Ctrl> C pour interrompre " |
10 | 11 | echo "FR sinon continuez avec <Entree>" |
... | ... | @@ -14,6 +15,7 @@ |
14 | 15 | echo "EN -> Processor frequency rules" |
15 | 16 | echo "EN -> Performances" |
16 | 17 | echo "EN + with cpufrequtils under root : cpufreq-set -g performance" |
18 | +echo "EN + you can also launch as root the script performance.sh" | |
17 | 19 | echo |
18 | 20 | echo "EN If it is not the case type <Ctrl> C to interrupt now " |
19 | 21 | echo "EN otherwise continue with <Enter>" |
performance.sh
1 | +#!/bin/bash | |
2 | + | |
3 | +# Run this script as root to set the processors to performance | |
4 | + | |
5 | +# set all processor to performance | |
6 | +ncpu=`cat /proc/cpuinfo | grep processor | cut -d':' -f 2 | tail -1` | |
7 | +for i in `seq 0 $ncpu` | |
8 | +do | |
9 | +#cpufreq-set -g performance -c $i | |
10 | +echo performance > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor | |
11 | +done |