[rrd-developers] PATCH: Making rrd_update multi-thread capable
Peter Stamfest
peter at stamfest.at
Fri Feb 7 14:41:35 MET 2003
Hello,
I am developing a high-performance MRTG replacement based on ucd-snmp
client code using RRD files for data storage. The beast is written in C,
is multithreaded and should be able to poll thousands of SNMP devices
without any problems (using an XML config file, etc...).
To be able to update multiple RRD files in parallel I had to modify
some parts of rrdtool (mostly rrd_update.c and functions called from
rrd_update):
* avoiding getopt_* (due to its use of global variables, it caused
crashes when I tested it)
* rewrite error handling (do not store error messages in a global
variable)
I introduced *_r functions for all functions that were involved and I also
introduced the structure rrd_context (currently only holding error
information).
Note that all changes are backward-compatible: The original interface of
the librrd remains unchanged. To use the multithreaded rrd_update use
rrd_update_r.
Find the patch attached. I think it might be worth it to make other parts
of RRD multithreaded as well - the patch might be used as a basis for
this.
I did not look into things like PHP integration, but I think it might be
worth to make that part thread-safe as well (thinking of apache 2.x
integration...)
I hope that the patch is complete, feedback is very welcome. If there is
any interest in this, I shall contribute future patches in this area as
well.
In case somebody else has conquered this problem before please tell me -
google-ing didn't find any information on multithreaded RRD updating...
peter
-- Attached file removed by Ecartis and put at URL below --
-- Type: TEXT/PLAIN
-- Size: 18k (18815 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/rrdtool-mt.patch
--
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