[rrd-users] Graph per month - is it possible?
tobi at oetiker.ch
Sun Apr 3 13:04:18 CEST 2011
Today Maris Janis Vasilevskis wrote:
> I wish to get year graph with 12 values, one per month. Currently, I could not find any way to do it.
> Has anybody a positive experience?
> I tried to join 12 lines with different start, step and end - and I got even more strange results.
> I use 1.4.5 compiled on Linux exactly according to http://oss.oetiker.ch/rrdtool/doc/rrdbuild.en.html
> I call rrdtool from C++, but I performed also command line tests.
> In following excerpts, I use dates and expressions for readability.
> In reality, I use only numbers - seconds for step, seconds from epoch for start and end.
> rrdtool create test.rrd --step 1 --start -2year DS:cpu:GAUGE:600:0:100
> There are also RRAs for week, hour and minute.
> To be safe about last year data, I filled database with test values for 2 years (update with step 10 secs).
> rrtool graph --end now --start end-14month
> I get results for some months only, most part of graph is empty.
cool idea ... but you can not have math expression in the step
argument, so you must calculte them externally.
> To understand what is happening, I removed end from DEFs and tested with single DEF.
> Normal graph from Apr 1 to now
> Start somewhere at end of May, possibly May 30.
> Similarly, for most months graph starts in one of last days.
> Exceptions: Apr 2010 and Mar 2011 seem to work normally, Feb 2011 starts near to the month beginning.
> Has anybody some ideas or tricks to get monthly data?
> Thank you,
> P.S. Recently performed some operations on calculator.
> It seems that real graph start always should contain whole number of steps from epoch (Jan 1, 1970).
> In my case, Apr 1 2010 = 14700 days from epoch, and this number divides with step 30 days.
> Feb 3 2011 divides by 28, Mar 2 2011 divides by 31 - I erroneously identified graphs from 1 as complete month.
> Why such a rule and is there any workaround?
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-users