Alexander Koeppe wrote: >I searched the web for my problem but could find something that helped.
This list has had examples of this problem/query at a frequency of probably at least twice a month ! >So here is my problem: > >I've created several Graphs and databases. But all Databases that have >COUNTER Datasources react strange sometimes. The script below emulates >the data polling process and writes every 60 Seconds values into the >database. I multiply them with 60 because I want to display the Mails >processed per minute. So the value steps are based on 60. > >But I expected some different values: i.e. >1180027440: 0.0000000000e+00 5.5041617224e-01 1.1008323445e+00 >0.0000000000e+00 0.0000000000e+00 >should be >1180027440: 0.0000000000e+00 1.0000000000e+00 2.0000000000e+00 >0.0000000000e+00 0.0000000000e+00 > >and so on. > >Can someone tell me what I'm doing wrong? Go to http://www.vandenbogaerdt.nl/rrdtool/ and look at the page on normalisation - then you should realise that what you see is normal. Importantly, your script below is NOT doing what your description above says it is doing - where you imply that you are passing in data based on the 60 second step value. You will only get the same values out if your update times EXACTLY fall on a boundary of n*steptime since unix epoch, and since that is not the case in your sample script (where btw the update periods are not even exactly 60s apart) then you WILL get normalisation. >Below you find the polling emulation script and the output of rrdfetch. > > > >$ cat test.sh >rrdtool create ../db/mail.rrd --step 60 DS:total:COUNTER:120:0:U >DS:spam:COUNTER:120:0:U DS:relay:COUNTER:120:0:U >DS:error:COUNTER:120:0:U DS:queue:GAUGE:120:0:U RRA:AVERAGE:0.5:1:2160 >sleep 60 >rrdtool update ../db/mail.rrd N:16920:420:420:0:0 >sleep 60 >rrdtool update ../db/mail.rrd N:16920:420:420:0:0 >sleep 60 >rrdtool update ../db/mail.rrd N:16920:480:540:0:0 >sleep 60 >rrdtool update ../db/mail.rrd N:16980:480:540:0:0 >sleep 60 >rrdtool fetch ../db/mail.rrd AVERAGE | tail -n 15 >$bash test.sh >1180026780: nan nan nan nan nan >1180026840: nan nan nan nan nan >1180026900: nan nan nan nan nan >1180026960: nan nan nan nan nan >1180027020: nan nan nan nan nan >1180027080: nan nan nan nan nan >1180027140: nan nan nan nan nan >1180027200: nan nan nan nan nan >1180027260: nan nan nan nan nan >1180027320: nan nan nan nan 0.0000000000e+00 >1180027380: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 >0.0000000000e+00 0.0000000000e+00 >1180027440: 0.0000000000e+00 5.5041617224e-01 1.1008323445e+00 >0.0000000000e+00 0.0000000000e+00 >1180027500: 5.5024873405e-01 4.4958382776e-01 8.9916765553e-01 >0.0000000000e+00 0.0000000000e+00 >1180027560: nan nan nan nan nan >1180027620: nan nan nan nan nan >$ > >_______________________________________________ >rrd-users mailing list >rrd-users@lists.oetiker.ch >https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users