DD2-monitor/rrdb/getvalues.sh

26 lines
341 B
Bash
Executable File

#!/bin/bash
source ./commun.sh
tmpf="somevalues.dat"
rrdtool fetch $RRDB LAST |
tr -d ':' |
awk '
(!/nan/ && NF==2) { print $1, $2 }
' \
> ${tmpf}
#
# as an example, we are gnuploting our datas
#
gnuplot << __EOC__
set term png size 800,600
set output "graphe.png"
set grid
plot "${tmpf}" with lines
__EOC__
rm ${tmpf}