--- projects/libstatgrab/src/statgrab/statgrab-make-mrtg-config.in 2004/08/10 19:13:07 1.7 +++ projects/libstatgrab/src/statgrab/statgrab-make-mrtg-config.in 2004/08/23 15:04:50 1.8 @@ -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.7 2004/08/10 19:13:07 ats Exp $ +# $Id: statgrab-make-mrtg-config.in,v 1.8 2004/08/23 15:04:50 ats Exp $ use strict; use Getopt::Long; @@ -160,7 +160,11 @@ sub main () { my $name = $stats{"net.$net.interface_name"}; 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); + + # The speed is reported in Mbit/s; we want KiB/s. + $speed = ($speed * 1000000) / (8 * $kib); + + entry("Network interface $name IO", "net.$net.rx", "net.$net.tx", $speed, "Network IO", "KiB/s", "rx", "tx", 0, $KIBIBYTES); } if (exists $toplevel{"page"}) {