Log Parser Usage Details For IIS Logs

Introduction

Log Parser Studio helps us to parse different types of logs.

In this tutorial, we will mainly focus on parsing IIS logs.

There are 2 Log Parser software – one which runs in the command prompt only and the second one has proper GUI support.

Installation

Kindly find the link for Log Parser Studio.

Below is the sample query for Log Parser with GUI to get the output from IIS logs for a URL and other data like [MAX, MIN, AVG] – Response Time in mili seconds and hits.

SELECT cs-uri-stem as URL,
MAX(time-taken) As Max,
MIN(time-taken) As Min,
Avg(time-taken) As Average,
Count(1) as Hits 
FROM '[LOGFILEPATH]'
GROUP BY URL
ORDER BY Average DESC

Below is the sample query to run in Log Parser with the command prompt version.

Logparser -i: iisw3c “ SELECT cs-uri-stem as URL,
MAX(time-taken) As Max,
MIN(time-taken) As Min,
Avg(time-taken) As Average,
Count(1) as Hits from D:\test.log GROUP By URL ORDER BY Average DESC TO D:\result.csv” –o : csv

Usage details Log parser studio

The landing screen of Log Parser Studio is given below.

Log Parser Studio

As we are interested in parsing IIS logs, so select IIS-Top25 slow URLs.

URL

The query with all the details will be shown to the user.

 User

Now, we need to choose the IIS logs file. Click the Choose log files icon.

 Log files

The dialog box with the options will be shown, where we have to select the individual log files or the folder.

Now, we need to click the icon to execute an active query.

 Active query

Below is the screenshot of Log Parser Studio with the results.

The data for Max, Min, and Average refers to Response Time in mili seconds.

We can copy data or export the data, as required.

Data

Thanks.


Recommended Free Ebook
Similar Articles