[rrd-developers] Re: C API
D. Walsh
info at daleenterprise.com
Mon Feb 20 14:36:23 MET 2006
On Feb 20, 2006, at 06:45 , Daniel Abramowicz wrote:
> Hi,
>
> My name is Daniel Abramowicz and I'm involved in a project called
> Oasis2
> (http://csd.ssvl.kth.se/~csd2006-team12/) at KTH (the Royal
> Institute of
> Technology in Sweden).
>
> We will use the RRDTool for collecting statistics from devices, mainly
> switches I think.
>
> The problem we see with using RRDTool, though it is a really great
> tool,
> is the marshalling/unmarshalling of variables. We also need a proper
> interface in C to use for creating RRDbs.
>
> I'm not myself still totally clear on what needs to be done but as I
> understood we need to modify the code that already exists for the C
> API.
> The main-like functions (int argc, char **argv) are the one which
> creates
> this problem with marshalling...
>
> Maybe someone already seen this problem? and have some hints..?
The RRDTool C API is a little sparce to begin with however, all of
the information required to do what you want can be found in the
wrappers for the "rrdtool" application.
If you want to create a custom application (recommended in your
case), you should create a model of your requirements then work your
model into your wrapper.
This will allow you to utilize the required functions in what-ever
method is best suited for your application.
A word of caution, decide before creating your model whether you want
to provide your data marshaled or un-marshaled and be consistent in
your selected method (don't mix and match).
If you want another example of a wrapper, ask Tobi for the PHP
extension source I gave him, it's a complicated wrapper written in an
uncomplicated manner and is fairly easy to follow the program flow
and yields some suitable methods for creating a custom wrapper.
As a general rule, when creating your custom application, use (where-
ever possible) static libraires so that your application wont be
affected by API changes as RRDTool evolves unless you know for
certain that they changes will be compatible with your wrapper.
As you will see in the PHP extension, I make dynamic functionality
based on the available API in a prehistoric method of testing for
specific library functions.
I'm currently working on a new extension (again) to take advantage of
the extra power of PHP 5.1.x and PHP 6.x which has become a lot more
complicated and would be much harder for you to figure out what the
wrapper is actually doing so I recommend using the methods
implemented in the extension that Tobi currently has.
Something else to consider, in your projects infancy stage you might
wish to utilize and older RRDTool API (like 1.0.49) for development
of your base features and functionality and then expand these
functionalities by introducing the newer 1.2.x API as you enhance
your application.
> Maybe someone is interested in this and might want to help?
>
>
> Daniel Abramowicz
I may have some time available to assist you with your project so
after you've gotten something started, let me know and I'll take a
look at it with you and make sure that you're on the right path cause
it's really not that difficult.
-- Dale
--
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://lists.ee.ethz.ch/rrd-developers
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-developers
mailing list