[rrd-developers] Calling rrd functions from within "C"

Nikolaos Abatzis nabatzis at blackboard.com
Thu Dec 14 15:01:09 MET 2000

Good morning to all,

I have been struggling since yesterday trying to call rrd_update from within
a C program that I writing to collect system info and add it to an rrd db.
The function rrd_update takes two arguments, namely argc and argv. I do not
know why it assumes that it will be passed arguments from the command line
but it does. My program does not pass arguments from the command line it
computes them. Therein lies the problem. Because getopt is called within the
rrd_update function (should have been done by a wrapper function and
rrd_update then would only need it s "real" arguments) the array with the
values must be of type argv.

So the BIG question is what format does an argv function has. I tried
declaring an char *rrdargv[2] array and fill it with my two arguments (rrd
file name and data sample) and then calling rrd_update with the call
"rrd_update (myargs, &rrdargv[0]) following the way it is called from
rrd_tool.c. My program keeps core dumping, actually is the getopts call from
within rrd_update.

Any help will be greatly appreciated, as I have to show some demos to my
boss and the demo is to take place tomorrow

Nikolaos Abatzis
Blackboard Inc
1899 L Street, NW
Washington, DC 20036
phone: (202)  463-4860 x.542

Blackboard - Bringing Education Online
Create your FREE CourseSite at ww.Blackboard.com today

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