[rrd-developers] Patch to get more metadata out of 'rrdtool graph'
tobi at oetiker.ch
Mon Sep 24 21:30:48 CEST 2007
> Sorry for the delay.
> If I understand you correctly this plan is OK; is it?
> - 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
> - 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
> - 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 ...
> - And add a command-line option to 'rrdtool graph' which allows you to
> specify the scale (just like '-2' does in my original patch).
* yes ... this would be a separate thing ...
best would be if you could write the coresponding manual page
changes first, this often clears up some missunderstandings ...
> > cheers
> > tobi
> > Yesterday Mark Plaksin wrote:
> >> Here's a small patch against the 1.3 trunk which makes life easier for
> >> my buddy's Google Maps-like web interface to RRDs. It's Google
> >> Maps-like in that you can drag the graph part of the image left and
> >> right in time. Demo site & code coming soon.
> >> The patch adds three options to the 'rrdtool graph' command-line:
> >> a) '-1' makes rrdtool display the scale (im->minval,im->maxval) of the
> >> graph. This is used by the next option. Sample output:
> >> scale: 0.00,99.00
> >> b) '-2 MIN,MAX' forces the scale to MIN and MAX. To force the scale to
> >> be what was returned in the example above you would use:
> >> rrdtool graph -2 0.00,99.00
> >> c) '-3' Display the coordinates of the upper-left corner of the graph
> >> part of the image and the length and height of the graph (in pixels).
> >> Sample output:
> >> graph_coords: 57,30,400,100
> >> Obviously argument names are random :)
> >> Would you add this or something like it? It might be helpful to be able
> >> to get arbitrary properties of the graph and/or image out via the
> >> command-line but these three options are doing the trick for us at the
> >> moment.
> >> Thanks & thanks for RRDtool!
> >> PS: I have a patch against 1.2 also; let me know if you like that too/instead.
> > --
> > Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
> > http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
> rrd-developers mailing list
> rrd-developers at lists.oetiker.ch
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