Re: [rrd-users] Diurnal average

2017-07-14 Thread Simon Hobson
Helios Solaris  wrote:

> Is there an easy way to plot a diurnal average?
> I.e. the average from all days at 00:00, 00:01, 00:02 etc. so that I
> have a plot of an average day?

Over how many days ?
You might be able to do it with some of the time shift functions. If, for 
example, you wanted to do one day and average over the last , then I think you 
might do it like this :

Assuming START and END are already defined variables which give the start and 
end of our 7th day, and wiring "sort of shell script" (I'm used to dynamically 
generating graphs from Bash scripts and piping the resulting rrd command 
through rrd) ...

graph ... start=$START end=$END
def:day7=datafile.rrd:data
def:day6=datafile.rrd:data:start=$START-1day:end=$END-1day
...
def:day1=datafile.rrd:data:start=$START-6days:end=$END-6days

def:dayave=day1,day2,day3,day4,day5,day6,day7,add,add,add,add,add,add,7,div


You should now have a cdef with values which are the averages of the 
corresponding time slots over the last 7 days. I would suggest having a good 
read of the docs as the syntax above may not be completely accurate.


___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


[rrd-users] Diurnal average

2017-07-14 Thread Helios Solaris

Hi,

Is there an easy way to plot a diurnal average?
I.e. the average from all days at 00:00, 00:01, 00:02 etc. so that I
have a plot of an average day?

My only idea is to dump the database and calculate the average for each
minute using a bash script. But it's nasty and extremely slow.
I hope there is a better (rrdtool internal?) way. Any ideas are appreciated.

Thanks

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users