diff --git a/build_sdcard.sh b/build_sdcard.sh index ea3fdf8ae..fcbc597c0 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -252,6 +252,9 @@ sudo apt-get install -y autossh # see https://github.com/rootzoll/raspiblitz/pull/334 sudo apt-get install -y fbi +# prepare for powertest +sudo apt install -y sysbench + # prepare dor display service # see https://github.com/rootzoll/raspiblitz/issues/88#issuecomment-471342311 sudo apt-get install -y redis-server diff --git a/home.admin/config.scripts/blitz.powertest.sh b/home.admin/config.scripts/blitz.powertest.sh index 882701663..b35028a92 100644 --- a/home.admin/config.scripts/blitz.powertest.sh +++ b/home.admin/config.scripts/blitz.powertest.sh @@ -3,21 +3,20 @@ # Based on https://github.com/bamarni/pi64/issues/4#issuecomment-292707581 # sysbench manual: http://imysql.com/wp-content/uploads/2014/10/sysbench-manual.pdf +# check if bechmarking tool is installed sysbenchInstalled=$(sysbench --version 2>/dev/null | grep -c 'sysbench 0.') if [ ${sysbenchInstalled} -eq 0 ];then sudo apt install -y sysbench fi -clear -echo "" -echo "***" -echo "RaspiBlitz powertest v0.1" -echo "Starting sysbench to run for 60 seconds (--max-time=60 --cpu-max-prime=10000)" -echo "***" -echo "" +# do debug outputs to the STDERR - so that the STDOUT is just the results in the end +echo "RaspiBlitz powertest v0.1" >&2 +echo "Starting sysbench to run for 60 seconds (--max-time=60 --cpu-max-prime=10000)" >&2 -sysbench --max-time=60 --test=cpu --cpu-max-prime=10000 --num-threads=4 run & # > /dev/null 2>&1 & +# starting bench mark +sysbench --max-time=60 --test=cpu --cpu-max-prime=10000 --num-threads=4 run 1>/dev/null 2>&1 & +# keep monitoring in the background Maxfreq=$(( $(awk '{printf ("%0.0f",$1/1000); }' &2 else - echo -e "${Temp}$(printf "%5s" ${RealClockspeed})/$(printf "%4s" ${SysFSClockspeed}) MHz ${CoreVoltage}" + echo -e "${Temp}$(printf "%5s" ${RealClockspeed})/$(printf "%4s" ${SysFSClockspeed}) MHz ${CoreVoltage}" >&2 fi sleep 5 done \ No newline at end of file