Log Parser Usage Details For IIS Logs

This article explains 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 softwares – 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 URL's.

Log Parser Studio

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

Log Parser Studio

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

Log Parser Studio

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 icon to execute an active query.


Log Parser Studio

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

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

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

Log Parser Studio

Thanks.