Monitoring du Phytotron
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

getvalues.sh 430B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. source ./commun.sh
  3. tmpf="somevalues.dat"
  4. rrdtool fetch $RRDB LAST \
  5. --start 0 |
  6. tr -d ':' |
  7. awk '
  8. (!/nan/ && NF==2) { print $1, $2 }
  9. ' \
  10. > ${tmpf}
  11. #
  12. # as an example, we are gnuploting our datas
  13. #
  14. gnuplot << __EOC__
  15. set term png size 1024,512
  16. set output "graphe.png"
  17. set grid
  18. set xdata time
  19. set timefmt "%s"
  20. set format x "%m/%d\n%H:%M"
  21. plot "${tmpf}" using 1:2 with lines
  22. __EOC__
  23. # rm ${tmpf}