Skip to content
Snippets Groups Projects
Commit 7db81652 authored by Milos Mulac's avatar Milos Mulac
Browse files

more complex metering

parent ec3f449c
Branches main
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment