rrdtool tricks / tips

There are various different ways to generate rrdtool images. And most people will probably be generating elaborate ones out of perl or php scripts. The ones I am currently generating are built in a shell script (bash) and I was really having a problem with quotes and white space here for a while. If you generate the query and save it in a variable, the quotes go to hell and your white space (e.g. a space in a COMMENT) starts causing problems. my solution may not be the best, but it works without any trouble: Throw the whole command line into a temporary file and then use eval to create the graph. The following is not a complete statement, just a few lines as an example.

One thought on “rrdtool tricks / tips

Comments are closed.