24 lines
428 B
Bash
Executable File
24 lines
428 B
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
if [ -f ~/.pistressrc ]; then
|
|
. ~/.pistressrc
|
|
else
|
|
export PISTRESS_HOME=/home/pi/git/pistress
|
|
|
|
export FIO_NUMJOBS=$(nproc)
|
|
export FIO_RUNNING_TIME=3600
|
|
export THERMAL_ZONE=/sys/class/thermal/thermal_zone0/temp
|
|
fi
|
|
|
|
if [ -z "${1}" ]; then
|
|
echo "usage run-cpu-stress.sh <logfile>"
|
|
exit 1
|
|
fi
|
|
|
|
measure_temp.sh > ${1} &
|
|
TPID=$!
|
|
fio ${PISTRESS_HOME}/fio/fio_cpu
|
|
kill $TPID > /dev/null
|
|
unset FIO_NUMJOBS
|
|
|