[rrd-developers] Bug#251701: fix #182217 breaks librrdp-perl

Tobias Oetiker tobi at oetiker.ch
Wed Apr 8 07:32:38 CEST 2009


Hi Sebastian,

Yesterday Sebastian Harl wrote:

> Hi Tobi,
>
> On Tue, Apr 07, 2009 at 10:34:08PM +0200, Tobias Oetiker wrote:
> > Today Sebastian Harl wrote:
> > > On Tue, Apr 07, 2009 at 07:25:47PM +0200, Tobias Oetiker wrote:
> > > > adding a newline after the graph output is quite simple, and I
> > > > imagine it would not immediately break anything ...
> > >
> > > Hrm ... I'm not sure if this is a good idea. I don't know if some binary
> > > graphics format might cause problems, if "arbitrary" bytes are appended.
> > > PNG does not seem to care (judging from a quick test) but I wouldn't
> > > implement something like that without being sure about that.
> >
> > PNG is the most binary data format supported by rrdtool, so this is
> > no problem
>
> Well, I did not look at any PNG specs, so I'm not sure if imagemagick
> just happens to handle that sanely. Also, I, personally, don't like
> adding stuff that might cause trouble in the future (e.g. if support for
> some other binary data format is added at some point). YMMV though ;-)
>
> > and what's more, the \n is only 'appended' in piping mode.
>
> Sure ... that might be used to pipe the image to some other tools though
> and eventually write the final output to disk.
>
> > do you see another solution ?
>
> Removing RRDp altogether ... *scnr* ;-)
>
> Frankly, as I said before, I'm really unsure how to solve that properly.
> Please don't get me wrong - I'm just trying to avoid trouble in the
> future by pointing out possible problems ...
>
> > > > the RRDp code will NOT work when there is a newline inside the graph
> > > > but this has always been the case ...
> > >
> > > ... a newline followed by the string "OK" ... </nitpick> ;-)
> >
> > look at the RRDp code, I don't think it looks for \nOK it is happy
> > with \n
>
> RRDp::read() loops until it finds a line starting with either 'ERROR' or
> 'OK'. In fact, a PNG includes lots of newline characters, so this would
> not work at all otherwise.

so lets put the question differently. Did it ever work? And if so
why. Otherwhise the solution is simple, update the docs and mention
that it does NOT work and if someone is so minded, update RRDp to
support graphv

cheers
tobi

>
> Cheers,
> Sebastian
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list