[rrd-users] Re: newbie alert: nan problem

Loke ole at donald-duck.com
Fri Oct 29 03:18:03 MEST 2004


>> l've got a nan problem
>>
>> echo $DAT,$DS1,$DS2,$DS3 >> /tmp/cputest.log
>> rrdtool update /var/rrd/cpu.rrd -t user:system:nice N:$DS1:$DS2:$DS3
>>
>> but >rrdtool fetch cpu.rrd AVERAGE will show nan every
>> 5th-6th update, and only when the computer is under load, and
>> the graph will have gaps.
>
> Then every xth upgrade is too soon, too late, too high or something like
> that.
>
> Please post a relevant portion (that is, with NaNs) from "rrdtool fetch
> ..."
> and the part of your cputest.log that covers the same timespan.
>
> Serge.

filename = "/var/rrd/cpu.rrd"
rrd_version = "0001"
step = 300
last_update = 1099011601
ds[user].type = "DERIVE"
ds[user].minimal_heartbeat = 600
ds[user].min = 0.0000000000e+00
ds[user].max = 1.0000000000e+02
ds[user].last_ds = "13"
ds[user].value = 1.3333333333e-02
ds[user].unknown_sec = 0
ds[system].type = "DERIVE"
ds[system].minimal_heartbeat = 600
ds[system].min = 0.0000000000e+00
ds[system].max = 1.0000000000e+02
ds[system].last_ds = "0"
ds[system].value = 0.0000000000e+00
ds[system].unknown_sec = 0
ds[nice].type = "DERIVE"
ds[nice].minimal_heartbeat = 600
ds[nice].min = 0.0000000000e+00
ds[nice].max = 1.0000000000e+02
ds[nice].last_ds = "0"
ds[nice].value = 0.0000000000e+00
ds[nice].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 576
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = NaN
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 672
rra[1].pdp_per_row = 6
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = NaN
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[1].cdp_prep[2].value = NaN
rra[1].cdp_prep[2].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 732
rra[2].pdp_per_row = 24
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 1.4976810853e-01
rra[2].cdp_prep[0].unknown_datapoints = 3
rra[2].cdp_prep[1].value = 6.6445182724e-03
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[2].cdp_prep[2].value = 0.0000000000e+00
rra[2].cdp_prep[2].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 1460
rra[3].pdp_per_row = 144
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 1.4976810853e-01
rra[3].cdp_prep[0].unknown_datapoints = 3
rra[3].cdp_prep[1].value = 6.6445182724e-03
rra[3].cdp_prep[1].unknown_datapoints = 0
rra[3].cdp_prep[2].value = 0.0000000000e+00
rra[3].cdp_prep[2].unknown_datapoints = 0

rrdtool fetch /var/rrd/cpu.rrd AVERAGE > fetch.log
1099001700: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099002000: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099002300: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099002600: 2.3333333333e-02 0.0000000000e+00 0.0000000000e+00
1099002900: 3.3333333333e-03 0.0000000000e+00 0.0000000000e+00
1099003200: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099003500: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099003800: 3.3112582781e-03 0.0000000000e+00 0.0000000000e+00
1099004100: 1.3002207506e-01 3.3333333333e-03 0.0000000000e+00
1099004400: nan 0.0000000000e+00 0.0000000000e+00
1099004700: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099005000: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099005300: 3.9866666667e-02 0.0000000000e+00 0.0000000000e+00
1099005600: 3.4555555556e-03 0.0000000000e+00 0.0000000000e+00
1099005900: 3.3333333333e-03 0.0000000000e+00 0.0000000000e+00
1099006200: nan 0.0000000000e+00 0.0000000000e+00
1099006500: 4.3478260870e-02 3.3333333333e-03 0.0000000000e+00
1099006800: 0.0000000000e+00 nan 0.0000000000e+00
1099007100: nan 0.0000000000e+00 0.0000000000e+00
1099007400: nan 0.0000000000e+00 0.0000000000e+00
1099007700: 2.0066889632e-02 0.0000000000e+00 0.0000000000e+00
1099008000: 6.6445182724e-03 0.0000000000e+00 0.0000000000e+00
1099008300: 2.2148394241e-05 0.0000000000e+00 0.0000000000e+00
1099008600: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099008900: 6.6889632107e-03 0.0000000000e+00 0.0000000000e+00
1099009200: nan 0.0000000000e+00 0.0000000000e+00
1099009500: nan 0.0000000000e+00 0.0000000000e+00
1099009800: 1.3377926421e-02 0.0000000000e+00 0.0000000000e+00
1099010100: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
1099010400: 5.3156146179e-02 3.3222591362e-03 0.0000000000e+00
1099010700: 5.3156146179e-02 3.3222591362e-03 0.0000000000e+00
1099011000: 1.0033444816e-02 0.0000000000e+00 0.0000000000e+00
1099011300: nan 0.0000000000e+00 0.0000000000e+00
1099011600: 1.3333333333e-02 0.0000000000e+00 0.0000000000e+00
1099011900: nan nan nan

cat /tmp/cputest.log

1099001701,0,0,0
1099002001,0,0,0
1099002301,0,0,0
1099002600,7,0,0
1099002900,8,0,0
1099003201,8,0,0
1099003500,8,0,0
1099003802,9,0,0
1099004100,48,1,0
1099004401,36,1,0
1099004701,36,1,0
1099005001,36,1,0
1099005301,48,1,0
1099005601,49,1,0
1099005900,44,1,0
1099006201,42,1,0
1099006500,55,2,0
1099006800,55,1,0
1099007101,36,1,0
1099007401,4,0,0
1099007700,10,0,0
1099008001,12,0,0
1099008301,12,0,0
1099008601,11,0,0
1099008900,13,0,0
1099009201,6,0,0
1099009501,0,0,0
1099009800,4,0,0
1099010100,4,0,0
1099010401,20,1,0
1099010700,10,0,0
1099011000,13,0,0
1099011301,9,0,0
1099011601,13,0,0


BTW the cron is running every 5 minutes calling the rrdtool update script,
and again, when there is no load on the cpu then there is no nan. So the
timing should right. The funny thing is that none of the data is out of
range. min 0 max 100.


Thanks for helping
Loke

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list