[mrtg] Re: Stopping CFGMaker comment out zero byte interfaces ?

Alex van den Bogaerdt alex at ergens.op.het.net
Wed Jan 7 13:33:04 MET 2004


On Wed, Jan 07, 2004 at 12:01:28PM -0000, Strutt, Simon wrote:

> Is there a way to force the CFGmaker to use 100M for MaxBytes regardless of
> whats returned by the switch, and so stop it commenting out the interface?
> (Rather than recreating the cfg file each time a new port is used, or
> editing the cfg file to remove the #'s, or for that matter a quick bit of
> script that can uncomment interfaces).

In stead of hacking the output, why not hack cfgmaker itself?

To get what you want:
   # Do some futher investigation if the interface makes
   # sense to collect on

   if ($$i{ifSpeed} == 0) {
      push @prob, "has a speed of $$i{ifSpeed} which makes no sense";
                 $if_ok = 0;
   }

   This test is causing you problems.  Skip it.  

To get what you ask for:
   Just after ifSpeed is set, override it.

   I'm not fluent in perl but I think it is in sub InterfaceInfo,
   adjust it just above the line saying
      "magic speed determination for portmaster IFs"
   
HTH
Alex
-- 
begin  sig
http://www.googlism.com/index.htm?ism=alex+van+den+bogaerdt&type=1
This message was produced without any <iframe tags

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
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



More information about the mrtg mailing list