[rrd-users] Difficulty getting rrdtool to store "daily" information
Bill Moran
wmoran at collaborativefusion.com
Fri Feb 16 22:50:32 CET 2007
In response to Simon Hobson <linux at thehobsons.co.uk>:
> Bill Moran wrote:
>
> >rrdtool update /var/www/bacula/jobs.rrd 1171083600:68440880988
> >rrdtool update /var/www/bacula/jobs.rrd 1171170000:384966685
> >rrdtool update /var/www/bacula/jobs.rrd 1171256400:7604606807
> >rrdtool update /var/www/bacula/jobs.rrd 1171342800:5511113163
> >rrdtool update /var/www/bacula/jobs.rrd 1171429200:7160839755
> >
> >Now, an XML dump of the rrd shows me _very_ different data than what I would
> >expect: (trimmed for clarity, let me know if I need to provide the whole
> >thing)
>
> <snip>
>
> ><!-- 2007-02-09 19:00:00 EST / 1171065600 --> <row><v> NaN </v></row>
> ><!-- 2007-02-10 19:00:00 EST / 1171152000 --> <row><v>
> >4.4556329282e+03 </v></row>
> ><!-- 2007-02-11 19:00:00 EST / 1171238400 --> <row><v>
> >7.0607813830e+04 </v></row>
> ><!-- 2007-02-12 19:00:00 EST / 1171324800 --> <row><v>
> >6.8834000835e+04 </v></row>
> ><!-- 2007-02-13 19:00:00 EST / 1171411200 --> <row><v> 7.8902161053e+04
>
> >Now those e+04, e+03 values are way lower than what I put in. I'm
> >guessing that somewhere rrdtool is still averaging that data over
> >some period or something, but I'm at a loss as to what I can do to
> >get it in there the way I want it.
> >I thought the MAX declarations would take care of it, but I must still be
> >missing something.
>
> If you try, you will find that (for example) 384966685 / 86400 is
> about 4.45e+03
Hmm ... must have fumble-fingered my math when I checked that ...
> RRD tool stores RATES, therefore when you stuff a value in each day,
> it divides by 86400 to get a RATE for the day (it also does stuff to
> adjust for updates not occurring on sample boundaries but that's
> another matter). So to get the total amount for the day, just
> multiply by 86400 (number of seconds in a day).
ahh ... the key here is that rrdtool defaults to rate/second. I want
rate/day. Your trick would have worked fine, but (in my case) switching
to GAUGE solved the problem equally well.
Thanks for the help.
--
Bill Moran
Collaborative Fusion Inc.
More information about the rrd-users
mailing list