summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xqos.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/qos.pl b/qos.pl
index a76ea97..5c7787d 100755
--- a/qos.pl
+++ b/qos.pl
@@ -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};