[rrd-users] Re: C documentation?
jfesler at gigo.com
Tue Jun 24 17:20:27 MEST 2003
> I noticed some declarations in rrd.h and I was able to link some code to
> try out calling rrd_create(), but I couldn't find any documentation on
> this (or any of the other rrd_ functions).
the rrd* man pages for the "rrdtool" commands is your best guide;
> My guess is that the first argument is the number of string arguments,
> and the second is an array of character strings. Can someone confirm
This is true. You specifically generate ascii strings, and build up an
argc/argv pair. The first string in argv would be "create" or "update"
I snarfed CountArgs and CreateArgs from rrd_tool.c , and used them roughly
argc = CountArgs (buffer);
if ((myargv = (char **) malloc ((argc + 1) * sizeof (char *))) == NULL)
if ((argc = CreateArgs ("portstats", buffer, argc, myargv)) < 0)
fprintf (stderr, "ERROR: creating arguments\n");
result = rrd_create (argc - 1, &myargv);
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
More information about the rrd-users