[rrd-users] Graphing average temperatures

Petteri Matilainen pmatil at gmail.com
Wed Nov 21 22:02:12 CET 2007


I also think I may be confused. So, I am measuring outside temperatures
every 5 minutes and updating the temperatures.rrd every
time. Data is simply 23.56, -1.98 etc.

temperatures.rrd:

rrdtool create /var/digitemp/temperature.rrd DS:out:GAUGE:600:-50:50
DS:in:GAUGE:600:-50:50 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:MIN:0.5:1:600
RRA:MIN:0.5:6:700
RRA:MIN:0.5:24:775 RRA:MIN: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:288:797

So far graphing average values for the time period represented by each pixel
on the graph is ok. What I want is daily, weekly, monthly and yearly average
temperature graphs. That is, graphing the average temperature for the period
of the graph (GPRINT:Inside:AVERAGE:"\t%6.2lf °C"). I hope this helps.

cheers,

Petteri

On 11/21/07, Dan Cech <dcech at phpwerx.net> wrote:
>
> Petteri Matilainen wrote:
> > On 11/21/07, Simon Hobson <linux at thehobsons.co.uk> wrote:
> >> Petteri Matilainen wrote:
> >>
> >>> I'm currently graphing daily, weekly, monthly and yearly inside and
> >>> outside temperatures. The temperature values are fetched from SQL
> >>> database and then put into temperatures.rrd. I have a cron job that
> >>> runs this every 5 minutes. Then I wanted to graph average
> >>> temperatures too. I didn't think of any other way but to read
> >>> average temps from temperatures.rrd and them into a new rrd,
> >>> averages.rrd. Then I graph averages.rrd as usual.
> >
> >> Why don't you just graph the averages you already have in
> temperatures.rrd?
> >
> > How? I have
>
> On re-reading your post I think you may be confused.
>
> > DEF:Inside=/var/digitemp/temperature.rrd:in:AVERAGE
> > LINE1:Inside#3333CC:"Inside"
>
> This line will plot the average temperature for the time period
> represented by each pixel on your graph.
>
> > GPRINT:Inside:AVERAGE:"\t%6.2lf °C" <- this is the average I want to
> > plot which give me the "ordinary" graph. If I have
>
> This figure is a single number representing the average temperature for
> the period of the graph.
>
> > VDEF:avg=Inside,AVERAGE
> > LINE1:avg#3333CC:"Average"
> >
> > I get a straight horizontal line.
>
> This is correct.  If you plot the average temperature for the graph
> period, you will get a line straight across, because it is the same for
> the entire graph period.
>
> You will probably get more useful feedback if you post some more details
> about the structure of your temperatures.rrd, the data you are
> inserting, and what you are trying to achieve.
>
> Dan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20071121/2589ff74/attachment-0001.html 


More information about the rrd-users mailing list