[rrd-users] Re: Thumbnails

Jakob Ilves jakob.ilves at oracle.com
Thu Oct 12 00:07:52 MEST 2000


Hello!

(Ok, long posting.  I have to admit.)

Philip Molter wrote:
> 
> On Tue, Oct 03, 2000 at 06:18:44PM -0500, Chris Snell wrote:
> :
> : At 03:06 PM 10/3/2000, Sam Howard wrote:
> :
> : >I thought I saw a message go by asking about generating thumbnail gifs...I
> : >missed the replies, I guess.
> :
> : Bronc can generate thumbnails on-the-fly using ImageMagick.
> 
> Yeah, basically, that's the only way you can generate thumbnails,
> and if you want just a picture of the graph (no outside whitespace,
> no stats, no beveled edges), it looks like you have to use ImageMagick
> to crop out the graph.  That's after figuring out where the top
> corner of the rectangle is in the graph.
> 
> Given that ImageMagick (well, PerlMagick) is an /incredible/ memory
> pig and it's pretty slow, it'd be great if there was an option in
> RRD that you could specify which would return you /just/ the graph.
> I'm sure you could generate and print that a lot faster than
> 'generate:save:open:crop:print'.

I've played around with this and actually managed to create such an
option (it was a hack so I'll not post it, sorry).  However, there are a
number or pitfalls here if you want to things "the right way".

First, should the option(s) specify that one only gets the graph without
whitespace etc or should they also allow one to get a picture with only
a X-axis?  The latter is useful if one wants to tile the thumbnails on
top of each other and then put a synchronized X-axis at the bottom.  Do
we want options allowing to generate only separate Y-axis too?

The real reason I started doing these things is that I wanted a
"threshold" graph which is a graph not showing a curve varying between
top and bottom but instead, the indicates if a threshold is violated or
not at a given time.  If there is a violation, the area between top and
bottom of the bar is red.  If there is no violation, the area is green. 
One bar is for traffic utilization inbound and one bar is for traffic
utilization outbound.  Tile them on top of each other and put a
"X-axis-bar" gif at the bottom and voila, you have a VERY compact graph
telling you if that specific link is worth investigating closer or not.

Actually, this threshold graph could be an aggregate of a number of
links.  If any of the links violates it's threshold, that is indicated
with a red area in the graph.


So, what are the pitfalls when implementing these "partial graph gifs"? 
One is optimizing the use of CPU and avoiding unecessary work.  If a gif
is wanted which only displays the graph itself, is there any point in
processing X- and Y-axis for the graph?  No, but modifying the code to
take this into account is not necessarely trivial.

Also, consider command line parameter dependencies:  if only a small gif
consisting of the X-axis and nothing else is wanted, the look of that
gif is only dependant on what time scale is used, how wide the gif and
between which points in time the graph spans.  Nothing else.  But in
it's current form rrdtool -graph exects that you MUST specify a .rrd
file.  Rewriting the tool to understand that the "--x-axis-only" option
defers the need for a .rrd file is not trivial, not to mention all the
other options which get's irrelevant when you go for only generating
X-axis or only Y-axis or only the graph...

> But whatever, workarounds exist.  Really really poor workarounds

Yes, the work arounds are perhaps brute force.  But avoiding these
workarounds by rewriting the rrd_graph.c file (which defines the grapher
in rrdtool) is perhaps not realistic given the limited time people have
to put into these products.  Especially not if you consider to rewrite
it so it uses both CPU and command line options in the best way.

(But impossible?  Of course not... ;-)

So, I'm defintively in favour of bringing in the PerlMagick software as
a companion to 14all.cgi and rrdtool in order to make the MRTG
environment even more powerful instead of rewriting rrdtool grapher
functionalities.

> * Philip Molter
> * DataFoundry.net
> * http://www.datafoundry.net/
> * philip at datafoundry.net
> 
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Best regards

/IlvJa

-- 
                (Jakob Ilves) <jakob.ilves at oracle.com> 
             {Oracle Global IT, Network Management Group}
[Office as well as mobile phone: +46/8/477 3666 | Fax: +46/8/477 3572]

-- Attached file removed by Listar and put at URL below --
-- Type: text/x-vcard
-- Desc: Card for Jakob Ilves
-- Size: 444 bytes
-- URL : http://www.ee.ethz.ch/~slist/pantomime/15-jakob.ilves.vcf


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list