DD2-monitor/plot.sh

32 lines
554 B
Bash
Raw Normal View History

2019-04-04 03:36:27 +11:00
#!/bin/bash
# THIS IS A KLUDGE
DATAFILE="serial/foo.dat"
IMAGE="graphe.png"
2019-04-14 20:33:52 +11:00
TMPFILE="/dev/shm/tmpdata"
2019-04-04 03:36:27 +11:00
2019-05-16 02:22:44 +11:00
wc -l ${DATAFILE}
tail -2500 < ${DATAFILE} > ${TMPFILE}
2019-04-04 03:36:27 +11:00
gnuplot << __EOC__
2019-05-16 02:22:44 +11:00
set term png size 1600,800
2019-04-04 03:36:27 +11:00
set output "${IMAGE}"
set ytics 2
set xtics
set grid front
set title "* Temperatures du Phytotron *"
2019-04-04 03:36:27 +11:00
set xdata time
set timefmt "%s"
set format x "%b %d\n%H:%M"
2019-04-04 03:36:27 +11:00
set yrange [ 0.0 : 30.0 ]
plot "${TMPFILE}" using 1:3 title " inside" with lines, \
"${TMPFILE}" using 1:4 title "ambient" with lines
2019-04-04 03:36:27 +11:00
__EOC__
2019-05-16 02:22:44 +11:00
display ${IMAGE} &
2019-04-04 03:36:27 +11:00