[mrtg] A handy addition to mrtg

Justin Dossey dossey at ou.edu
Mon Dec 13 20:48:17 MET 1999

I admit, I'm not using the latest and greatest MRTG. I'm using version
2.8.8.  I'm generating traffic graphs for 42 switches, and even on a
large Linux workstation, it takes a while to generate all those graphs.  
I'm not sure if this is perfect, but I added a little bit of code to
allow me to run MRTG every five minutes, but generate graphs only every
25 minutes.  It's so small that I didn't bother generating a diff:

At line 108-ish:

$|=1 if $main::DEBUG;

# insertion begins here ----------
# See if we are supposed to be doing this at al
  if ( -e "/tmp/mrtg.rotate" ) {
          my $current_rotate_posn=<ROTATER>;
          print ROTATER ((1 + $current_rotate_posn) % 6) . "\n" ;
          if ($current_rotate_posn % 6 != 0) { return; };
# insertion ends here ---------

  # read in the config file
  my ($routers, $cfg, $rcfg, $cfgfile) = readcfg();

So it's a hack, I admit it.  But oh, the machine is much quieter now...

Justin Dossey, GCN, CS, OU

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg

More information about the mrtg mailing list