[rrd-users] Still having problems

Russell Handorf rhandorf at handorf.org
Mon Apr 9 22:30:05 CEST 2007


Greetings,

I wrote once before and no one responded. I'm trying to setup a RRD 
database that will hold one value once a day. I'm terribly lost, the 
documentation didnt make too much sense too me as far as the DB is 
concerned. I tried following some examples, but I am getting really 
random and unexplainable results.

I have the DB setup like this

$rrdtool create $rrd --start $timep --step 86400 
DS:sql:ABSOLUTE:86400:0:10000000 RRA:MAX:0.5:1:6000

$rrdtool = path to rrdtool
$rrd = the path and name of the rrd file
$timep = some time i'm analyzing minus one day

I then input values into this DB with the following line:

$rrdtool update $rrd $time:$SQLJoinr

$rrdtool = path to rrdtool
$rrd = the path and name of the rrd file
$time = the time in seconds of the line item being analyzed
$SQLJoinr = a low integer value, typically thus far less than 20 but can 
be as high as the mid thousand

I have no errors when I run through the program, and I have it 
outputting the values listed above. This is where the frustrating part 
comes. When I graph the values, they're not the whole integer's listed 
as the value of $SQLJoinr. In fact, the numbers stored make no sense 
whatsoever. I've run 'rrdtool dump' on the file to find the following:

<rrd>
        <version> 0003 </version>
        <step> 86400 </step> <!-- Seconds -->
        <lastupdate> 1176004800 </lastupdate> <!-- 2007-04-08 00:00:00 
EDT -->

        <ds>
                <name> sql </name>
                <type> ABSOLUTE </type>
                <minimal_heartbeat> 86400 </minimal_heartbeat>
                <min> 0.0000000000e+00 </min>
                <max> 1.0000000000e+07 </max>

                <!-- PDP Status -->
                <last_ds> UNKN </last_ds>
                <value> 4.1666666667e+00 </value>
                <unknown_sec> 0 </unknown_sec>
        </ds>
        <rra>
                <cf> MAX </cf>
                <pdp_per_row> 1 </pdp_per_row> <!-- 86400 seconds -->

                <params>
                <xff> 5.0000000000e-01 </xff>
                </params>
                <cdp_prep>
                        <ds>
                        <primary_value> 2.7584876543e-04 </primary_value>
                        <secondary_value> 0.0000000000e+00 
</secondary_value>
                        <value> NaN </value>
                        <unknown_datapoints> 0 </unknown_datapoints>
                        </ds>
                </cdp_prep>
                <database>
                        <!-- 1990-11-03 19:00:00 EST / 657676800 --> 
<row><v> NaN </v></row>
                        <!-- 1990-11-04 19:00:00 EST / 657763200 --> 
<row><v> NaN </v></row>
                        <!-- 1990-11-05 19:00:00 EST / 657849600 --> 
<row><v> NaN </v></row>
                        <!-- 1990-11-06 19:00:00 EST / 657936000 --> 
<row><v> NaN </v></row>
......<snip a whole bunch of dates, as to why it is going this far in 
the past I have NO clue>.....
                        <!-- 2007-02-22 19:00:00 EST / 1172188800 --> 
<row><v> NaN </v></row>
                        <!-- 2007-02-23 19:00:00 EST / 1172275200 --> 
<row><v> 8.1018518519e-05 </v></row>
                        <!-- 2007-02-24 19:00:00 EST / 1172361600 --> 
<row><v> 2.9176311728e-04 </v></row>
                        <!-- 2007-02-25 19:00:00 EST / 1172448000 --> 
<row><v> 3.5638503086e-04 </v></row>
                        <!-- 2007-02-26 19:00:00 EST / 1172534400 --> 
<row><v> 3.4047067901e-04 </v></row>
                        <!-- 2007-02-27 19:00:00 EST / 1172620800 --> 
<row><v> 3.9978780864e-04 </v></row>
                        <!-- 2007-02-28 19:00:00 EST / 1172707200 --> 
<row><v> 3.2503858025e-04 </v></row>
                        <!-- 2007-03-01 19:00:00 EST / 1172793600 --> 
<row><v> 2.9176311728e-04 </v></row>
                        <!-- 2007-03-02 19:00:00 EST / 1172880000 --> 
<row><v> 3.9930555556e-04 </v></row>
                        <!-- 2007-03-03 19:00:00 EST / 1172966400 --> 
<row><v> 4.4656635802e-04 </v></row>
                        <!-- 2007-03-04 19:00:00 EST / 1173052800 --> 
<row><v> 4.1473765432e-04 </v></row>
                        <!-- 2007-03-05 19:00:00 EST / 1173139200 --> 
<row><v> 4.3258101852e-04 </v></row>
                        <!-- 2007-03-06 19:00:00 EST / 1173225600 --> 
<row><v> 3.9400077160e-04 </v></row>
                        <!-- 2007-03-07 19:00:00 EST / 1173312000 --> 
<row><v> 3.5445601852e-04 </v></row>
                        <!-- 2007-03-08 19:00:00 EST / 1173398400 --> 
<row><v> 3.5638503086e-04 </v></row>
                        <!-- 2007-03-09 19:00:00 EST / 1173484800 --> 
<row><v> 4.1377314815e-04 </v></row>
                        <!-- 2007-03-10 19:00:00 EST / 1173571200 --> 
<row><v> 3.5493827160e-04 </v></row>
                        <!-- 2007-03-11 20:00:00 EDT / 1173657600 --> 
<row><v> 4.0456840446e-04 </v></row>
                        <!-- 2007-03-12 20:00:00 EDT / 1173744000 --> 
<row><v> 2.6335212024e-04 </v></row>
                        <!-- 2007-03-13 20:00:00 EDT / 1173830400 --> 
<row><v> 2.8935185185e-04 </v></row>
                        <!-- 2007-03-14 20:00:00 EDT / 1173916800 --> 
<row><v> 2.1412037037e-04 </v></row>
                        <!-- 2007-03-15 20:00:00 EDT / 1174003200 --> 
<row><v> 3.2214506173e-04 </v></row>
                        <!-- 2007-03-16 20:00:00 EDT / 1174089600 --> 
<row><v> 3.8580246914e-04 </v></row>
                        <!-- 2007-03-17 20:00:00 EDT / 1174176000 --> 
<row><v> 3.5493827160e-04 </v></row>
                        <!-- 2007-03-18 20:00:00 EDT / 1174262400 --> 
<row><v> 3.3757716049e-04 </v></row>
                        <!-- 2007-03-19 20:00:00 EDT / 1174348800 --> 
<row><v> 2.3919753086e-04 </v></row>
                        <!-- 2007-03-20 20:00:00 EDT / 1174435200 --> 
<row><v> 2.2955246914e-04 </v></row>
                        <!-- 2007-03-21 20:00:00 EDT / 1174521600 --> 
<row><v> 2.3148148148e-04 </v></row>
                        <!-- 2007-03-22 20:00:00 EDT / 1174608000 --> 
<row><v> 2.5077160494e-04 </v></row>
                        <!-- 2007-03-23 20:00:00 EDT / 1174694400 --> 
<row><v> 2.3533950617e-04 </v></row>
                        <!-- 2007-03-24 20:00:00 EDT / 1174780800 --> 
<row><v> 2.8935185185e-04 </v></row>
                        <!-- 2007-03-25 20:00:00 EDT / 1174867200 --> 
<row><v> 2.6234567901e-04 </v></row>
                        <!-- 2007-03-26 20:00:00 EDT / 1174953600 --> 
<row><v> 4.0895061728e-04 </v></row>
                        <!-- 2007-03-27 20:00:00 EDT / 1175040000 --> 
<row><v> 2.6620370370e-04 </v></row>
                        <!-- 2007-03-28 20:00:00 EDT / 1175126400 --> 
<row><v> 2.7006172840e-04 </v></row>
                        <!-- 2007-03-29 20:00:00 EDT / 1175212800 --> 
<row><v> 2.0061728395e-04 </v></row>
                        <!-- 2007-03-30 20:00:00 EDT / 1175299200 --> 
<row><v> 3.2986111111e-04 </v></row>
                        <!-- 2007-03-31 20:00:00 EDT / 1175385600 --> 
<row><v> 3.4915123457e-04 </v></row>
                        <!-- 2007-04-01 20:00:00 EDT / 1175472000 --> 
<row><v> 3.2793209877e-04 </v></row>
                        <!-- 2007-04-02 20:00:00 EDT / 1175558400 --> 
<row><v> 3.8194444444e-04 </v></row>
                        <!-- 2007-04-03 20:00:00 EDT / 1175644800 --> 
<row><v> 2.3919753086e-04 </v></row>
                        <!-- 2007-04-04 20:00:00 EDT / 1175731200 --> 
<row><v> 2.8549382716e-04 </v></row>
                        <!-- 2007-04-05 20:00:00 EDT / 1175817600 --> 
<row><v> 2.3341049383e-04 </v></row>
                        <!-- 2007-04-06 20:00:00 EDT / 1175904000 --> 
<row><v> 2.1026234568e-04 </v></row>
                        <!-- 2007-04-07 20:00:00 EDT / 1175990400 --> 
<row><v> 2.7584876543e-04 </v></row>
                </database>
        </rra>
</rrd>


Can someone please explain to me why this isnt working at all? Why does 
it start all the way into the past back into the early 90's? Why does it 
store the incorrect values? I know it's doing what I'm telling it to do, 
and as such I know I'm making a mistake somewhere but I dont know where. 
I appreciate any response regarding this.

Thanks in advance.



More information about the rrd-users mailing list