Is this possible with textpad
Posted: Sat Feb 20, 2010 6:22 pm
Hello,
I'm trying to simplify log parsing
I'm trying to grep thorugh multiple logs (txt's)for a number of errors, so that i don't have to do multiple searches. I'm also hoping to sort and organize the data that is collected in defirrent ways. I will be pointing to say a week worth of logs from multiple severs. The machine may have several instances of the application running on it as well.
Example of log folder structure
Logs
Server1
date1
date2
Server2
date1
date2
Example Search string:
81002746\|80040111
Example Log lines
Sname Aname EventId Time and Date ThreadId Value
Server1 App1 [20717] (02/16 10:44:49.406):{0x3448} Error (81002746)
Server1 App2 [30002] (02/16 10:45:06.430):{0x2550} Error (80040111)
Server1 App1 [20717] (02/17 10:44:49.406):{0x3338} Error (81002746)
Server1 App2 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App1 [30002] (02/16 10:45:06.430):{0x2550} Error (80040111)
Server2 App2 [20717] (02/16 10:44:49.406):{0x3338} Error (81002746)
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (81002746)
I was hoping to first organize like the example below.
Example of the output of a grep I'm hoping for:
GreppedLogs
Server1
0216
Server1 App1 [20717] (02/16 10:44:49.406):{0x3448} Error (81002746)
Server1 App2 [30002] (02/16 10:45:06.430):{0x2550} Error (80040111)
0217
Server1 App1 [20717] (02/17 10:44:49.406):{0x3338} Error (81002746)
Server1 App2 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2
0216
Server2 App1 [30002] (02/16 10:45:06.430):{0x2550} Error (80040111)
Server2 App2 [20717] (02/16 10:44:49.406):{0x3338} Error (81002746)
0216
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (81002746)
Within each log
sorting firts by thread then by error
Example of a file that i'm hoping for
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (80040111)
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (81002746)
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (81002746)
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (81002746)
I don't mind investing a little time in a process to do this but don't want to waiste my time if its not possible. if it is possible I would appreciate any help i can get.
I'm trying to simplify log parsing
I'm trying to grep thorugh multiple logs (txt's)for a number of errors, so that i don't have to do multiple searches. I'm also hoping to sort and organize the data that is collected in defirrent ways. I will be pointing to say a week worth of logs from multiple severs. The machine may have several instances of the application running on it as well.
Example of log folder structure
Logs
Server1
date1
date2
Server2
date1
date2
Example Search string:
81002746\|80040111
Example Log lines
Sname Aname EventId Time and Date ThreadId Value
Server1 App1 [20717] (02/16 10:44:49.406):{0x3448} Error (81002746)
Server1 App2 [30002] (02/16 10:45:06.430):{0x2550} Error (80040111)
Server1 App1 [20717] (02/17 10:44:49.406):{0x3338} Error (81002746)
Server1 App2 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App1 [30002] (02/16 10:45:06.430):{0x2550} Error (80040111)
Server2 App2 [20717] (02/16 10:44:49.406):{0x3338} Error (81002746)
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (81002746)
I was hoping to first organize like the example below.
Example of the output of a grep I'm hoping for:
GreppedLogs
Server1
0216
Server1 App1 [20717] (02/16 10:44:49.406):{0x3448} Error (81002746)
Server1 App2 [30002] (02/16 10:45:06.430):{0x2550} Error (80040111)
0217
Server1 App1 [20717] (02/17 10:44:49.406):{0x3338} Error (81002746)
Server1 App2 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2
0216
Server2 App1 [30002] (02/16 10:45:06.430):{0x2550} Error (80040111)
Server2 App2 [20717] (02/16 10:44:49.406):{0x3338} Error (81002746)
0216
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (81002746)
Within each log
sorting firts by thread then by error
Example of a file that i'm hoping for
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (80040111)
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (81002746)
Server2 App2 [20717] (02/17 10:44:49.406):{0x3448} Error (81002746)
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (80040111)
Server2 App1 [30002] (02/17 10:45:06.430):{0x2AE0} Error (81002746)
I don't mind investing a little time in a process to do this but don't want to waiste my time if its not possible. if it is possible I would appreciate any help i can get.