Hello all i am parsing a cisco cdr log and i am having some problems to
create the adecuate regexp

the log goes like this

May 16 08:03:58  10.0.0.1   38#00155544446, SetupTime 11:06:31.062
DisconnectTime 11:10:06.922
May 16 08:03:58  10.0.0.1   38#00155544446,SetupTime 11:06:31.062
DisconnectTime 11:10:06.922
May 17 08:03:58  10.0.0.1   38#00155544446, SetupTime 11:06:31.062
DisconnectTime 11:10:06.922
May 17 08:03:58  10.0.0.1   38#00155544446,SetupTime 11:06:31.062
DisconnectTime 11:10:06.922


The script goes like this

$VOIP = 'cat logprueba.log | egrep
--regexp=%VOIPAAA-5-VOIP_CALL_HISTORY|cut -f6 -d " "';

system('cat log1.log | egrep --regexp=PeerAddress| cut -f10 -d " "| sed
-e s/38#//g > /var/log/parsed');

$dialednumber='sed -e s/,//g /var/log/parsed';


>From this script i get the dialed number,setup time and disconnect
time,now i have got
to repeat this to analize the entire log,i was thinking in a foreach
loop to look for
a repetitive pattern(like %VOIPAAA-5-VOIP_CALL_HISTORY) and repeat the
parsing for
each ocurrence of the pattern.

any sugestions?,any known script that does that?,maybe some software
like mrtg,webmin allready does that(anyone knows)?

i am sorry for the long mail,thanks in advance
Hernan

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to