[rrd-users] mrtg verses rrd

Wendy Etkind wendy at mitre.org
Wed Sep 20 16:27:09 MEST 2000


I'm seeing some much higher peaks using rrd than I see using mrtg. Below
is
the important snipets of code that I'm using, I enclosed both an mrtg
and a
rrd graph of the numbers generated overnight from the code below. Why
would
rrd report such higher peaks? My max speed on this link is 750000, rrd
is
reporting peaks higher than that. On a quick snapshot taken right now
the
numbers are close enough but over time rrd does not produce the same
graphs.
Has anyone else done a mrtg to rrd comparison?

Thanks for any help,

     Wendy


#!/usr/bin/perl
use RRDs;

# initialize rrd database
$rrd = "test.rrd";
$starttime = time - 60;
RRDs::create (
    $rrd,
    "--start", $starttime,
    "--step", 60,
    "DS:ifInOctets:COUNTER:1200:0:4294967295",
    "DS:ifOutOctets:COUNTER:1200:0:4294967295",
    "RRA:AVERAGE:0.5:1:600",  
    "RRA:MAX:0.5:1:600", 
    );

# this section runs every minute, all night
$ifInOctets, $ifOutOctets) = &snmpget($getStr, "ifInOctets.$portnum",
                                               "ifOutOctets.$portnum");
push (@exec, "./rateup", "$dir/mrtg/", $fullname, time, "u",
      $ifInOctets, $ifOutOctets, 750000, "l", $label, "c",
      "#00cc00", "#0000ff", "#006600", "#ff00ff", 
      "i", mrtg.gif, -750000, -750000, 400, 100,
      1, 1, 1, 1, 1);
$in = $ifInOctets * 8;
$out = $ifOutOctets * 8;
$str = time . ":" . $in . ":" . $out;
RRDs::update ($rrd, $str);

# create rrd graph
$endtime = time;
$starttime = $endtime - (18 * 60 * 60); # default: 18 hours of day
($averages,$xsize,$ysize) = RRDs::graph (
        rrd.png, "--imgformat", "PNG",
        "--start", $starttime,
        "--end", $endtime,
        "DEF:in=$rrd:ifInOctets:AVERAGE",
        "DEF:out=$rrd:ifOutOctets:AVERAGE",
        "AREA:in#00ff00", # green
        "LINE1:out#0000ff", # blue
);


-- 
Wendy Etkind (wendy at mitre.org)
Lead Technical Staff: The MITRE Corporation
(781) 271-3217, DSN 478-1186 x3217, fax (781) 271-8689

-- Attached file removed by Listar and put at URL below --
-- Type: image/png
-- Size: 3k (3081 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/rrd.png


-- Attached file removed by Listar and put at URL below --
-- Type: image/gif
-- Size: 14k (15328 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/02-mrtg.gif


--
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