I apologize for this being copied right out of a php script, but it's all here:
$w_opts = array( "--start", "-200h", "-aPNG", "-i", "-z", "--alt-y-grid",
"--color=GRID#000000", "--color=MGRID#000000", "-vBits Per
Second",
"DEF:i=/usr/local/www/data/mrtg/$rrd_name.rrd:ds0:AVERAGE",
"DEF:o=/usr/local/www/data/mrtg/$rrd_name.rrd:ds1:AVERAGE",
"CDEF:in=i,8,*",
"CDEF:out=o,8,*",
"CDEF:pi=in,$maxbytes,/,100,*",
"CDEF:po=out,$maxbytes,/,100,*",
"AREA:in#ff4a00:Incoming (Upload) Traffic in Bits per
Second\l",
"LINE1:out#0021a5:Outgoing (Download) Traffic in Bits per
Second\l",
"GPRINT:in:MAX:Maximal In\:%8.3lf %sbps",
"GPRINT:pi:MAX:(%6.2lf%%)",
"GPRINT:out:MAX:Maximal Out\:%8.3lf %sbps",
"GPRINT:po:MAX:(%6.2lf%%)\\l",
"GPRINT:in:AVERAGE:Average In\:%8.3lf %sbps",
"GPRINT:pi:AVERAGE:(%6.2lf%%)",
"GPRINT:out:AVERAGE:Average Out\:%8.3lf %sbps",
"GPRINT:po:AVERAGE:(%6.2lf%%)\\l",
"GPRINT:in:LAST:Current In\:%8.3lf %sbps",
"GPRINT:pi:LAST:(%6.2lf%%)",
"GPRINT:out:LAST:Current Out\:%8.3lf %sbps",
"GPRINT:po:LAST:(%6.2lf%%)\\l"
);
That gets you a 'weekly' graph. Fiddle with the "-200h" parameter to be
something else and you get other things.
This looks very much like the 14all.cgi output, primarily because that is where
I looked to get this information.
-Will
-----Original Message-----
From: Michael Earls [mailto:[EMAIL PROTECTED]
Sent: Friday, April 18, 2003 10:31 AM
To: [EMAIL PROTECTED]
Subject: [mrtg] Re: RRDTOOL
mrtg rrdtool
What do I need to add to the rrdtool graph to make it look more like
mrtg graph? This is in regards to the bytes / KBS being displayed.
Thanks,
Michael
rrdtool graph
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#! /bin/sh
echo "Content-Type: image/png"
echo
rrdtool graph - \
--imgformat PNG \
--interlaced \
--start="-86400" \
--title 'ISP Traffic Inbound' \
--base="1000" \
--width="750" \
--height="200" \
--alt-autoscale-max \
--vertical-label "Kilobytes Per Second" \
DEF:A="/var/www/mrtg/traffic/fastethernet2_0.rrd":ds0:AVERAGE \
DEF:B="/var/www/mrtg/traffic/atm1_0.91-aal5_layer.rrd":ds0:AVERAGE \
LINE2:A#00CF00:"fa02" \
GPRINT:A:LAST:" Current\:%8.2lf %s" \
GPRINT:A:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:A:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:B#002A97:"atm" \
GPRINT:B:LAST:"Current\:%8.2lf %s" \
GPRINT:B:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:B:MAX:"Maximum\:%8.2lf %s"
PGP Info: KeyID 0x5EB59708 Fingerprint 108B A1D8 76F5 08A8 501A F28C
86F4 4BC5 5EB5 9708
--
Unsubscribe mailto:[EMAIL PROTECTED]
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
--
Unsubscribe mailto:[EMAIL PROTECTED]
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