Mercurial > templog
changeset 351:2aed800aa2e9
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 23 Jun 2012 23:37:36 +0800 |
parents | e7f070855a22 (current diff) 03322c38b4a9 (diff) |
children | 99f8b97a9449 20f7161399a8 a1aa4176ca2c |
files | web/log.py |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/web/log.py Sat Jun 23 23:37:29 2012 +0800 +++ b/web/log.py Sat Jun 23 23:37:36 2012 +0800 @@ -22,10 +22,15 @@ for r in glob.glob('%s/*.rrd' % config.DATA_PATH)] def create_rrd(sensor_id): - rrdtool.create(sensor_rrd_path(sensor_id), '-s', '300', - 'DS:temp:GAUGE:600:-10:100', - 'RRA:AVERAGE:0.5:1:1051200') + # start date of 10 seconds into 1970 is used so that we can + # update with prior values straight away. + args = [sensor_rrd_path(sensor_id), + '--start', '10', + '--step', '300', + 'DS:temp:GAUGE:600:-10:100', + 'RRA:AVERAGE:0.5:1:1051200'] + rrdtool.create(*args) # stolen from viewmtn, stolen from monotone-viz def colour_from_string(str): @@ -57,6 +62,7 @@ '--slope-mode', '--border', '0', '--color', 'BACK#ffffff', + '--alt-y-grid', '--imgformat', 'PNG'] \ + graph_args if config.GRAPH_FONT: