diff --git a/plugins/network/bandwidth_ b/plugins/network/bandwidth_ index 99a4fc39..1ceda5e6 100755 --- a/plugins/network/bandwidth_ +++ b/plugins/network/bandwidth_ @@ -75,7 +75,7 @@ my $count30 = 2592000; # The number of seconds in 30 days my $unix_ts = time; my $rollover = 4294967295; -eval { init(); }; +init(); sub autoconf { $0 =~ /bandwidth_(.+)*$/; @@ -263,6 +263,7 @@ sub sum_old { sub munin_output { my $period = $unix_ts - $oldest_ts; + return unless $period; #can't estimate anything from a single point, so don't. my $total30 = $input_30days + $output_30days; my $average30 = $total30 / $period; print "average.value $average30\n";