[rrd-users] rrdupdate time problem
Oleg Derevenetz
oleg at vsi.ru
Tue Aug 14 20:05:42 CEST 2007
Alex van den Bogaerdt wrote:
>> I am developing NMS with ability to store variables (interface counters, temperature, environment, etc) in RRD. Due to heavy load
>> (hundreds of thousands values stored in RRD per minute) I use some sort of buffering - counters from hardware with timestamps
>> temporary stored in memory queues and periodically entire queue that relates to given RRD file stored into this file by separate
>> thread using single command like that:
>>
>> ::Rrd::update file_path --template In:Out 1187065338:12345:6789 1187065358:123456:67890 ...
>
> Sounds good.
>
>
>> But sometimes such updates fails with error like that:
>>
>> RRD Error: illegal attempt to update using time 1187065338 when last update time is 1187065682 (minimum one second step)
>>
>> This error occures with different RRD files with different structures. I added debugging output regarding this problem, and this
>> debug shows that before this error was no attempt to update this RRD file using timestamp 1187065682 at all, and failed command also
>> does not contain argument with this timestamp.
>
> I understand what you are saying, but I don't agree 100%. What you have
> shown is that you believe there is no such update. See below.
>
>> How this can happen ? Any ideas ? I have only one idea - sometimes RRD file's last update time is time of real update, and not the
>> latest timestamp from rrdupdate's data arguments, and if previous update happened later than the first counter value appears in
>> memory queue, than such error will encounter on the next update.
>
> This sounds reasonable however it would mean a bug in RRDtool, one which
> only manifests itself once in a while.
>
> If you can reproduce the problem by replaying your logged updates,
> some bughunting is necessary. But before this, I think it is fair
> to at least consider the possibility that you overlooked something.
Hmm... It seems that this error appears when I tried to update just
created empty RRD file with record that have timestamp in the past (RRD
files created on-the-fly when necessary), so this is documented
situation and I should use --start parameter for rrdcreate command to
avoid this.
--
Oleg Derevenetz <oleg at vsi.ru> OOD3-RIPE
Phone: +7 4732 539880
Fax: +7 4732 531415 http://www.vsi.ru
CenterTelecom Voronezh ISP http://isp.vsi.ru
More information about the rrd-users
mailing list