[rrd-users] Re: RRD DS;heartbeat and MRTG

Chris Josephes cjoseph at mr.net
Mon Oct 11 22:37:21 MEST 1999


On Mon, 11 Oct 1999, Tobias Oetiker wrote:

> *> But if I decided on a 10 minute or 15 minute interval, would it improve
> *> performance to reduce the number of samples accordingly?
> 
> performance is manly defined by data aquisition and not by the logging ... 

Okay, thanks.

Then to fix the problem with the heartbeat and step value in MRTG for
non-5 minute intervals, would the following code revision be sufficient:

    if (! -e $rrd) {
          # create the rrd if it doesn't exist
          my $now = time;
          my $intrvl = $$cfg{'interval'};
          my $hrtbt = $intrvl+300;
          $now = ($now / $intrvl) * intrvl;
          RRDs::create($rrd, '-b', $now, '-s', $intrvl,
                  "DS:ds0:$up_abs:$hrtbt:U:U",
                  "DS:ds1:$up_abs:$hrtbt:U:U",
                  "RRA:AVERAGE:0.5:1:600",
                  "RRA:AVERAGE:0.5:6:600", 
                  "RRA:AVERAGE:0.5:24:600",
                  "RRA:AVERAGE:0.5:288:732",
                  "RRA:MAX:0.5:1:600",
                  "RRA:MAX:0.5:6:600",
                  "RRA:MAX:0.5:24:600",
                  "RRA:MAX:0.5:288:732");
          my $e = $RRDs::error;
          die "Cannot create logfile: $e\n" if $e;


--                      _______________
 Chris Josephes      __/ MRNet/Onvoy   \
 chrisj at mr.net    __/   www.onvoy.com  /
\________________/

--
* To unsubscribe from the rrd-users mailing list, send a message with the
  subject: unsubscribe to rrd-users-request at list.ee.ethz.ch



More information about the rrd-users mailing list