IIS Log Parser

I was troubleshooting performance issues today and needed to analyze IIS logs to see which requests are slow.  In the past I was able to use just Notepad to do that for small logs.  Today’s log was 172 MB in size, and I had some serious issues, even with Notepad++ trying to make sense of the data.  I looked around and found this great tool: Log Parser Studio.

You can download it from Tech Net Marketplace: https://gallery.technet.microsoft.com/Log-Parser-Studio-cd458765.

Once you donwload and unzip it, you will get a prompt to download LogParser.  Go ahead and do that.  Once you restart the studio, you will be able to query your data using T-SQL like language.  Click open folder yellow button and add your log files first.  Then you can use Search box to browse pre-built queries that ship with the tool, such as TOP 25 Slowest Url requests.

If you look at the query window, you will see the following:

SELECT TOP 25
cs-uri-stem as URL,
MAX(time-taken) As Max,
MIN(time-taken) As Min,
Avg(time-taken) As Average
FROM ‘[LOGFILEPATH]’
GROUP BY URL
ORDER By Average DESC

 

Now you can open a new query and start playing with your own data.  Executing top 25 slow URLs on my machine tool 1 second – that is on 172 MB worth of IIS logs.

I love this tool from Microsoft!

Enjoy.