[rrd-users] More observations and questions on COUNTER

Philip Peake philip at vogon.net
Sat Oct 23 23:03:54 CEST 2010


On 10/23/2010 10:49 AM, Simon Hobson wrote:
> I don't want to see what's in the database. Please provide a set of 
> update values that reproduce the problem. If we don't know what went 
> in, then we cannot even guess at whether what comes out is correct or 
> not.

Ok - added a print of the data that is supplied to rrdtool, then dropped
the connection to force a read error.

This is what was passed to the DB:

1287865680:80720496:21353409:88678191:121292820:21641300:65478015:23557328:95055770:104725771
1287865710:80721285:21354274:88679077:121294030:21642052:65480082:23558714:95056884:104726886
1287865740:80722122:21355290:88679970:121294992:21642728:65482047:23559995:95057766:104728008
1287865770:80723194:21356148:88680872:121295888:21643313:65484024:23561517:95058921:104729359
1287865800:U:U:U:U:U:U:U:U:U
1287865830:0:0:0:0:0:0:0:0:0
1287865860:0:0:0:0:0:0:0:0:0
1287865890:0:0:0:0:0:0:0:0:0
1287865920:0:0:0:0:0:0:0:0:0
1287865950:0:0:0:0:0:0:0:0:0
1287865980:0:0:0:0:0:0:0:0:0
1287866010:0:0:0:0:0:0:0:0:0
1287866040:0:0:0:0:0:0:0:0:0
1287866070:0:0:0:0:0:0:0:0:0
1287866100:0:0:0:0:0:0:0:0:0
1287866130:0:0:0:0:0:0:0:0:0
1287866160:0:0:0:0:0:0:0:0:0
1287866190:0:0:0:0:0:0:0:0:0
1287866220:0:0:0:0:0:0:0:0:0
1287866250:0:0:0:0:0:0:0:0:0
1287866280:80739444:21371669:88696608:121313195:21655956:65519543:23582106:95072573:104743263
1287866310:80740228:21372452:88697358:121314100:21656508:65521468:23583236:95073263:104743944
1287866340:80740899:21373269:88698173:121315111:21657190:65523385:23584208:95073908:104744613
1287866370:80741789:21374232:88699086:121316178:21657895:65525380:23585369:95074622:104745350

This is what the database contains:

1287865680: 2.7366666667e+01 2.9816666667e+01 3.5166666667e+01
3.2800000000e+01 2.6966666667e+01 6.8150000000e+01 4.3283333333e+01
2.9133333333e+01 3.1566666667e+01
1287865710: 2.6300000000e+01 2.8833333333e+01 2.9533333333e+01
4.0333333333e+01 2.5066666667e+01 6.8900000000e+01 4.6200000000e+01
3.7133333333e+01 3.7166666667e+01
1287865740: 2.7900000000e+01 3.3866666667e+01 2.9766666667e+01
3.2066666667e+01 2.2533333333e+01 6.5500000000e+01 4.2700000000e+01
2.9400000000e+01 3.7400000000e+01
1287865770: 3.5733333333e+01 2.8600000000e+01 3.0066666667e+01
2.9866666667e+01 1.9500000000e+01 6.5900000000e+01 5.0733333333e+01
3.8500000000e+01 4.5033333333e+01
1287865800: nan nan nan nan nan nan nan nan nan
1287865830: nan nan nan nan nan nan nan nan nan
1287865860: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287865890: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287865920: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287865950: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287865980: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866010: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866040: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866070: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866100: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866130: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866160: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866190: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866220: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866250: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
0.0000000000e+00 0.0000000000e+00
1287866280: 2.6913148000e+06 7.1238896667e+05 2.9565536000e+06
4.0437731667e+06 7.2186520000e+05 2.1839847667e+06 7.8607020000e+05
3.1690857667e+06 3.4914421000e+06
1287866310: 2.6133333333e+01 2.6100000000e+01 2.5000000000e+01
3.0166666667e+01 1.8400000000e+01 6.4166666667e+01 3.7666666667e+01
2.3000000000e+01 2.2700000000e+01
1287866340: 2.2366666667e+01 2.7233333333e+01 2.7166666667e+01
3.3700000000e+01 2.2733333333e+01 6.3900000000e+01 3.2400000000e+01
2.1500000000e+01 2.2300000000e+01
1287866370: 2.9666666667e+01 3.2100000000e+01 3.0433333333e+01
3.5566666667e+01 2.3500000000e+01 6.6500000000e+01 3.8700000000e+01
2.3800000000e+01 2.4566666667e+01

Interesting things to note:

   1. Only one set of values is passed in as undefined. The readings
      (zero) after the undefined input is also recorded as undefined. I
      think this is correct behavior, since these are COUNTERs, and if a
      previous value is a NaN, it's not possible to calculate the
      incremental value.

   2. I now understand the "spike" - I assumed that any loss of
      connection would mean that the data source was being re-started,
      and that counters would start again from zero. What I must have
      seen when I saw this occur "naturally" must have been a network
      problem, which simply broke the connection, and the counters
      carried on running. I need to try to account for that somehow ...
      hard to know how really. I suppose I can store previous values,
      and when the DS comes back online check to see if the value is
      less than the recorded value, in which case assume a restart.

   3. I really wanted the stored values to be the same as the input
      values. They obviously are not, which seems odd since the sample
      period is 30 seconds, and I take great care to ensure that the
      values sampled as close to 30 seconds apart as I can, and then
      entered with a time set to a 30 second boundary. I thought this
      should ensure that the stored value would be precisely the
      difference between the current and previous value.

   4. Still don't understand why the different plots don't all show the
      "spike".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20101023/15c64ebc/attachment.htm 


More information about the rrd-users mailing list