Quote:
Originally Posted by dbrazeau
Does anyone know where I can find a PowerPC CPU stress test? I have came across many Linux CPU stress test but none of them seem to support PowerPC.
|
If you would like to stress your CPU with a heavy load , my below script would do more than you want.
excute the below script on your power pc system:
# cat cpu-online-offline.sh
#!/bin/bash
LIMIT=7
RANGE=7
randnum=0 #initialize random number
function cpuhotplug {
N=$1
result=`cat /sys/devices/system/cpu/cpu${N}/online`
if [ $result -eq 0 ]; then
echo 1 > /sys/devices/system/cpu/cpu$N/online
fi
while : #do cpu online offline infinitely
do
echo 0 > /sys/devices/system/cpu/cpu$N/online # online cpu
sleep 5
echo 1 > /sys/devices/system/cpu/cpu$N/online # offline cpu
done
}
while [ $randnum -le $LIMIT ]
do
randnum=$RANDOM # Generate random number
let "randnum %= $RANGE" # Scales $randnum down within $RANGE.
x=1
cpuhotplug $randnum &
done
NOTE: This script will generate heavy load on cpu and memory too ...script is a fork bomb so oom is expected.
But it can hit real kernel issue.With my script cpusets (and sched domains) are updated asynchronously during hotplug via worker threads.
And it does by asynchronously , where you have plenty of pending hotplug operations on each cpu, at almost any given point in time.
Thanks...
Manas