Hallo zusammen
ich beschäftige mich gerade auch mit dem Thema:
Im Howto findet man
Note: the gnuplot files must have #FileLog entries in order to be
useable with gnuplot-scroll or SVG, as the filtering happens with the
FileLog get function, see the supplied gnuplot files or the
column_spec paragraph here for the syntax.
The order of the #FileLog lines must match the corresponding 'awk'
entries.
Ich lese das so:
1.) Man braucht einen Logfile mit den Daten die man ausgeben will. Ich
vermute, dass es zur Zeit nur genau einer sein darf.
2.) Man braucht eine Datei mit dem Namen xyz.gplot, in der für jede
geplottete Linie eine Zeile:
############################
# Display the s300th data reported by the CUL
# Corresponding FileLog definition:
# define <filelogname> FileLog /var/log/fhem/s300th-%Y.log <s300name>
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 title '<L1>'
set ylabel "Temp (C)"
set y2label "Temp (C)"
set grid
set ytics
set y2tics
set format y "%.1f"
set format y2 "%.1f"
#FileLog 4:BadSens:0
#FileLog 4:DuschSens:0
#FileLog 4:KuecheSens:0
#FileLog 4:SchlafzSens:0
#FileLog 4:WohnzSens:0
plot\
"<grep BadSens <IN>" using 1:4 title 'Bad' with lines,\
"<grep DuschSens <IN>" using 1:4 title 'Dusche' with lines,\
"<grep KuecheSens <IN>" using 1:4 title 'Kueche' with lines,\
"<grep SchlafzSens <IN>" using 1:4 title 'Schlafzimmer' with lines,\
"<grep WohnzSens <IN>" using 1:4 title 'Wohnzimmer' with lines
awk oder grep ist hier noch egal.
Würde man in der Gnuplot Plotanweisung an stelle des Dateinamens der
Logdatei xyz.log "<grep BadSens xyz.log" schreiben, dann filtert
Gnuplot nur die passenden Zeilen und stellt alles dar. 1:4 bezeichnet
die Spalten aus denen die X/Y Paare der Punkte genommen werden.
Jedenfalls funktioniert das Beispiel bei mir, obwohl laut Beschreibung
zu wenige Doppelpunkte in der Filelog Anweisung sind.
Viele Grüße
Markus