diff options
-rwxr-xr-x | qos.pl | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -60,6 +60,7 @@ my %bwthresh = ( crit => 80, ); my %bwcolors = ( + none => "white", ok => "green", warn => "rgb531", crit => "red", @@ -126,7 +127,9 @@ sub format_rate_color { if ($colored_rates) { $relrate = $bytes/128 * 100.00 / $bandwidth{$direction}; - if ($relrate >= $bwthresh{crit}) { + if ($relrate == 0) { + $color = $bwcolors{none}; + } elsif ($relrate >= $bwthresh{crit}) { $color = $bwcolors{crit}; } elsif ($relrate >= $bwthresh{warn}) { $color = $bwcolors{warn}; |