[rrd-users] Resolution of .png image being printed to STDOUT with 'rrdtool graph'

David Ball davidtball at gmail.com
Sat Jan 15 19:28:30 CET 2011


  Good ideas, all.  Thanks very much.  Will try on Monday.  Cheers.

David


On 15 January 2011 01:26, Simon Hobson <linux at thehobsons.co.uk> wrote:

> David Ball wrote:
>
> >   Is there a way I can convince 'rrdtool graph' to *not* print out
> >the resolution of the resulting image to STDOUT ?  I tried toying
> >with the --imginfo knob to no avail.  I'm trying to generate a .png,
> >then I print out a bunch of HTML which includes an IMG SRC tag
> >pointing to the image I just generated.  But the fact that the
> >image's resolution is being printed when I make the call to 'rrdtool
> >graph', it's bunging up my HTML (cuz I haven't printed Content-type:
> >text/html  yet).
>
> How about :
>   rrdtool graph ... > /dev/null 2>&1
>
> Works for me.
>
> I do something similar, a load of code that generates an image file
> (silently), then outputs a header and 'cat's the file out - I now use
> image links in my page code that calls a cgi to dynamically create
> each image. That allows me to mix and match images on a page without
> re-writing any code, and also means multiple images are generated in
> parallel.
> Because of the complexity of some of my images, I've settled on using
> rrdcgi so my code can be like this :
>
> (
>   echo options
>   echo more options
>   echo still more options
>   echo and so on
> ) | rrdcgi --filter >/dev/null
>
> In many cases, the options are dynamically created with while or for
> loops, and of course influenced by the parameters requested. When you
> are stacking 500+ areas, and printing over 1k items in the legend,
> then that lot won't necessarily fit in the command line buffer of the
> shell !
>
> --
> Simon Hobson
>
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20110115/ac486832/attachment.htm 


More information about the rrd-users mailing list