Good ideas, all. Thanks very much. Will try on Monday. Cheers.<br><br>David<br><br><br><div class="gmail_quote">On 15 January 2011 01:26, Simon Hobson <span dir="ltr"><<a href="mailto:linux@thehobsons.co.uk">linux@thehobsons.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">David Ball wrote:<br>
<br>
> Is there a way I can convince 'rrdtool graph' to *not* print out<br>
>the resolution of the resulting image to STDOUT ? I tried toying<br>
>with the --imginfo knob to no avail. I'm trying to generate a .png,<br>
>then I print out a bunch of HTML which includes an IMG SRC tag<br>
>pointing to the image I just generated. But the fact that the<br>
>image's resolution is being printed when I make the call to 'rrdtool<br>
>graph', it's bunging up my HTML (cuz I haven't printed Content-type:<br>
>text/html yet).<br>
<br>
</div>How about :<br>
rrdtool graph ... > /dev/null 2>&1<br>
<br>
Works for me.<br>
<br>
I do something similar, a load of code that generates an image file<br>
(silently), then outputs a header and 'cat's the file out - I now use<br>
image links in my page code that calls a cgi to dynamically create<br>
each image. That allows me to mix and match images on a page without<br>
re-writing any code, and also means multiple images are generated in<br>
parallel.<br>
Because of the complexity of some of my images, I've settled on using<br>
rrdcgi so my code can be like this :<br>
<br>
(<br>
echo options<br>
echo more options<br>
echo still more options<br>
echo and so on<br>
) | rrdcgi --filter >/dev/null<br>
<br>
In many cases, the options are dynamically created with while or for<br>
loops, and of course influenced by the parameters requested. When you<br>
are stacking 500+ areas, and printing over 1k items in the legend,<br>
then that lot won't necessarily fit in the command line buffer of the<br>
shell !<br>
<font color="#888888"><br>
--<br>
Simon Hobson<br>
<br>
Visit <a href="http://www.magpiesnestpublishing.co.uk/" target="_blank">http://www.magpiesnestpublishing.co.uk/</a> for books by acclaimed<br>
author Gladys Hobson. Novels - poetry - short stories - ideal as<br>
Christmas stocking fillers. Some available as e-books.<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
rrd-users mailing list<br>
<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br>
</div></div></blockquote></div><br>