Hello people

i been working on this script provided by drieux  but i still have some
doubts about it.

http://www.wetware.com/drieux/pbl/Sys/Admin/CiscoParser1.txt


the scripts works fine with a small log but when i try to run it in the
long log file it displays all the log file
just as if it is being opened with cat.

I am trying to get just the number,setup time and disconnect time from
the log,,just this values in a single
line like this

53353454545 18:10 18:20

When i ran the script it joins the values in a couple of  lines,the
problem is that i don't entirely understand the
regexp,and therefore i cant break it down to get only the number,setup
time and disconnect time values


>From the script

my $dtgT = '\d|:|\.';   #numbers or colons or dots
my $upT = 'SetupTime';
my $downT = 'DisconnectTime';
my $prefT = '38\#';

my $find = qr/(.*)\s+ (\d+\.\d+\.\d+\.\d+)\s* $prefT (\d+), \s* $upT\s*
([$dtgT]+)\s*$downT\s* ([$dtgT]+)/xo;

so the question is  how should i form the regexp to just get the number
from the entire log file?
how should i form the regexp  get only the disconnect time?


Log File:

May 10 14:25:00  13310: %VOIPAAA-5-VOIP_CALL_HISTORY: CallLegType 1,
ConnectionId 0 0 0 0, SetupTim
e 17:30:58.645 UTC Fri May 10 2002, PeerAddress 38#533147631,
PeerSubAddress , DisconnectCause 2F  , Disconnect
Text no resource., ConnectTime 17:30:58.655 UTC Fri May 10 2002,
DisconnectTime 17:30:58.655 UTC Fri May 10 200
2, CallOrigin 1, ChargedUnits 0, InfoType 2, TransmitPackets 0,
TransmitBytes 0, ReceivePackets 0, ReceiveBytes
 0
May 10 15:03:05  13311: %VOIPAAA-5-VOIP_CALL_HISTORY: CallLegType 1,
ConnectionId 0 0 0 0, SetupTim
e 18:09:04.262 UTC Fri May 10 2002, PeerAddress 38#5347631,
PeerSubAddress , DisconnectCause 2F  , DisconnectTe
xt no resource., ConnectTime 18:09:04.262 UTC Fri May 10 2002,
DisconnectTime 18:09:04.262 UTC Fri May 10 2002,
 CallOrigin 1, ChargedUnits 0, InfoType 2, TransmitPackets 0,
TransmitBytes 0, ReceivePackets 0, ReceiveBytes 0
May 10 15:03:38  %VOIPAAA-5-VOIP_CALL_HISTORY: CallLegType 2,
ConnectionId DF125DE2 637711D6
 BD90A185 393856AE, SetupTime 18:09:15.110 UTC Fri May 10 2002,
PeerAddress , PeerSubAddress , DisconnectCause
10  , DisconnectText normal call clearing., ConnectTime 18:09:37.970 UTC
Fri May 10 2002, DisconnectTime 18:09:
37.970 UTC Fri May 10 2002, CallOrigin 2, ChargedUnits 0, InfoType 2,
TransmitPackets 451, TransmitBytes 18040,
 ReceivePackets 0, ReceiveBytes 0


Thanks in advance
Hernan

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

Reply via email to