From: Hades User Date: Fri, 3 Nov 2017 10:21:05 +0000 (+0100) Subject: add warning above 80MByte/s data rate X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=bdb2567a02376ec2ffa36b030146e385295df54a;p=daqtools.git add warning above 80MByte/s data rate --- diff --git a/dmon/scripts/dmon_datarate.pl b/dmon/scripts/dmon_datarate.pl index a71d180..38494ef 100755 --- a/dmon/scripts/dmon_datarate.pl +++ b/dmon/scripts/dmon_datarate.pl @@ -16,9 +16,9 @@ my $value, my $longtext, my $status; while(1) { - my $errors = 0; + my $errors = Dmon::OK; my $max = 0; my $min = 1E9; my $sum = 0; - my $r = trb_register_read(0xff7f,0x83b3); + my $r = trb_register_read(0xff7f,0x83e2); if (defined $old) { foreach my $c (keys %{$r}) { next unless defined $r->{$c}; @@ -26,6 +26,7 @@ while(1) { if ($s < 0) {$s += 2**32;} if ($s > $max) {$max = $s;} if ($s < $min) {$min = $s;} + if($s > 80000000) {$errors = Dmon::WARN;} $sum += $s; } @@ -34,7 +35,7 @@ while(1) { $value = Dmon::SciNotation($sum)."b/s"; my $longtext = "Total Data rate ".Dmon::SciNotation($sum)."b/s
Maximum per board: ".Dmon::SciNotation($max)."b/s"; - $status = Dmon::OK; + $status = $errors; #Dmon::OK; Dmon::WriteQALog($config{flog},"datarate",20,$status,$title,$value,$longtext); } $old = $r;