[mrtg] cfgmaker_ip and commented-out interfaces

Alan J. Flavell flavell at a5.ph.gla.ac.uk
Fri Jul 30 17:59:41 MEST 1999


Greetings,

I found the information returned about commented-out interfaces to be
too indefinite.  Here is a patch to make it more informative.  Hope
this is useful, either to incorporate into the package or for others
to apply.  A similar change could be made to the original cfgmaker
  
Made by diff -c cfgmaker_ip.dist cfgmaker_ip > cfgmaker_ip.patch
For use, of course, with the "patch" command.

*** cfgmaker_ip.dist	Thu Jul 29 23:04:45 1999
--- cfgmaker_ip	Fri Jul 30 16:37:11 1999
***************
*** 515,538 ****
      $name="$iphost{$index}";
      $name = "$router.$index" if not $name or $name =~ /\s/;
  
  
!   if (($sifadminstatus{$index} != 1)
! # this check added by Josh - don't query E1-stack controllers
!       || ($siftype{$index} == 18)
! 	|| ($siftype{$index} == 24)
! 	|| ($speed == 0 ) 
! 	|| ($speed > 400 * 10**6)  #speeds of 400 MByte/s are not realistic
! 	|| ($sifoperstatus{$index} == 3)) {
      if(!$comments) { next INTERFACE ; }
  
      print <<ECHO;
  ########
! ######## This Interface is one of the following
! ######## - administratively not UP
! ######## - it is in test mode
! ######## - it is a softwareLoopback interface
! ######## - has a unrealistic speed setting
! ######## It is commented out for this reason.
  ########
  ECHO
    $c="# ";
--- 515,538 ----
      $name="$iphost{$index}";
      $name = "$router.$index" if not $name or $name =~ /\s/;
  
+   $c = '';
  
!   $c = "it has an unrealistic speed setting, $speed" if
!                    ( ($speed == 0) || ($speed > 400 * 10**6) );
!   $c = "it is administratively not UP" if $sifadminstatus{$index} != 1;
!   $c = "it is a softwareLoopback interface" if $siftype{$index} == 24;
!   $c = "Josh - don't query E1-stack controllers" if $siftype{$index} == 18;
!   $c = "it is ATM atm-layer interface" if $siftype{$index} == 37;
!   $c = "it is in test mode" if $sifoperstatus{$index} == 3;
! 
!   if ($c ne '') {
      if(!$comments) { next INTERFACE ; }
  
      print <<ECHO;
  ########
! ######## This Interface, $name, $sifdesc{$index}, type $siftype{$index}
! ######## is commented out because 
! ########   $c
  ########
  ECHO
    $c="# ";

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list