diff --git a/src/color_rxlev.pl b/src/color_rxlev.pl new file mode 100755 index 0000000..9d645d6 --- /dev/null +++ b/src/color_rxlev.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w +use strict; + +while (my $l = ) { + chomp($l); + #"15:39:37 l1_tch.c : Meas Rpt: Serv RXLEV=21,Ncell RXLEV=0" + #"15:39:30 l1_send.c : Serving RXQUAL: FULL=0 SUB=0 DTX=0" + if ($l =~ /^\d+:\d+:\d+\s+l1_send\.c\s+: Serving RXQUAL: FULL=(\d+) SUB=(\d+).*/) { + my $rxlev = $1; + if ($rxlev >= 3) { + # enable red background and black foreground */ + printf "\033[30;41m"; + } + printf("%s", $l); + printf("\033[0m\n"); + } +} diff --git a/src/color_rxlev.test b/src/color_rxlev.test new file mode 100644 index 0000000..e8e9508 --- /dev/null +++ b/src/color_rxlev.test @@ -0,0 +1,69 @@ +15:39:34 l1_tch.c : Meas Rpt: Serv RXLEV=20,Ncell RXLEV=0 +15:39:34 rr_general.c : Generating complete dedicated BA list +15:39:34 l1_send.c : Serving RXLEV_FULL=20 RXLEV_SUB=20 +15:39:34 l1_send.c : Serving RXQUAL: FULL=0 SUB=0 DTX=0 +Got 48 data of payload +0000 : 10 00 2C 00 2C 00 3A 51 00 00 E8 D1 0D 00 00 00 ..,.,.:Q........ +0016 : 17 00 14 14 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0032 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +15:39:34 l1_tch.c : Meas Rpt: Serv RXLEV=20,Ncell RXLEV=0 +15:39:35 rr_general.c : Generating complete dedicated BA list +15:39:35 l1_send.c : Serving RXLEV_FULL=20 RXLEV_SUB=20 +15:39:35 l1_send.c : Serving RXQUAL: FULL=3 SUB=0 DTX=0 +Got 66 data of payload +0000 : 10 00 3E 00 3E 00 31 52 00 00 67 D3 0D 00 00 00 ..>.>.1R..g..... +0016 : 80 A4 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0032 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0048 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0064 : 00 00 .. + +Got 48 data of payload +0000 : 10 00 2C 00 2C 00 3A 51 00 00 68 D3 0D 00 00 00 ..,.,.:Q..h..... +0016 : 17 00 14 14 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0032 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +15:39:35 l1_tch.c : Meas Rpt: Serv RXLEV=20,Ncell RXLEV=0 +15:39:35 l1_tch.c : CRC errors = 100/100 +15:39:35 rr_general.c : Generating complete dedicated BA list +15:39:35 l1_send.c : Serving RXLEV_FULL=20 RXLEV_SUB=20 +15:39:35 l1_send.c : Serving RXQUAL: FULL=2 SUB=0 DTX=0 +Got 48 data of payload +0000 : 10 00 2C 00 2C 00 3A 51 00 00 E7 D4 0D 00 00 00 ..,.,.:Q........ +0016 : 17 00 14 14 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0032 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +15:39:35 l1_tch.c : Meas Rpt: Serv RXLEV=20,Ncell RXLEV=0 +15:39:36 rr_general.c : Generating complete dedicated BA list +15:39:36 l1_send.c : Serving RXLEV_FULL=20 RXLEV_SUB=20 +15:39:36 l1_send.c : Serving RXQUAL: FULL=4 SUB=0 DTX=0 +Got 48 data of payload +0000 : 10 00 2C 00 2C 00 3A 51 00 00 67 D6 0D 00 00 00 ..,.,.:Q..g..... +0016 : 17 00 14 14 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0032 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +15:39:36 l1_tch.c : Meas Rpt: Serv RXLEV=20,Ncell RXLEV=0 +15:39:36 rr_mm_send.c : RR send CM_RR_STATUS_IND to CM +15:39:36 rr_general.c : Generating complete dedicated BA list +15:39:36 l1_send.c : Serving RXLEV_FULL=21 RXLEV_SUB=21 +15:39:36 l1_send.c : Serving RXQUAL: FULL=0 SUB=0 DTX=0 +Got 66 data of payload +0000 : 10 00 3E 00 3E 00 31 52 00 00 E7 D7 0D 00 00 00 ..>.>.1R........ +0016 : B8 A5 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0032 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0048 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0064 : 00 00 .. + +Got 48 data of payload +0000 : 10 00 2C 00 2C 00 3A 51 00 00 E8 D7 0D 00 00 00 ..,.,.:Q........ +0016 : 17 00 15 15 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0032 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +15:39:36 l1_tch.c : Meas Rpt: Serv RXLEV=21,Ncell RXLEV=0 +15:39:37 rr_general.c : Generating complete dedicated BA list +15:39:37 l1_send.c : Serving RXLEV_FULL=21 RXLEV_SUB=21 +15:39:37 l1_send.c : Serving RXQUAL: FULL=0 SUB=0 DTX=0 +Got 48 data of payload +0000 : 10 00 2C 00 2C 00 3A 51 00 00 66 D9 0D 00 00 00 ..,.,.:Q..f..... +0016 : 17 00 15 15 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0032 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................