[rrd-users] Supressing RRDTool "OK" message in pipe mode

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Fri Feb 27 18:39:17 CET 2009


----- Original Message ----- 
From: "Phix" <mark at phix.me>
To: <rrd-users at lists.oetiker.ch>
Sent: Friday, February 27, 2009 6:25 PM
Subject: Re: [rrd-users] Supressing RRDTool "OK" message in pipe mode


>
> Hi Alex,
>
> The reason I am using RRDTool in pipe mode is because I have reached the
> command line argument limit of my shell (I have over 2000 DEF statements, 
> to
> give you an idea of the number of RRD files I am dealing with). My only
> option here is to use RRDTool's pipe method, and then pipe my lengthy
> RRDTool graph definition into RRDTool STDIN and read the binary PNG stream
> on RRDTool's STDOUT. But RRDTool insists on sticking an "OK" message at 
> the
> end, which strictly isn't part of the PNG binary stream (it doesn't affect
> the ability of a graphics application or my browser from viewing the PNG
> file, but still, it shouldn't really be there).



clear, thanks for sharing this.

> I would have expected RRDTool to suppress all other informative output if 
> it
> has just streamed a binary PNG file to its STDOUT, but this doesn't seem 
> to
> be the case.

I quickly scanned a 1.2.something source.  File rrd_tool.c line 421 just 
above where it says "#if HAVE_GETRUSAGE" could use another selector. This 
should then be provided by rrd_graph.c (or you disable printing OK 
altogether).

Line 750 defines "tostdout" but I see no existing way of returning this to 
main(). Maybe you can alter HandleInputLine, adding "int * silent" or a 
similar approach.





More information about the rrd-users mailing list