[rrd-developers] Patch to get more metadata out of 'rrdtool graph'
Tobias Oetiker
tobi at oetiker.ch
Sun Oct 14 09:30:37 CEST 2007
Hi Mark,
Congratulations. This is looking much better ...
there are a few things though ...
a) instead of looking at grinfoh to be NULL, info_push could look
at grinfoc to be NULL and NOT push.
b) you added an additional parameter to the default rrd_graph call
this will break existing code. Use a NEW rrd_graph call which
adds this additional parameter. (similar to
rrd_graph_in_memory).And create a wrapper for this function with
the old name, keeping the old interface and capabilities.
c) the data returning path for size and PRINT info still uses the
original interface. this is fine for the rrd_graph function but
for the rrd_graph_info function it should be integrated ...
d) since the rrd_graph_in_memory interface has been added in this
update cycle, you can integrate your interface change with this
to limit the number of rrd_graph interfaces flying around.
e) leaving out the language bindings if you do the patch like this
is fine, sinc they will continue to work.
cheers
tobi
Friday Mark Plaksin wrote:
> Tobias Oetiker <tobi at oetiker.ch> writes:
>
> >> - Add a command-line option to 'rrdtool graph' which turns on the
> >> display of graph metadata. Add a similar argument to the rrd_graph C
> >> function.
> >
> > yep
> >
> >> - Create graph_push() (or (ab)use info_push()) and use it inside of
> >> rrd_graph() to collect information about the graph.
> >
> > well 'create a function that can be used by bot rrd_graph and
> > rrd_info'
> >
> >> - Modify the calls to rrd_graph to respect the command-line argument and
> >> print the data rrd_graph returns.
> >
> > * in rrd_tool.c and in the perl bindings at least yes ...
>
> Here's a patch which (I think!) does everything except the Perl (and
> other) bindings. I looked at RRD.xs and ran 'man perlxs' for the first
> time and my mind was quickly blown. I'll try again unless somebody
> wants to beat me to it :)
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
More information about the rrd-developers
mailing list