0

I want to parse my access log. Objective is to get the value of any query string parameter independent of its location. Also is there any free URL parsing s/w or website.

poundifdef
  • 18,726
  • 23
  • 95
  • 134
  • 1
    Hi! (welcome to SO.) Your question is a little bit unclear: what kind of server are you running, and which OS? What language are you writing your parser in? What do you mean by "value of any query string parameter independent of its location"? A bit of detail and clarification would definitely be helpful! Best of luck! – poundifdef Jul 08 '09 at 03:55

1 Answers1

1

If you're on Windows, take a look at Microsoft's Log Parser:

http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1287

A query to obtain query strings for all 500 errors would be something like:

logparser "SELECT cs-uri-query, Count(*) AS Total FROM ex*.log WHERE sc-status>=500 GROUP BY cs-uri-query ORDER BY Total DESC " -rtp:-1

Note that cs-uri-query is the "column" you're interested in. Other examples (including the above) documented at:

http://www.securityfocus.com/infocus/1712

ars
  • 120,335
  • 23
  • 147
  • 134