Harald Welte | f9e7444 | 2013-12-24 00:45:58 +0100 | [diff] [blame] | 1 | #!/usr/bin/perl -w |
| 2 | use strict; |
| 3 | |
| 4 | while (my $l = <STDIN>) { |
| 5 | chomp($l); |
| 6 | #"15:39:37 l1_tch.c : Meas Rpt: Serv RXLEV=21,Ncell RXLEV=0" |
| 7 | #"15:39:30 l1_send.c : Serving RXQUAL: FULL=0 SUB=0 DTX=0" |
| 8 | if ($l =~ /^\d+:\d+:\d+\s+l1_send\.c\s+: Serving RXQUAL: FULL=(\d+) SUB=(\d+).*/) { |
| 9 | my $rxlev = $1; |
| 10 | if ($rxlev >= 3) { |
| 11 | # enable red background and black foreground */ |
| 12 | printf "\033[30;41m"; |
| 13 | } |
| 14 | printf("%s", $l); |
| 15 | printf("\033[0m\n"); |
| 16 | } |
| 17 | } |