Skip to content

Instantly share code, notes, and snippets.

@Oberon00
Last active December 13, 2015 22:07
Show Gist options
  • Save Oberon00/70c35edf1b36e887c2f8 to your computer and use it in GitHub Desktop.
Save Oberon00/70c35edf1b36e887c2f8 to your computer and use it in GitHub Desktop.
SGS2 CPU stress test
#!/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
#!/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