comparison README @ 9:139e267c9965

Use DERIVE instead of counter. Add graph example
author Daniel O'Connor <darius@dons.net.au>
date Thu, 21 Nov 2013 00:01:28 +1030
parents 08b192a6e189
children d3b5e4251950
comparison
equal deleted inserted replaced
8:08b192a6e189 9:139e267c9965
1 An RRD can be created like so.. 1 An RRD can be created like so..
2 2
3 rrdtool create ~/meter.rrd \ 3 rrdtool create ~/meter.rrd \
4 DS:import:COUNTER:600:U:U \ 4 DS:import:DERIVE:600:U:U \
5 DS:export:COUNTER:600:U:U \ 5 DS:export:DERIVE:600:U:U \
6 RRA:AVERAGE:0.5:1:105120 \ 6 RRA:AVERAGE:0.5:1:105120 \
7 RRA:AVERAGE:0.5:12:105120 \ 7 RRA:AVERAGE:0.5:12:105120 \
8 RRA:MAX:0.5:1:105120 \ 8 RRA:MAX:0.5:1:105120 \
9 RRA:MAX:0.5:12:105120 \ 9 RRA:MAX:0.5:12:105120 \
10 RRA:MIN:0.5:1:105120 \ 10 RRA:MIN:0.5:1:10512 \
11 RRA:MIN:0.5:12:105120 11 RRA:MIN:0.5:12:105120
12 12
13 Then data added with.. 13 Then data added with..
14 rrdtool update ~/meter.rrd `ssh -ay -i ~/.ssh/id_rpi pi@raspberrypi python iec1107/iec1107.py -r /dev/ttyUSB0` 14 rrdtool update ~/meter.rrd `ssh -ay -i ~/.ssh/id_rpi pi@raspberrypi python iec1107/iec1107.py -r /dev/ttyUSB0`
15 15
16 Graph with..
17 rrdtool graph ~/html/power-day.png --start -86400 -t "Power import/export (last 24 hours)"\
18 DEF:import=$HOME/meter.rrd:import:AVERAGE \
19 DEF:export=$HOME/meter.rrd:export:AVERAGE \
20 AREA:import\#00FF00:"Imported (Wh)" \
21 LINE1:export\#0000FF:"Exported (Wh)"
22
16 23