[asterisk-users] RTCP debugs and stats

Atis Lezdins atis at iq-labs.net
Mon Jun 2 05:54:39 CDT 2008


On Mon, Jun 2, 2008 at 11:25 AM, Marc LEURENT <lftsy at leurent.eu> wrote:
> Good Morning,
> I would like to be able to test automatically the quality of the line (the MOS), do you know any way to do it automatically?
> I also would like to know how to save rtcp stats in a mysql database if it's possible?
> Any clue?

Unfortuneately no. I needed this once, so I wrote few lines that are
grepping full_log and grouping data in some way. It doesn't give
complete overview, but just approximate quality for peers.

Here's something i done, but you'll need to dig deeper, play with IP
addresses, etc (IP's are scrambled to aa/bb/cc)

Regards,
Atis

#cat /var/log/asterisk/full | grep -A30 -F "Got RTCP from" > rtcp_in.log
#cat /var/log/asterisk/full | grep -A30 -F "Sent RTCP SR to" > rtcp_out.log
#cat /var/log/asterisk/full | grep -A30 -F "RTP-stats" > rtcp_stats.log
#cat rtcp_in.log | grep -A10 -F "Got RTCP from aa.aa.aa." | grep -P
"(Got RTCP|Packets lost so far|Fraction lost)" > rtcp_in_sfo.log
#cat rtcp_in.log | grep -A10 -F "Got RTCP from bb.bb.bb.bb" | grep -P
"(Got RTCP|Packets lost so far|Fraction lost)" > rtcp_in_wci.log
#cat rtcp_in.log | grep -A10 -F "Got RTCP from 192.168." | grep -P
"(Got RTCP|Packets lost so far|Fraction lost)" > rtcp_in_riga.log

#cat rtcp_out.log | grep -A10 -F "Sent RTCP SR to aa.aa.aa." | grep -P
"(Sent RTCP SR to|Fraction lost|Cumulative loss|IA jitter)" >
rtcp_out_sfo.log
#cat rtcp_out.log | grep -A10 -F "Sent RTCP SR to bb.bb.bb.bb" | grep
-P "(Sent RTCP SR to|Fraction lost|Cumulative loss|IA jitter)" >
rtcp_out_wci.log
#cat rtcp_out.log | grep -A10 -F "Sent RTCP SR to 192.168." | grep -P
"(Sent RTCP SR to|Fraction lost|Cumulative loss|IA jitter)" >
rtcp_out_riga.log


#cat rtcp_out_riga.log | grep -F -v "Sent RTCP SR to" | grep -F -v
"Fraction lost: 0" | grep -F -v "Cumulative loss: 0" | grep -F -v
"jitter" > lost_riga.log
#cat rtcp_out_sfo.log | grep -F -v "Sent RTCP SR to" | grep -F -v
"Fraction lost: 0" | grep -F -v "Cumulative loss: 0" | grep -F -v
"jitter" > lost_sfo.log
#cat rtcp_out_wci.log | grep -F -v "Sent RTCP SR to" | grep -F -v
"Fraction lost: 0" | grep -F -v "Cumulative loss: 0" | grep -F -v
"jitter" > lost_wci.log

#cat rtcp_out_riga.log | grep -F "jitter" > jitter_riga.log
#cat rtcp_out_sfo.log | grep -F "jitter" > jitter_sfo.log
#cat rtcp_out_wci.log | grep -F "jitter" > jitter_wci.log

#cat rtcp_out_riga.log | grep -F "Cumulative loss:" | grep -F -v ": 0"
> lost_riga.log
#cat rtcp_out_sfo.log | grep -F "Cumulative loss:" | grep -F -v ": 0"
> lost_sfo.log
#cat rtcp_out_wci.log | grep -F "Cumulative loss:" | grep -F -v ": 0"
> lost_wci.log

# IPs
#cat rtcp_out_sfo.log | grep -o -P "Sent RTCP SR to
([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)" | sort | uniq -c

#cat rtcp_out_sfo.log | grep -A 3 -F "Sent RTCP SR to aa.aa.aa.131" |
grep -F "Cumulative loss:" | grep -F -v ": 0" > lost_sfo_131.log
#cat rtcp_out_sfo.log | grep -A 3 -F "Sent RTCP SR to aa.aa.aa.132" |
grep -F "Cumulative loss:" | grep -F -v ": 0" > lost_sfo_132.log
#cat rtcp_out_sfo.log | grep -A 3 -F "Sent RTCP SR to aa.aa.aa.133" |
grep -F "Cumulative loss:" | grep -F -v ": 0" > lost_sfo_133.log
#cat rtcp_out_sfo.log | grep -A 3 -F "Sent RTCP SR to aa.aa.aa.142" |
grep -F "Cumulative loss:" | grep -F -v ": 0" > lost_sfo_142.log
#cat rtcp_out_sfo.log | grep -A 3 -F "Sent RTCP SR to aa.aa.aa.6" |
grep -F "Cumulative loss:" | grep -F -v ": 0" > lost_sfo_6.log

cat /var/log/asterisk/full | grep -A30 -F "Got RTCP from" > rtcp_in.log
cat /var/log/asterisk/full | grep -A30 -F "Sent RTCP SR to" > rtcp_out.log

cat rtcp_in.log | grep -A10 -F "Got RTCP from cc.cc.cc." | grep -P
"(Got RTCP|Packets lost so far|Fraction lost)" >
rtcp_in_lattelenet.log
cat rtcp_out.log | grep -A10 -F "Sent RTCP SR to cc.cc.cc." | grep -P
"(Sent RTCP SR to|Fraction lost|Cumulative loss|IA jitter)" >
rtcp_out_lattelenet.log

cat rtcp_out_lattelenet.log | grep -F "Cumulative loss:" | grep -F -v
": 0" > lost_lattelenet.log




-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-users mailing list