diff --git a/powertest.sh b/powertest.sh index 1210fa0ae7846716949121adeca59211e14fd87a..73be3b62e0cf54b8c300f311faa7565823e30d1d 100755 --- a/powertest.sh +++ b/powertest.sh @@ -10,7 +10,7 @@ MAX_FREQ="3.31GHz" MIN_FREQ="1.50GHz" LOG=/tmp/powertest.$$ TEST="stress-ng -c $CORES" -METER="ipmitool dcmi power reading| grep Instantaneous" +#METER="ipmitool dcmi power reading| grep Instantaneous" HIGH_PERFORMANCE="for i in `seq 0 $CORES`; do cpufreq-set -g performance -c \$i --max 2400Mhz; done" MID_PERFORMANCE="for i in `seq 0 $CORES`; do cpufreq-set -g performance -c \$i --max 2000Mhz; done" @@ -19,10 +19,21 @@ ON_DEMAND="for i in `seq 0 $CORES`; do cpufreq-set -g ondemand -c \$i -u $MAX_FR [ -x "$(command -v stress-ng)" ] || { echo "Test command stress-ng not installed, exiting."; exit 1; } + +# XXX: needs to be revised on given platform, names of sensors and their presence is vendor specific run_meter() { + echo " CPU1 CPU2 MB PS1 PS2" while true; do - eval $METER + ipmitool sensor|\ + awk '\ + /CPU1 Temperature/ {T1=$4}; \ + /CPU2 Temperature/ {T2=$4}; \ + /TR1 Temperature/ {T3=$4}; \ + /PMBPower1/ {P1=$3}; \ + /PMBPower2/ {P2=$3}; \ + END {print " "T1" "T2" "T3" "P1" "P2} \ + ' sleep $SAMPLING done }