Pre-release demo version
[ampy.git] / readme
1 https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/yhdc-sct-013-000-ct-sensor-report
2
3 rrdtool create power.rrd --step 1s DS:watts:GAUGE:1:0:6600 RRA:AVERAGE:0.5:1s:1d  # Buggy: nécessite des updates toutes les 500 ms
4 rrdtool create power.rrd --daemon /var/run/rrdcached.sock --step 1s DS:watts:GAUGE:1:0:6600 RRA:AVERAGE:0.5:1s:1d  # Buggy: nécessite des updates toutes les 500 ms
5
6 rrdtool create /var/lib/rrdcached/db/power.rrd \
7         --step 1s \
8         DS:watts:GAUGE:1s:0:10000 \
9         RRA:AVERAGE:0.5:1s:1d \
10         RRA:AVERAGE:0.5:1m:3d \
11         RRA:AVERAGE:0.5:15m:1w \
12         RRA:AVERAGE:0.5:1h:30d \
13         RRA:AVERAGE:0.5:1d:3y \
14         RRA:MAX:0.5:1d:3y \
15         RRA:AVERAGE:0.5:1month:10y \
16         RRA:MAX:0.5:1month:10y
17
18 Ceci n'est pas rafraîchi très souvent:
19 watch -n 0.5 rrdtool graphv - '-s' '1546280606' 'DEF:watts=/var/lib/rrdcached/db/power.rrd:watts:AVERAGE' 'VDEF:avg=watts,AVERAGE' 'VDEF:last=watts,LAST' 'PRINT:avg:%lf' 'PRINT:last:%lf'
20 Alors que ça si:
21 watch -n 0.5 rrdtool lastupdate --daemon /var/run/rrdcached.sock /var/lib/rrdcached/db/power.rrd