--- projects/libstatgrab/src/statgrab/statgrab-make-mrtg-config.in 2004/08/10 19:07:02 1.6 +++ projects/libstatgrab/src/statgrab/statgrab-make-mrtg-config.in 2004/08/10 19:13:07 1.7 @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -# $Id: statgrab-make-mrtg-config.in,v 1.6 2004/08/10 19:07:02 ats Exp $ +# $Id: statgrab-make-mrtg-config.in,v 1.7 2004/08/10 19:13:07 ats Exp $ use strict; use Getopt::Long; @@ -158,8 +158,9 @@ sub main () { foreach my $net (sort keys %nets) { my $name = $stats{"net.$net.interface_name"}; - # FIXME should be able to discover interface speed - entry("Network interface $name IO", "net.$net.rx", "net.$net.tx", 100*$mib, "Network IO", "KiB/s", "rx", "tx", 0, $KIBIBYTES); + my $speed = int($stats{"net.$net.speed"}); + $speed = 100 if $speed == 0; + entry("Network interface $name IO", "net.$net.rx", "net.$net.tx", $speed*$mib, "Network IO", "KiB/s", "rx", "tx", 0, $KIBIBYTES); } if (exists $toplevel{"page"}) {