Files
pistress/bin/plot_cpu_temp_compare.sh

34 lines
809 B
Bash
Executable File

#!/bin/bash
ACTIVE_LOG="$1"
ICE_LOG="$2"
OUTFILE="$3"
TITLE="$4"
if [ -z "${ACTIVE_LOG}" ] || [ -z "${ICE_LOG}" ] || [ -z "${OUTFILE}" ]; then
echo "Usage: $0 <temp_active.log> <temp_ice.log> <output.png> [title]"
exit 1
fi
echo "ACTIVE_LOG=${ACTIVE_LOG}"
echo "ICE_LOG=${ICE_LOG}"
echo "OUTFILE=${OUTFILE}"
echo "TITLE=${TITLE}"
gnuplot -e "
set terminal pngcairo size 1800,800;
set output '${OUTFILE}';
set multiplot layout 1,2 title '${TITLE}';
set xlabel 'Zeit (s)';
set ylabel 'Temperatur (°C)';
set grid;
set key top left;
set yrange [0:100];
set title 'Active Cooler';
plot '${ACTIVE_LOG}' using 1:2 with lines lc rgb 'red' lw 2 title 'CPU-Temperatur';
set title 'Ice Tower Cooler 5';
plot '${ICE_LOG}' using 1:2 with lines lc rgb 'blue' lw 2 title 'CPU-Temperatur';
unset multiplot;
"
exit 0