Hi Tobias,
I have decided to build a separate tool, later on, once in a good working state, we can look if we (you) want to integrate it into rrdtool. I'm trying to keep it as near as possible of the rrdtool (1.2 branch) code and I rely on rrd.h and rrd_format.h. Except the two files named above, I wrote the rest myself. I will just do a short presentation of the tool, its name is rrd_manip aka manipulate RRD files. usage: rrd_manip [-i format] [-I file] [-o format] [-O file] <tool> [tool options] -I/O optional input/output files. (defaults to stdin/stdout) -i/o optional input/output format. Can be rrd,xml or text (defaults to rrd) <tool> list: - convert, basicly does nothing, read the file in input format (update the RRD Version to RRD_VERSION) and write it to the output format. - drop_ds <DSname> [DSname] ... removes DSname(s) from the input file and write to output. - drop_rra <RRAid> [RRAid] ... same as drop_ds but for RRAs. - add_ds <DSname> <type> <heartbeat> <min> <max>, merge a new DS with the input file and write to the output file. - add_rra <cf> <pdp> <xff>, same as add_ds for for RRAs. So far I have the two drop functions working. Oh, I almost forgot. All those features are in a lib and are thread safe and C89 ;) In short, you load the file in a supported format, apply 'things' on it, and write it to a supported format. I will probably change the syntax to allow multiple actions at once: cat some.rrd | ./rrd_manip drop_ds dsone,dstwo drop_rra 0,4 add_ds newds,COUNTER,600,0,1000 > somenew.rrd Some examples: cat manyDS.rrd | ./rrd_manip drop_ds error_in error_out packets_in packets_out > fewDS.rrd There is user (user of the lib) selectable verbosity, useful for debugging. ./rrd_manip -I IdontExist.rrd -o text convert ERROR: main.c:184 -> rrd_manip.c:187 [failed to open file] main.c:184 is where I call the lib function and rrd_manip.c:187 is where the error occured in the lib. You can also disable this to get a very simple and short error message. I'm not yet finished, that's why I wont go too far in lib documentation/explanation and so, I just wanted to show globally the features ideas. PS: Tobias, can you explain me how your FLOAT_COOKIE is working? I did not find anything changing it from one platform to another and as far as I understood, its fixed in the code. huh? I dont get it.. help ;) Cheers, Pascal -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-developers WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
