[rrd-developers] New "function" in CDEF section -- patch

Glenn MacGregor gtm at highstreetnetworks.com
Fri Jan 24 19:09:08 MET 2003


Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi All,

Thanks for the wonderful product, rrdtool is amazing!  I have attached a =
patch (which I hope will make it into the distro) that allows a function =
to be loaded from a dynamic library and called as a CDEF.  The new CDEF =
syntax is CDEF:value=3DCALL(var,path/to/so, functionname).

Function prototype:=20
double func1(double *valueArray, time_t *timeArray, long cnt, long step)

Return is meant to be put on the stack
Argument 1 is an array of values representing all values from start to =
current row.
Argument 2 is the corresponding timestampes for each value.
Argument 3 is the array count.
Argument 4 is the step interval.


This seems to be a useful addition to rrdtool to allow for any =
calculations.

Please consider incorporating this patch in the standard distribution.


    Thanks

            Glenn MacGregor


P.S.
This patch only represents the code changes, I also changed the =
configure.in file to incorporate the necessary checks for libdl.

configure.in change:  add AC_CHECK_LIB(dl, dlopen)
I am not too familiar with the autoconf tools so this may not the =
correct, or more may need to be done.  From what I can tell, this check =
will write #define HAVE_DL 1 in the config/config.h and append -ldl to =
the makefiles if successful and #undef HAVE_DL if not successful.




-- Attached file removed by Ecartis and put at URL below --
-- Type: application/octet-stream
-- Size: 7k (7471 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/rrdtool-call-1.0.40.pat


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



More information about the rrd-developers mailing list