Last active
December 13, 2015 22:07
-
-
Save Oberon00/70c35edf1b36e887c2f8 to your computer and use it in GitHub Desktop.
SGS2 CPU stress test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To recover after running this script do | |
# echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | |
# | |
set -e | |
cd /sys/devices/system/cpu/cpu0/cpufreq/ | |
echo userspace >scaling_governor | |
FREQS=(200 500 800 1000 1200) | |
while [ 1 ]; do | |
FREQ=${FREQS[$RANDOM % ${#FREQS[@]}]} | |
echo $FREQ | |
echo $FREQ >scaling_setspeed || : | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd /sys/devices/system/cpu/cpu1/ | |
ON=`cat online` | |
while [ 1 ]; do | |
ON=$((1 - $ON)) | |
echo $ON | |
echo $ON >online || : | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment