Re: Wrong or missing values in summary

"Kiss Gabor (Bitman)" <[email protected]> Sat, 15 Nov 2008 07:51:10 +0100 (CET)
Newsgroups gmane.network.cricket.user
Message-ID <[email protected]>
> we use cricket v1.0.5 and moved the installation from an Debian Sarge to
> an Debian Etch server. Both servers are running on amd64 architecture.
> After moving all files (config, cricket-data, source) there is the
> problem, that we get wrong current values in summary. If I remove the
> corresponding rrd file, the current values in newly created graph are
> correct, but the maximum value is missing. The generated png files are
> correct all time.
>
> I guess, the problem is caused by a wrong section in RRD/Format.pm. Our
> values there are the following:
>
> --- snip ---
>        $self->{'statHead'} = "a4 a5 x7 d Q Q Q x80";
>        $self->{'dsDef'} = "a20 a20 Q d d x56";
>        $self->{'rraDef'} = "a20 x4 Q Q d x72";
>        $self->{'liveHead'} = "Q Q";
>        $self->{'liveHead3'} = "Q Q";
>        $self->{'pdpDef'} = "a30 x2 Q d x64";
>        $self->{'cdpDef'} = "d Q x64";
>        $self->{'rraPtr'} = "Q";
>        $self->{'element'} = "d";
> --- snap ---

Gee! This is quite strange. Original 1.0.5 looks like this:

        $self->{'newOld'} = "A4";
        $self->{'statHead'} = "a4 a5 x7 d L L L x4 x80";
        $self->{'dsDef'} = "a20 a20 L x4 d d x56";
        $self->{'rraDef'} = "a20 L L x4 d x72";
        $self->{'pdpDef'} = "a30 x2 L x4 d x64";
        $self->{'cdpDef'} = "d L x4 x64";

        $self->{'liveHead'} = "L";
        $self->{'liveHead3'} = "L L";
        $self->{'rraPtr'} = "L";
        $self->{'element'} = "d";

Notice that in your version all unsigned long (4 byte) values are changed
to quads (8 byte) ones. Moreover 'liveHead' doubled its size twice.

Page http://oss.oetiker.ch/rrdtool-trac/wiki/PortableRrdFormat writes:
| The RRD data format is native. This means it depends on the architecture of
| the machine as well as on the OS used to write the data. This has the
| advantage of being fast and simple. The downside of this is, that data can in
| general not be accessed from two different HW/OS combinations.

Probably your Sarge ran in 32 bit mode. (Sarge had no official amd64 port.)
Meanwhile your Etch must have 64 bit librrd*.

> Can anybody tell me, whether these entries are right or not? If they are
> correct, I need another possible explanation for this issue and a way to
> fix this.

If your newly created RRD files are correct the above structure should
be accepted. According to Tobias' explanation RRD files are not portable.
You may expect to read/write them on the same machine where they are
created.

Your old data can be safely transferred from one host to another
in XML format. (See rrddump and rrdrestore man pages.)

Gabor

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/