# SYSMON
#
# Anzeige der gemessenen CPU Temperatur und des errechneten Durchschnitts
#
# Beispiel aus dem Logfile:
# 2013-11-16_23:06:05 sysmon cpu_temp_avg: 49.6
# 2013-11-16_23:06:05 sysmon cpu_temp: 49.77
#

set terminal png transparent size <SIZE> crop

set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set ytics
set yrange [450:1050]
set y2tics
set title '<L1>'
set grid xtics y2tics

set ylabel "Frequenz"
set y2label "Temperatur in C"

#FileLog 4:cpu_temp_avg\x3a:0:
#FileLog 4:cpu_temp\x3a:0:
#FileLog 4:cpu_freq\x3a:0:

plot \
  "< egrep 'cpu_temp_avg:' <IN>"\
     using 1:4 axes x1y2 title 'Durchschnitt' ls l4 lw 3 with lines \
   "< egrep 'cpu_temp:' <IN>"\
     using 1:4 axes x1y2 title 'Temperatur' ls l0 lw 1 with lines \
   "< egrep 'cpu_freq:' <IN>"\
     using 1:4 axes x1y1 title 'Frequenz' ls l1fill lw 1 with steps