Logpaser -- how to search for text in cs-uri-queryRSS

4 replies

Last post Jul 21, 2004 03:52 PM by akahara

‹ Previous Thread|Next Thread ›
  • Logpaser -- how to search for text in cs-uri-query

    Jul 10, 2004 10:44 AM|akahara|LINK

    I'm trying to search for a particular phrase in my log files. I'm having trouble with the syntax, however. Here's what I'm trying to do in psuedo code: Find the phrase "access_denied" by day and hour in *.log. Display each instance of the phrase sorted by day and hour. Thanks akahara
  • Re: Logpaser -- how to search for text in cs-uri-query

    Jul 11, 2004 03:35 PM|chrisad|LINK

    Hey~ Have you reviewed the website www.logparser.com? There is an environment setup over there for you to post this type of question. I have also posted this question internally to some folks at MS who design log parser and I hope they will respond. If I here something, I will let you know. Also, you might want to review the following webcasts that focus quite a bit on Log Parser - ======= IIS Data Mining with Log Parser 2.X (Level 300) (http://go.microsoft.com/fwlink/?LinkId=23314) Find out how to make sense of the feedback data your server generates. Learn the basics of using Log Parser 2.x and see real-world examples in this webcast. ======= Tips and Tricks for Optimizing Performance in IIS 6.0 (Level 300) (http://go.microsoft.com/fwlink/?LinkId=23360) This session discusses how you can ensure that your server running Internet Information Services (IIS) 6.0 performs at its maximum capacity. Topics include network latency; efficient coding practices; and methods to ensure that IIS 6.0 serves content the right way, at the right time—the first time. Thanks, ~Chris
    ~Chris
    Program Manager
    IIS Product Unit (Microsoft)
  • Re: Logpaser -- how to search for text in cs-uri-query

    Jul 11, 2004 04:56 PM|chrisad|LINK

    Hey~ This is depending on the log file, but some assumptions were made in their reply. Here is an example of what you were looking for (hopefully) ... SELECT date, time, cs-uri-stem FROM ex*.log WHERE cs-uri-stem LIKE ‘%access_denied%’ Thanks,
    ~Chris
    Program Manager
    IIS Product Unit (Microsoft)
  • Re: Logpaser -- how to search for text in cs-uri-query

    Jul 13, 2004 10:57 PM|qbernard|LINK

    Don't forget this excellent site for Log Parser - http://www.logparser.com/
    Cheers,
    Bernard Cheah
  • Re: Logpaser -- how to search for text in cs-uri-query

    Jul 21, 2004 03:52 PM|akahara|LINK

    Thanks all for the help & links! For future readers of this post, here is the script that ended up working for me: ================================================== Get a count of the phrase "access_denied" from your log files, and export results to a text file. ================================================== LogParser "SELECT date, count(*) AS Total FROM e:\logfiles\ex*.log WHERE cs-uri-query LIKE '%%access_denied%%' GROUP BY date ORDER BY date" -rtp:-1 > results.txt ================================================== As I understand, the double %% are necessary due to how the command shell processes variables with the single %.
‹ Previous Thread|Next Thread ›