Re: Parsing Dr. Watson log files
From: Armin Freiberg (A.Freiberg_at_cenit.de)
Date: 02/26/04
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 26 Feb 2004 13:18:44 -0800
Hello,
I have done something like that via a shell script.
It has been tested with English and German versions of drwtsn32.log
in Windows NT 4.0, Windows 2000 and a little in Windows XP.
Maybe you can use or tweak it.
If you give me some feedback on it I would be glad.
A.Freiberg@cenit.de
Here is the script:
=====================================================
set -x
awk '
/App:/ {
searchforstack = 0
printf "\n%s " , $0
pid = $0
gsub ( /.*pid=/ , "" , pid)
gsub ( /).*/ , "" , pid)
#print pid
}
/Anwendung:/ {
searchforstack = 0
printf "\n%s " , $0
pid = $0
gsub ( /.*pid=/ , "" , pid)
gsub ( /).*/ , "" , pid)
#print pid
}
/----> Task List <----/ , / 0 _Total.exe/ {
if ( $1 + 0 == pid + 0 ) printf "%s " , $2
}
/----> Taskliste <----/ , / 0 _Total.exe/ {
if ( $1 + 0 == pid + 0 ) printf "%s " , $2
}
/When:/ {
printf "%s " , $0
}
/Wann:/ {
printf "%s " , $0
}
/FAULT ->/ {
searchforstack = 1
}
/----> Stack Back Trace <----/ && searchforstack == 1 {
#print "1" , $0
getline
#print "2" , $0
getline
#print "3" , $0
getline
printf "%s " , $NF
searchforstack = 0
}
/FEHLER ->/ {
searchforstack = 1
}
/----> Stack Back Trace <----/ && searchforstack == 1 {
#print "1" , $0
getline
#print "2" , $0
getline
#print "3" , $0
getline
printf "%s " , $NF
searchforstack = 0
}
' drwtsn32.log > drwtsn32.log.Analyse.txt
=====================================================
"Top Rock" <top-rock@lycos.co.uk> wrote in message news:<0FN_b.3228$396.2505@newsfe3-win.server.ntli.net>...
> Try using something like :-
>
> for /f "tokens=1,2,3,4" %i in (myfile.log) do echo %i %j %k %l>>
> parsedfile.txt
>
> the tokens tells the command to use the 1st, 2nd, 3rd and 4th colum the %i
> means the first collum variable is %i the myfile.txt is the name of the log
> and then we can echo which colums out that we want. In this case I have said
> colums 1,2,3,4 by echoing %i, %j %k %l
>
> "Bobby Crown" <for2net1@yahoo.com> wrote in message
> news:33059c90.0402090909.1146c133@posting.google.com...
> > Can anyone tell me the easiest way to parse a Dr. Watson log file?
> >
> > Thanks in advance!!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|