[rrd-users] Ruby bindings sticky error with xport
list at mrtech.ru
Wed Jul 27 19:49:26 CEST 2011
I've checked the latest trunk code, and no changes to
bindings/ruby/main.c has been made from at least 1.4.3 release.
I made a patch that fixes my problem
The similar bug was fixed for rb_rrd_infocall before:
--- rrdtool-1.4.5.orig/bindings/ruby/main.c 2010-09-28
+++ rrdtool-1.4.5/bindings/ruby/main.c 2011-07-27 19:28:28.000000000 +0300
@@ -333,6 +333,7 @@
time_t start, end;
a = string_arr_new(args);
rrd_xport(a.len, a.strings, &xxsize, &start, &end, &step,
&col_cnt, &legend_v, &data);
On 27/07/2011 01:20, Tobias Oetiker wrote:
> Hi Troex,
> make sure to have a look at the latest stable snapshot, I think
> there are some ruby bindiToday Troex Nevelin wrote:
>> I'm using ruby bindings to xport data from Munin RRDs insidng
> e rails app.
>> Everything works fine until I get first error during RRD.xport. For example
>> rrd file is missing, or my DEF/CDEF are in wrong format - I get an Exception
>> - everything is okay this behaviour is correct, but when I run RRD.xport
>> with correct options inside same rails app (without restarting it) I always
>> get the same first Exception, so if my script reads 20 rrds and I got error
>> on 5th than the last 15 RRD will return the same error as 5th. I can get rid
>> of that Exception only if I restart my Rails app.
>> How can I flush this error from RRD library without restarting?
>> I've looked through bindings/ruby/main.c ... maybe `reset_rrd_state();`
>> should be used in `rb_rrd_xport` method as well? (I'm not familiar with C)
More information about the rrd-users