Previous Next

Thread: First Time User: How to parse a downloaded file?

Last post 07-22-2008 5:00 AM by Rovastar. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 07-20-2008, 6:22 PM

    First Time User: How to parse a downloaded file?

    I have a website on a shared hosting plan. I have been downloading the log files daily. I then import them to excel workbook. I'm mainly looking for errors and post methods. This has been time consuming. So I have been looking for a better way. I found out about logparser (ver. 2.2) and have downloaded and installed it on my computer . I can't seem to find any examples of how to include the path and file name of the log file that I want to parse.

    Would someone give an example finding all "cs-method = POST" and "sc-status = 500" from file at c:\documents\logfiles\ex080701.log.

     Thanks

    Photo_Joe

  • 07-20-2008, 9:08 PM In reply to

    Re: First Time User: How to parse a downloaded file?

    This does a count...play with it till you get what you really want. 

    SELECT TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time),3600)),
    COUNT(*) AS Error_Frequency FROM c:\documents\logfiles\ex080701.log
    WHERE sc-status >= 500 AND cs-method = POST
    GROUP BY TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time),3600))
    ORDER BY TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time),3600)) ASC

  • 07-20-2008, 9:39 PM In reply to

    Re: First Time User: How to parse a downloaded file?

    Thank you joelangley,

    I had to drop the" AND cs-method = POST " from the query. Because I got a error message from log parser lizard "Error parsing query: Where Clause: Syntax Error: unknown field 'POST' [Record field does not exist.]

    But the main thing is, this has given me a starting point that I can build on, thanks!

    BTW is your last name Langley. I have great many kin folk from AL with that surname.

    Photo_Joe

  • 07-22-2008, 4:30 AM In reply to

    • yellowdog.dave
    • Top 50 Contributor
    • Joined on 07-18-2008, 3:17 AM
    • Johannesburg, South Africa
    • Posts 83

    Re: First Time User: How to parse a downloaded file?

    Hi Guys, 

    The problem in the query with the POST is that it needs to be in single quotes in the query;

    SELECT TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time),3600)),
    COUNT(*) AS Error_Frequency FROM c:\documents\logfiles\ex080701.log
    WHERE sc-status >= 500 AND cs-method = 'POST'
    GROUP BY TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time),3600))
    ORDER BY TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time),3600)) ASC 

    Cheers, Dave
    Yes, dear
  • 07-22-2008, 5:00 AM In reply to

    • Rovastar
    • Top 10 Contributor
    • Joined on 03-13-2008, 2:00 PM
    • London, UK
    • Posts 758

    Re: First Time User: How to parse a downloaded file?

     a simpler version for beginners to get the basics

    SELECT
     *
    FROM
    c:\documents\logfiles\ex080701.log
    WHERE
    cs-method = 'POST'
    AND
    sc-status = 500
    Most overused word in IT is 'should' as in 'That should work!?!'
Page 1 of 1 (5 items)
Page view counter