[rrd-users] Unexpected value in RRD

Rajkumar S rajkumars at gmail.com
Tue Jun 15 15:37:46 CEST 2010


Thanks every one! One mystery is solved :)

raj

On Tue, Jun 15, 2010 at 5:46 PM, Karl Fischer <rrd-users at ficos.de> wrote:
> Am 15.06.2010 13:57, schrieb Rajkumar S:
>> Hi all,
>>
>> I was debugging a wrong graph in cacti and it finally boiled down to
>> wrong value in RRD.
>>
>> To debug I have isolated the problem into simple rrd commands, while
>> my input data is correct, the actual value stored in RRD is not what I
>> expect. I am not really sure what is going wrong!
>>
>> I am creating RRD using the following command:
>>
>> /usr/bin/rrdtool create \
>> test1.rrd \
>> --start 1276487400 \
>> --step 300  \
>> DS:value1:COUNTER:600:0:12500000 \
>> RRA:AVERAGE:0.5:1:600
>>
>> I insert the following values into it:
>> rrdtool updatev test1.rrd 1276487402:3179452 1276487701:3179779 \
>> 1276488001:3180113 1276488302:3180441 1276488601:3180768 \
>> 1276488902:3181106 1276489201:3181450 1276489502:3181804 \
>> 1276489801:3182186 1276490101:3182505 1276490401:3182828
>>
>> I get the following output:
>>
>> return_value = 0
>> [1276487700]RRA[AVERAGE][1]DS[value1] = 1.0936454849e+00
>> [1276488000]RRA[AVERAGE][1]DS[value1] = 1.1132677072e+00
>> [1276488300]RRA[AVERAGE][1]DS[value1] = 1.0897797711e+00
>> [1276488600]RRA[AVERAGE][1]DS[value1] = 1.0936191884e+00
>> [1276488900]RRA[AVERAGE][1]DS[value1] = 1.1228259944e+00
>> [1276489200]RRA[AVERAGE][1]DS[value1] = 1.1503178183e+00
>> [1276489500]RRA[AVERAGE][1]DS[value1] = 1.1759944740e+00
>> [1276489800]RRA[AVERAGE][1]DS[value1] = 1.2769152250e+00
>> [1276490100]RRA[AVERAGE][1]DS[value1] = 1.0640475288e+00
>> [1276490400]RRA[AVERAGE][1]DS[value1] = 1.0766222222e+00
>>
>> The difference between two values inserted is around 300 and time
>> difference is 5 minutes. I expected the values to be 327, 334, 328,
>> 327, 338 etc... but the values  that is inserted into RRD is around 1
>> as you can see from the output above. I am using  RRDtool version
>> 1.3.1 in debian.
>>
>> Any help to find out what is wrong is greatly appreciated.
>>
>> Thanks and regards,
>>
>> raj
>
> Hi Rajkumar,
>
> you are using COUNTER as the DS-type, so the values are normalized to 1/s.
> So to get a value for 300s you have to multiply it by 300.
>
> eg. 1.0936454849e+00 * 300 = 328.09364547
>
> The remaining difference comes from not inserting at the top of the interval.
>
> You've been using 1276488001 instead of 1276488000, 1276488302 instead of
> 1276488300 and so on ...
>
>
> hth
>
> - Karl
>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>



More information about the rrd-users mailing list