Page No longer updated
Hi, This problem is long fixed, but I have a new problem. The problem this
time is that I'm recording the data wrong, or something, as it is being
averaged out, so the min/max temperatures are wrong for monthly/yearly/etc
graphs. I have stoped updating this page as of Friday 4th of Aprial, 2008,
but will start to look into this problem on a new page.
Thank you for any interest you ave shown on this subject.
Yours sincerely
Max Harvey.
PROBLEM SOLVED
Ok, this is a little embarrassing, but...
There wasn't actually a problem. I though that the Month graph was only
showing two weeks worth on the X axis, but it was actually showing the
entire month. I was just counting the occurances of Monday's, but since it
was only placing a word every three days in the bottom ledger, a Monday
wasn't displayed every week. The data, AND the scale were FINE!
Thanks to Alex for pointing it out to me.
Since this message was posted in the mrtg mailing list,
and my request for help is now archived
for all to find, I will leave this page available for viewing, but I will only
update the graphs on the page once daily, rather than every 5
minutes.
Once again thanks to those who read the message and helped me see my mistake
(or lack of it apparently).
Max.
11th December, 2007
The Problem...
The problem is with my (limited) understanding of the rrdtool suit of tools.
I measure the inside and outside temperature of my house, and log it every
five minutes with rrdtools.
With this data I then make a two day graph, a week graph, a month graph and a
year graph..
The problem is that my month graph seems to really be a two
week graph instead of a whole month!
Below are listed the graphs, the command i used to create the round robin
datebase (temperature.rrd), and the commands I use to create the
graphs.
All the graphs kind of look like I expect them to, apart from the month
one, which only seems to like two weeks on the X axies
if you can assist me, please respond to the forumn that this was posted to,
or email me at rrdproblem0712@corporateturtles.com
Thank you for your assistance. These graphs will only be updated every 5 or
so minutes while I am working on a solution to this problem. I will change
this message once I stop updating them. Now that I have resloved the
problem, these graphs and data file will only be updated once
daily, at about midnight (NZST).
Temperature graphs
2 days

1 Week

1 Month

1 year

The File
The round robin database which has data stored in it is temperature.rrd, and is updated onto this webpage
at the same time the image is updated (ie its current as the currently
displayed graph)
Code
rrdtool create
rrdtool create temperature.rrd DS:internal:GAUGE:864:U:U \
DS:inside:GAUGE:864:U:U \
DS:outside:GAUGE:864:U:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:228:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775\
RRA:MIN:0.5:228:797\
RRA:LAST:0.5:1:2
rrdtool graph
#
# Graph for temperature, Dalmore, Dunedin
# -- TWO DAYS
#
rrdtool graph /var/www/rrdtool/temperature-day.png \
DEF:in1=/var/www/rrdtool/temperature.rrd:internal:AVERAGE \
DEF:in2=/var/www/rrdtool/temperature.rrd:inside:AVERAGE \
DEF:out=/var/www/rrdtool/temperature.rrd:outside:AVERAGE \
VDEF:MaxIn1=in1,MAXIMUM \
VDEF:MinIn1=in1,MINIMUM \
VDEF:AvgIn1=in1,AVERAGE \
VDEF:CurrentIn1=in1,LAST \
VDEF:MaxIn2=in2,MAXIMUM \
VDEF:MinIn2=in2,MINIMUM \
VDEF:AvgIn2=in2,AVERAGE \
VDEF:CurrentIn2=in2,LAST \
VDEF:MaxOut=out,MAXIMUM \
VDEF:MinOut=out,MINIMUM \
VDEF:AvgOut=out,AVERAGE \
VDEF:CurrentOut=out,LAST \
COMMENT:"\t\t\tMax\t\t\t\t Min\t\t\t\t\t Average\t\t\t\t\tCurrent\n" \
AREA:in2#00FF00:"Inside" \
GPRINT:MaxIn2:"%8.2lf deg C" \
GPRINT:MinIn2:"\t\t%7.2lf deg C" \
GPRINT:AvgIn2:"\t\t\t%8.2lf deg C" \
GPRINT:CurrentIn2:"\t\t\t%8.2lf deg C\n" \
LINE1:out#FF0000:"Outside" \
GPRINT:MaxOut:"%7.2lf deg C" \
GPRINT:MinOut:"\t\t%7.2lf deg C" \
GPRINT:AvgOut:"\t\t\t%8.2lf deg C" \
GPRINT:CurrentOut:"\t\t\t%8.2lf deg C\n" \
--title "Temperature, Dalmore, Dunedin, New Zealand 9010" \
--base 1000 -r -X 0 \
-s -48h -w 790 -l 0
#
# Graph for temperature, Dalmore, Dunedin
# -- WEEK
#
rrdtool graph /var/www/rrdtool/temperature-week.png \
DEF:in1=/var/www/rrdtool/temperature.rrd:internal:AVERAGE \
DEF:in2=/var/www/rrdtool/temperature.rrd:inside:AVERAGE \
DEF:out=/var/www/rrdtool/temperature.rrd:outside:AVERAGE \
VDEF:MaxIn1=in1,MAXIMUM \
VDEF:MinIn1=in1,MINIMUM \
VDEF:AvgIn1=in1,AVERAGE \
VDEF:CurrentIn1=in1,LAST \
VDEF:MaxIn2=in2,MAXIMUM \
VDEF:MinIn2=in2,MINIMUM \
VDEF:AvgIn2=in2,AVERAGE \
VDEF:CurrentIn2=in2,LAST \
VDEF:MaxOut=out,MAXIMUM \
VDEF:MinOut=out,MINIMUM \
VDEF:AvgOut=out,AVERAGE \
VDEF:CurrentOut=out,LAST \
COMMENT:"\t\t\tMax\t\t\t\t Min\t\t\t\t\t Average\t\t\t\tCurrent\n" \
AREA:in2#00FF00:"Inside" \
GPRINT:MaxIn2:"%8.2lf deg C" \
GPRINT:MinIn2:"\t\t%7.2lf deg C" \
GPRINT:AvgIn2:"\t\t\t%8.2lf deg C" \
GPRINT:CurrentIn2:"\t\t%8.2lf deg C\n" \
LINE1:out#FF0000:"Outside" \
GPRINT:MaxOut:"%7.2lf deg C" \
GPRINT:MinOut:"\t\t%7.2lf deg C" \
GPRINT:AvgOut:"\t\t\t%8.2lf deg C" \
GPRINT:CurrentOut:"\t\t%8.2lf deg C\n" \
--title "Temperature, Dalmore, Dunedin, New Zealand 9010" \
--base 1000 -r -X 0 \
-s -168h -w 790 -l 0 --lazy
#
# Graph for temperature, Dalmore, Dunedin
# -- MONTH
#
rrdtool graph /var/www/rrdtool/temperature-month.png \
DEF:in1=/var/www/rrdtool/temperature.rrd:internal:AVERAGE \
DEF:in2=/var/www/rrdtool/temperature.rrd:inside:AVERAGE \
DEF:out=/var/www/rrdtool/temperature.rrd:outside:AVERAGE \
VDEF:MaxIn1=in1,MAXIMUM \
VDEF:MinIn1=in1,MINIMUM \
VDEF:AvgIn1=in1,AVERAGE \
VDEF:CurrentIn1=in1,LAST \
VDEF:MaxIn2=in2,MAXIMUM \
VDEF:MinIn2=in2,MINIMUM \
VDEF:AvgIn2=in2,AVERAGE \
VDEF:CurrentIn2=in2,LAST \
VDEF:MaxOut=out,MAXIMUM \
VDEF:MinOut=out,MINIMUM \
VDEF:AvgOut=out,AVERAGE \
VDEF:CurrentOut=out,LAST \
COMMENT:"\t\t\tMax\t\t\t\t Min\t\t\t\t\t Average\t\t\t\tCurrent\n" \
AREA:in2#00FF00:"Inside" \
GPRINT:MaxIn2:"%8.2lf deg C" \
GPRINT:MinIn2:"\t\t%7.2lf deg C" \
GPRINT:AvgIn2:"\t\t\t%8.2lf deg C" \
GPRINT:CurrentIn2:"\t\t%8.2lf deg C\n" \
LINE1:out#FF0000:"Outside" \
GPRINT:MaxOut:"%7.2lf deg C" \
GPRINT:MinOut:"\t\t%7.2lf deg C" \
GPRINT:AvgOut:"\t\t\t%8.2lf deg C" \
GPRINT:CurrentOut:"\t\t%8.2lf deg C\n" \
--title "Temperature, Dalmore, Dunedin, New Zealand 9010" \
--base 1000 -r -X 0 \
-s -730h -w 790 -l 0 --lazy
#
# Graph for temperature, Dalmore, Dunedin
# -- YEAR
#
rrdtool graph /var/www/rrdtool/temperature-year.png \
DEF:in1=/var/www/rrdtool/temperature.rrd:internal:AVERAGE \
DEF:in2=/var/www/rrdtool/temperature.rrd:inside:AVERAGE \
DEF:out=/var/www/rrdtool/temperature.rrd:outside:AVERAGE \
VDEF:MaxIn1=in1,MAXIMUM \
VDEF:MinIn1=in1,MINIMUM \
VDEF:AvgIn1=in1,AVERAGE \
VDEF:CurrentIn1=in1,LAST \
VDEF:MaxIn2=in2,MAXIMUM \
VDEF:MinIn2=in2,MINIMUM \
VDEF:AvgIn2=in2,AVERAGE \
VDEF:CurrentIn2=in2,LAST \
VDEF:MaxOut=out,MAXIMUM \
VDEF:MinOut=out,MINIMUM \
VDEF:AvgOut=out,AVERAGE \
VDEF:CurrentOut=out,LAST \
COMMENT:"\t\t\tMax\t\t\t\t Min\t\t\t\t\t Average\t\t\t\tCurrent\n" \
AREA:in2#00FF00:"Inside" \
GPRINT:MaxIn2:"%8.2lf deg C" \
GPRINT:MinIn2:"\t\t%7.2lf deg C" \
GPRINT:AvgIn2:"\t\t\t%8.2lf deg C" \
GPRINT:CurrentIn2:"\t\t%8.2lf deg C\n" \
LINE1:out#FF0000:"Outside" \
GPRINT:MaxOut:"%7.2lf deg C" \
GPRINT:MinOut:"\t\t%7.2lf deg C" \
GPRINT:AvgOut:"\t\t\t%8.2lf deg C" \
GPRINT:CurrentOut:"\t\t%8.2lf deg C\n" \
--title "Temperature, Dalmore, Dunedin, New Zealand 9010" \
--base 1000 -r -X 0 \
-s -8760h -w 790 -l 0 --lazy