OK I will try to give the info, hopefully it will help to understand my issue and it's not confusing too much:
-
Pseudo code version? I am not sure if I understand the question, I want to supply one fixed parameter and find all the other variables logically connected to that fixed parameter, all those exists in multiple log files.
-
Data files are the logs;contain the various data like debug information, system and connection messages. It's on the server processing emails and other items like PIM etc. and every day generates the logs as follows:
*GWSC* or *GWQM* - connects to email system checking for new emails
*MAGT* - connects to emails system to pickup the email
*DISP* - gets the email from *MAGT* and forwards to recipient
*GWCO* logs changes in the existing email system (reads, deletes, etc..)
-
All what I need to know is one input parameter. Depends on what one do I actually have.
Most of the time it's $refid, but it can be $IceID, or $tag
example of the lines I am looking for -
[QM/SC]
[34006] (07/23 09:04:42):{0x410} {12} {Buly, Paul} MTH: New Message, RefId=0, ICEId=4A68279B.GWDOM2.GWPO03.100.16C6236.1.166AC.1, MailSyncID=9629454, ObjectDefnId=1000, Successful=True
[MAGT]
[40435] (07/23 09:04:43.918):{0x21CC} {Buly, Paul} Queuing new mail through notification. EntryId=373748. Msgs Pending 0
[40000] (07/23 09:04:43.918):{0x21CC} {Buly, Paul} Get MAIL {9629454} A68279B.GWDOM2.GWPO03.100.16C6236.1.166AC.1 from the mailbox
[40000] (07/23 09:04:44.121):{0x21CC} {Buly, Paul} PopulateMessage MailSyncID=9629454, RefId=0, Delivered=Thu Jul 23 09:04:27 2009 GWID=4A68279B.GWDOM2.GWPO03.100.16C6236.1.166AC.1
[30085] (07/23 09:04:44.136):{0x21CC} {Buly, Paul} New mail has arrived, EntryId=373748
[40287] (07/23 09:04:44.136):{0x21CC} {Buly, Paul} Queuing message, RefId=-2007620944, EntryId=373748, Posted=07/23 09:04:27
[30081] (07/23 09:04:44.168):{0x21E8} {Buly, Paul} Sending message, size=310, EntryId=373748, RefId=-2007620944, TransactionId=-900822891, Tag=9586876
[40279] (07/23 09:04:44.168):{0x21E8} {Buly, Paul} SubmitToRelaySendQ, Tag=9586876
[40287] (07/23 09:04:44.136):{0x21CC} {Buly, Paul} Queuing message, RefId=-2007620944, EntryId=373748, Posted=07/23 09:04:27
[30097] (07/23 09:04:45.277):{0x10C4} {Buly, Paul} Message has been delivered, Tag=9586876, EntryId=373748
[DISP]
[30222] (07/23 09:04:44.168):{0x11E8} {Buly, Paul} MTH: contentType=CMIME, sizeOTA=274, sizeOTW=274, TransactionId=-900822891, Tag=13662827
[30310] (07/23 09:04:44.168):{0x11E8} {Buly, Paul} Forwarding internal data, contentType=CMIME, routing=S36822534, size=312, cmd=0x3, ack=0, TransactionId=-900822891, intTag=9586876, Tag=13662827, Submit=1
[30368] (07/23 09:04:45.277):{0x21DC} {Buly, Paul} Packet has been delivered, Tag=13662827
[30388] (07/23 09:04:45.277):{0x21DC} [BIPPa] {Buly, Paul} Forwarding status to Agent (S36822534_001), intTag=9586876, extTag=13662827
[GWCO]
[34022] (07/23 09:28:06):{0x86C} {4} {Buly, Paul} MTH: Delete Message, RefId=-2007620944, ICEId=4A68279B.GWDOM2.GWPO03.100.16C6236.1.166AC.1, MailSyncId=9629454, ObjectDefnId=7000, Successful=True
This is just the filtered output as it should be visible after successful searching.
Supplying the $refid shows what other parameters to search for to get the information from other files -
$refid needs $threadID=0x21CC to find MailSyncID and search for it in the *GWSC(QM)* file.
Problem is when the system fails and some items were not delivered, then I need the script to acknowledge me about it so I can see where is the point of the failure.
for example -
[QM/SC]
[34006] (07/23 09:04:42):{0x410} {12} {Buly, Paul} MTH: New Message, RefId=0, ICEId=4A68279B.GWDOM2.GWPO03.100.16C6236.1.166AC.1, MailSyncID=9629454, ObjectDefnId=1000, Successful=True
[MAGT]
[40435] (07/23 09:04:43.918):{0x21CC} {Buly, Paul} Queuing new mail through notification. EntryId=373748. Msgs Pending 0
[40000] (07/23 09:04:43.918):{0x21CC} {Buly, Paul} Get MAIL {9629454} A68279B.GWDOM2.GWPO03.100.16C6236.1.166AC.1 from the mailbox
[40000] (07/23 09:04:44.121):{0x21CC} {Buly, Paul} PopulateMessage MailSyncID=9629454, RefId=0, Delivered=Thu Jul 23 09:04:27 2009 GWID=4A68279B.GWDOM2.GWPO03.100.16C6236.1.166AC.1
[30085] (07/23 09:04:44.136):{0x21CC} {Buly, Paul} New mail has arrived, EntryId=373748
[40287] (07/23 09:04:44.136):{0x21CC} {Buly, Paul} Queuing message, RefId=-2007620944, EntryId=373748, Posted=07/23 09:04:27
[30081] (07/23 09:04:44.168):{0x21E8} {Buly, Paul} Sending message, size=310, EntryId=373748...error sending message, uknown exception
[DISP]
[GWCO]
in this case $tag doesn't exist, so script should not search for it in other files and stop where the error is.
-
specify what set of information completes a data set - described in ad 3. ?
-
Output - I don't know what type of output can I have actually, suppose it could be e.g. XML file? Output would be fine as just text displayed in the console
-
fixed information is RefID in this script, variables are all the other ($mailsyncid, $tag, $ICEID ...) I'd like to have an option to supply any fixed information and search for relevant other variables. Typically I get $RefId or $ICEId when user reports the email hasn't been delivered.
Cheers