[rrd-developers] Re: If I could save time as a double ...

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Tue Nov 20 00:03:56 MET 2001


Dave Plonka wrote:

welcome back...

> [...]
> I'm exploring the possibility of using rrdtool to do this.
> Some options I have are:
> 
> 0) Use rrdtool unmodified, but use it in a kludged way by lying to it
>    about the "current" time on updates.

Did this; while you will be able to get it working it isn't nice
to work with.  OTOH it's probably less effort than changing the
code.  You're likely to encounter problems and other stuff that
you didn't knew existed doing so.

> 1) Modify rrdtool to allow a double as the step value.

I'd opt for an integer fraction.  A short brainstorm session with
myself alone showed that IMHO it is much cleaner.  Another 32-bit
value gives the most digits per byte *and* gives the best precision
so that's probably what would be best.  Using an integer in stead of
a double will probably cause less rounding errors, at least that's
my gut feeling.

>    Is it possible to maintain binary compatibility for the data file
>    (finding some place to store four more bytes for the step) or would
>    this require a new version of the binary file format, and very
>    many source code changes including dump and restore?

Changing the source would be necessary just to process the fractions
so why not change the .rrd file format too.  RRDtool could continue
to work with old format files or it could convert them on the fly.
Of course, when it finds a new version file it stays that way.

-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list