Re: Parsing Dr. Watson log files

From: Armin Freiberg (A.Freiberg_at_cenit.de)
Date: 02/26/04

  • Next message: Kieran: "Re: Some questions on setting user access for certain Domain user."
    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!!


  • Next message: Kieran: "Re: Some questions on setting user access for certain Domain user."

    Relevant Pages

    • Re: Flame Bait! Windows vs: The Unices
      ... I think it's safe to say that a Windows solution to this sort of thing ... >> database, pipes that output to a python program that produces the ... It's not part of the default install on any I'm familiar with, ... merely executing the shell script updates the data from ...
      (comp.programming)
    • Re: Flame Bait! Windows vs: The Unices
      ... *if* there exists a goal to "take on" Windows. ... > it's generally easy to acquire and install. ... Scheme, maybe? ... merely executing the shell script updates the ...
      (comp.programming)
    • Re: www.g7comms.co.uk
      ... After replacing NikTheGeek with a small shell script on Sunday 12 Mar ... the following appeared on stdout: ... world than Windows ones. ...
      (uk.radio.amateur)
    • Re: Setting the startup directory when creating a link
      ... >> If the link is in the same directory as the original file, ... > to move a link-container in the windows sense to his desktop, ... You analysis of the difference in a link between Windows and Linux is ... Other than creating a shell script, ...
      (alt.os.linux)
    • Re: [PHP] Re: skinning a cat
      ... Robert Cummings wrote: ... on to show your shell script doing similar. ... simple lock class easily achieves in both linux and windows. ... if you want to debate this - you take a relatively complex solution ...
      (php.general)