Mercurial > templog
comparison web/log.py @ 101:fd8482365489
limit temps to 35º on graph
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 25 Jul 2012 23:03:10 +0800 |
parents | 1a88bb989afb |
children | ef59da811986 |
comparison
equal
deleted
inserted
replaced
99:1a88bb989afb | 101:fd8482365489 |
---|---|
68 graph_args.append('DEF:%(vname)s=%(rrdfile)s:temp:AVERAGE:step=3600' % locals()) | 68 graph_args.append('DEF:%(vname)s=%(rrdfile)s:temp:AVERAGE:step=3600' % locals()) |
69 unit = 'V' | 69 unit = 'V' |
70 else: | 70 else: |
71 vname = 'temp%d' % n | 71 vname = 'temp%d' % n |
72 graph_args.append('DEF:raw%(vname)s=%(rrdfile)s:temp:AVERAGE' % locals()) | 72 graph_args.append('DEF:raw%(vname)s=%(rrdfile)s:temp:AVERAGE' % locals()) |
73 graph_args.append('CDEF:%(vname)s=raw%(vname)s,0.1,*,2,+' % locals()) | 73 # limit max temp to 50 |
74 graph_args.append('CDEF:%(vname)s=raw%(vname)s,35,GT,UNKN,raw%(vname)s,0.1,*,2,+,IF' % locals()) | |
74 unit = '<span face="Liberation Serif">º</span>C' | 75 unit = '<span face="Liberation Serif">º</span>C' |
75 | 76 |
76 last_value = float(rrdtool.info(rrdfile)['ds[temp].last_ds']) | 77 last_value = float(rrdtool.info(rrdfile)['ds[temp].last_ds']) |
77 width = config.LINE_WIDTH | 78 width = config.LINE_WIDTH |
78 legend = config.SENSOR_NAMES.get(sensor, sensor) | 79 legend = config.SENSOR_NAMES.get(sensor, sensor) |