[mrtg] Re: Comments getting us in trouble

Paul C. Williamson pwilliamson at mandtbank.com
Fri Jan 4 12:44:07 MET 2002


Alex is correct...but I still think that is an interim 
solution.  It is much better to rewrite the script so 
you can look directly at the data.  A whole lot faster 
to do it that way as well.  Parsing html is way slower 
than reading in the data from the RRAs.  With almost 
600 targets in one pass of the talker script, it ran 
in about 6 seconds for html, vs. about 2 for going 
right at the RRAs.  

But, if you want a quick fix, the easiest thing is 
probably to add the PRINT (I misread it, I thought he 
put GPRINT) statement to your frontend (Cricket, 
14all, routers, home grown).

Paul

>>> Alex van den Bogaerdt <alex at slot.hollandcasino.nl> 01/04/02 05:15 AM >>>
Paul C. Williamson wrote:
>> > You should be able to generate these lines using the PRINT statement
>> > in the grapher.  If the script uses "ds0" and "ds1" for the in vs. out
>> > datasource, you could do something like:
>> > 
>> >     PRINT:ds0:MAX:"<!-- maxin d %.0lf -->"
>> > 
>> > and similar lines.  Refer to the manual page describing "rrdtool graph".
>> > 
>> 	But isn't this going to show up in a .png or .gif?
>> 
>> 	They need it in an .html which they can parse (They have a program that
>> does the parsing already).
>
> Well then, it looks like they'll need to rewrite the 
> parser.  Even if they did show up in the png, you 
> can't parse it like you can an MRTG page.  It's "in" 
> the png.  You'll have to get them to write something 
> to go directly at the RRAs within the .rrd.  I had to 
> do the same thing with the talker script.  I was 
> parsing html pages, and when I moved to RRDTool, I had 
> to switch gears to against the rrds instead.  Much 
> more efficient in the long runto do it that way 
> anyway.

There is a big difference between GPRINT and PRINT.
GPRINT prints in the Graph, PRINT justs prints.

iow: the command I presented will cause the line to appear
in the web page.

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list