Bug in dump/restore

6 messages Options
Embed this post
Permalink
Fabian Zimmermann

Bug in dump/restore

Reply Threaded More More options
Print post
Permalink
Hello,

is there a known bug in dump/restore of rrdtool? I tried to find some
more information, but google didn't return anything useful.

If I do a:

rrdtool dump test.rrd > dump.xml

i get:

<!-- 2009-10-08 01:50:00 CEST / 1254959400 --> <row><v> 1.4980000000e+01
</v><v> 9.5716666667e+00 </v></row>
<!-- 2009-10-08 01:55:00 CEST / 1254959700 --> <row><v> 3.8149000000e+02
</v><v> 7.0007666667e+02 </v></row>
<!-- 2009-10-08 02:00:00 CEST / 1254960000 --> <row><v> 2.8804000000e+02
</v><v> 5.3001333333e+02 </v></row>
<!-- 2009-10-08 02:05:00 CEST / 1254960300 --> <row><v> 2.8804000000e+02
</v><v> 5.3001333333e+02 </v></row>

followed by:

rrdtool restore dump.xml restored.rrd
rrdtool dump restored.rrd

and I got:

<!-- 2009-10-08 01:50:00 CEST / 1254959400 --> <row><v> 1.0000000000e+00
</v><v> 9.0000000000e+00 </v></row>
<!-- 2009-10-08 01:55:00 CEST / 1254959700 --> <row><v> 3.0000000000e+00
</v><v> 7.0000000000e+00 </v></row>
<!-- 2009-10-08 02:00:00 CEST / 1254960000 --> <row><v> 2.0000000000e+00
</v><v> 5.0000000000e+00 </v></row>
<!-- 2009-10-08 02:05:00 CEST / 1254960300 --> <row><v> 2.0000000000e+00
</v><v> 5.0000000000e+00 </v></row>

I tested this with 1.3.1 (Lenny) and 1.3.8 (Squeeze). I also tried
"--no-header" and/or "--range-check", but still the same.

Any ideas?

Thanks a lot,
Fabian

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Benny Baumann

Re: Bug in dump/restore

Reply Threaded More More options
Print post
Permalink
Hi, when I enhanced the rrd_dump method a bit I did some changes to
rrd_dump to reduce the output of spaces. IDK if this has any effect, but
the versions affected by this aren't before 1.3.999*. Please recheck
with a version there, if you notice any differences and report back please.

In addition it would be nice if you could have a look if this affects
import (restore) or export (dump) of an RRD file, but given your initial
export had the correct values still present I suspect the error to be
within rrd_restore. Please try to verify this by querying the stored
values using a rrd_fetch or simular means.

Another detail which might be of interest: Which locales are you using
when running rrdtool?

Regards,
BenBE.

P.S.: A short "summary" like "precision lost with reimport" would have
been nice ;-)

Am 20.10.2009 12:11, schrieb Fabian Zimmermann:

> Hello,
>
> is there a known bug in dump/restore of rrdtool? I tried to find some
> more information, but google didn't return anything useful.
>
> If I do a:
>
> rrdtool dump test.rrd > dump.xml
>
> i get:
>
> <!-- 2009-10-08 01:50:00 CEST / 1254959400 --> <row><v> 1.4980000000e+01
> </v><v> 9.5716666667e+00 </v></row>
> <!-- 2009-10-08 01:55:00 CEST / 1254959700 --> <row><v> 3.8149000000e+02
> </v><v> 7.0007666667e+02 </v></row>
> <!-- 2009-10-08 02:00:00 CEST / 1254960000 --> <row><v> 2.8804000000e+02
> </v><v> 5.3001333333e+02 </v></row>
> <!-- 2009-10-08 02:05:00 CEST / 1254960300 --> <row><v> 2.8804000000e+02
> </v><v> 5.3001333333e+02 </v></row>
>
> followed by:
>
> rrdtool restore dump.xml restored.rrd
> rrdtool dump restored.rrd
>
> and I got:
>
> <!-- 2009-10-08 01:50:00 CEST / 1254959400 --> <row><v> 1.0000000000e+00
> </v><v> 9.0000000000e+00 </v></row>
> <!-- 2009-10-08 01:55:00 CEST / 1254959700 --> <row><v> 3.0000000000e+00
> </v><v> 7.0000000000e+00 </v></row>
> <!-- 2009-10-08 02:00:00 CEST / 1254960000 --> <row><v> 2.0000000000e+00
> </v><v> 5.0000000000e+00 </v></row>
> <!-- 2009-10-08 02:05:00 CEST / 1254960300 --> <row><v> 2.0000000000e+00
> </v><v> 5.0000000000e+00 </v></row>
>
> I tested this with 1.3.1 (Lenny) and 1.3.8 (Squeeze). I also tried
> "--no-header" and/or "--range-check", but still the same.
>
> Any ideas?
>
> Thanks a lot,
> Fabian
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>  



_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

signature.asc (850 bytes) Download Attachment
Hermann-Josef Beckers

Re: Bug in dump/restore

Reply Threaded More More options
Print post
Permalink

Maybe it it the same problem as mine (no answer so far):
See my posts from friday and yesterday:

"REPost: Problem converting 32 bit disk-rrd's to 64 bit "

Thanks
hjb


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Fabian Zimmermann

Re: Bug in dump/restore

Reply Threaded More More options
Print post
Permalink
In reply to this post by Benny Baumann
Hi Benny Bauman,

 > Hi, when I enhanced the rrd_dump method a bit I did some changes to
 > rrd_dump to reduce the output of spaces. IDK if this has any effect, but
 > the versions affected by this aren't before 1.3.999*. Please recheck
 > with a version there, if you notice any differences and report back
please.

rrdtool dump org.rrd > test.xml
rrdtool restore test.xml dump.rrd
ERROR: line 45: expected a value but found an <value> element

on RRDtool 1.3.999 (Debian/experimental)

 > In addition it would be nice if you could have a look if this affects
 > import (restore) or export (dump) of an RRD file, but given your initial
 > export had the correct values still present I suspect the error to be
 > within rrd_restore. Please try to verify this by querying the stored
 > values using a rrd_fetch or simular means.
 >

rrdtool fetch org.rrd AVERAGE

1256026500: 2,1552833333e+02 3,3772833333e+02
1256026800: 2,1552833333e+02 3,3772833333e+02
1256027100: 4,1999333333e+02 6,8830666667e+02

rrdtool fetch dump.rrd AVERAGE

1256026500: 2,0000000000e+00 3,0000000000e+00
1256026800: 2,0000000000e+00 3,0000000000e+00
1256027100: 4,0000000000e+00 6,0000000000e+00

both done with 1.3.1

 > Another detail which might be of interest: Which locales are you using
 > when running rrdtool?

export LC_ALL=C - SOLVED the problem!

 > P.S.: A short "summary" like "precision lost with reimport" would have
 > been nice ;-)

Sorry, next time ;)

Thanks for pointing me to the locale-workaround. If you need further
information, just ask.

Fabian

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
oetiker

Re: Bug in dump/restore

Reply Threaded More More options
Print post
Permalink
Hi Fabian,

Today Fabian Zimmermann wrote:

> Hi Benny Bauman,
>
>  > Hi, when I enhanced the rrd_dump method a bit I did some changes to
>  > rrd_dump to reduce the output of spaces. IDK if this has any effect, but
>  > the versions affected by this aren't before 1.3.999*. Please recheck
>  > with a version there, if you notice any differences and report back
> please.
>
> rrdtool dump org.rrd > test.xml
> rrdtool restore test.xml dump.rrd
> ERROR: line 45: expected a value but found an <value> element
>
> on RRDtool 1.3.999 (Debian/experimental)
>
>  > In addition it would be nice if you could have a look if this affects
>  > import (restore) or export (dump) of an RRD file, but given your initial
>  > export had the correct values still present I suspect the error to be
>  > within rrd_restore. Please try to verify this by querying the stored
>  > values using a rrd_fetch or simular means.
>  >
>
> rrdtool fetch org.rrd AVERAGE
>
> 1256026500: 2,1552833333e+02 3,3772833333e+02
> 1256026800: 2,1552833333e+02 3,3772833333e+02
> 1256027100: 4,1999333333e+02 6,8830666667e+02

> rrdtool fetch dump.rrd AVERAGE
>
> 1256026500: 2,0000000000e+00 3,0000000000e+00
> 1256026800: 2,0000000000e+00 3,0000000000e+00
> 1256027100: 4,0000000000e+00 6,0000000000e+00
>
> both done with 1.3.1
>
>  > Another detail which might be of interest: Which locales are you using
>  > when running rrdtool?
>
> export LC_ALL=C - SOLVED the problem!
>
>  > P.S.: A short "summary" like "precision lost with reimport" would have
>  > been nice ;-)
>
> Sorry, next time ;)
>
> Thanks for pointing me to the locale-workaround. If you need further
> information, just ask.

I thought I had theis LC_NUMERIC=C even in the code ... will check
... probably not in dump restore only in update ...

cheers
tobi
>
> Fabian
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
oetiker

Re: Bug in dump/restore

Reply Threaded More More options
Print post
Permalink
In reply to this post by Fabian Zimmermann
Hi Fabian,

Today Fabian Zimmermann wrote:

> Hi Benny Bauman,
>
>  > Hi, when I enhanced the rrd_dump method a bit I did some changes to
>  > rrd_dump to reduce the output of spaces. IDK if this has any effect, but
>  > the versions affected by this aren't before 1.3.999*. Please recheck
>  > with a version there, if you notice any differences and report back
> please.
>
> rrdtool dump org.rrd > test.xml
> rrdtool restore test.xml dump.rrd
> ERROR: line 45: expected a value but found an <value> element
>
> on RRDtool 1.3.999 (Debian/experimental)
>
>  > In addition it would be nice if you could have a look if this affects
>  > import (restore) or export (dump) of an RRD file, but given your initial
>  > export had the correct values still present I suspect the error to be
>  > within rrd_restore. Please try to verify this by querying the stored
>  > values using a rrd_fetch or simular means.
>  >
>
> rrdtool fetch org.rrd AVERAGE
>
> 1256026500: 2,1552833333e+02 3,3772833333e+02
> 1256026800: 2,1552833333e+02 3,3772833333e+02
> 1256027100: 4,1999333333e+02 6,8830666667e+02
>
> rrdtool fetch dump.rrd AVERAGE
>
> 1256026500: 2,0000000000e+00 3,0000000000e+00
> 1256026800: 2,0000000000e+00 3,0000000000e+00
> 1256027100: 4,0000000000e+00 6,0000000000e+00
>
> both done with 1.3.1
>
>  > Another detail which might be of interest: Which locales are you using
>  > when running rrdtool?
>
> export LC_ALL=C - SOLVED the problem!
>
>  > P.S.: A short "summary" like "precision lost with reimport" would have
>  > been nice ;-)
>
> Sorry, next time ;)
>
> Thanks for pointing me to the locale-workaround. If you need further
> information, just ask.
>

I have now added code to rrd_restore (trunk as well as 1.3 svn) to force LC_NUMERIC to C
regardles of your local setup.

thanks for finding this and being so brave as to work in a LANG
de_DE environment or some such ... things must be breaking quite
in most creative ways ... I guess ...

cheers
tobi


> Fabian
>
> _______________________________________________
> rrd-users mailing list
> [hidden email]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users