[rrd-users] Re: MRTG to RRDTool.
João Marques
joao at cbpf.br
Tue May 13 18:44:21 MEST 2003
Ok, I've managed to convert my .log files to .rrd
Looking at 14all.cgi (I don't understand perl) I was able to find out that
the DS names ar ds0 for incoming traffic and ds1 for outgoing traffic.
But when graphing the from the converted rdd, I'm not getting the same
graphs that MRTG creates.
Here is the piece of code (in PHP) I'm using to gererate the graphs:
$command = "rrdtool.exe graph $graphfile ";
$command .= "--start -86400 -w 400 -v \"bits/seg\" -t \"$desc [$now]\" -a
PNG ";
$command .= "DEF:incoming=$rrdfile:ds0:AVERAGE ";
$command .= "DEF:outgoing=$rrdfile:ds1:AVERAGE ";
$command .= "DEF:max_incoming=$rrdfile:ds0:MAX ";
$command .= "DEF:max_outgoing=$rrdfile:ds1:MAX ";
$command .= "CDEF:incoming_bits=incoming,8,* ";
$command .= "CDEF:outgoing_bits=outgoing,8,* ";
$command .= "CDEF:max_incoming_kbits=max_incoming,8,*,1000,/ ";
$command .= "CDEF:max_outgoing_kbits=max_outgoing,8,*,1000,/ ";
$command .= "AREA:incoming_bits#00FF00:In ";
$command .= "COMMENT:\"Atual in: $garbage[0] Kbits\" ";
$command .= "GPRINT:max_incoming_kbits:MAX:\"Max in\:%.1lf Kbits\j\" ";
$command .= "LINE1:outgoing_bits#0000FF:Out ";
$command .= "COMMENT:\"Atual out: $garbage[1] Kbits\" ";
$command .= "GPRINT:max_outgoing_kbits:MAX:\"Max out\:%.1lf Kbits\j\" ";
I'm getting graphs with negative values!
Any help appreciated!
Joao
----- Original Message -----
From: "Tobias Oetiker" <oetiker at ee.ethz.ch>
Cc: <cacti-user at lists.sourceforge.net>; <rrd-users at list.ee.ethz.ch>
Sent: Friday, April 25, 2003 8:13 PM
Subject: [rrd-users] Re: MRTG to RRDTool.
> Yesterday gab.seun jones.ewulomi wrote:
>
> > Hi,
> >
> > Il try and search my file. But all in all from on top of my head
> >
> > 1)install mrtg(which you have)
> > 2)install rrdtool
> > 3)in your mrtg.cfg files under the Global Defaults part put the
statement
> > ### Global Defaults
> > PathAdd: /usr/local/rrdtool/bin #path to your rrdtool bin directory
> > LibAdd: /usr/local/rrdtool/lib/perl #path to the rrdtool lib perl
directory
> > LogFormat: rrdtool
> >
> > Some one on the forum might be able to give more details
>
> when mrtg rund in rrd mode it will convert any matching log files
> to rrd format automagically
>
> tobi
>
>
> --
> ______ __ _
> /_ __/_ / / (_) Oetiker @ ISG.EE, ETZ J97, ETH, CH-8092 Zurich
> / // _ \/ _ \/ / System Manager, Time Lord, Coder, Designer, Coach
> /_/ \.__/_.__/_/ http://people.ee.ethz.ch/~oetiker +41(0)1-632-5286
>
> --
> 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
>
--
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