File mrtg-ifHiSpeed-SG10G.patch of Package mrtg

Index: mrtg-2.17.4/bin/cfgmaker
===================================================================
--- mrtg-2.17.4.orig/bin/cfgmaker
+++ mrtg-2.17.4/bin/cfgmaker
@@ -235,6 +235,11 @@ sub InterfaceInfo($$$$$) {
                 debug('base',"Speed: $if - $value");
 
             }
+            if ( ($descr =~ m/10-Gigabit Stackable/) && ($value == 10) && (defined $ifHighSpeed[$i]) ) {
+                ($if, $value) = split /:/, $ifHighSpeed[$i], 2;
+                $value = $value * 1000000;  # highSpeed = contador * 10^6
+                debug('base',"Speed: $if - $value");
+            }
             $routers->{$router}{$if}{'ifSpeed'} = $value;
         }
     } else {
openSUSE Build Service is sponsored by