Chris Crowe's Blog
Ramblings of an IIS MVP ( MVP Since 1997 )

Powered By IIS 7

Search my blog

Some of my readers



My Microsoft Certifications


Dec 15, 1998

Dec 20, 2000

Jan 31, 2001

Jul 22, 2002

Nov 1, 2004

My Microsoft MVP Awards




1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
mvp.support.microsoft.com

In this blog entry we will display the same output in a number of different formats that Log Parser is capable of providing.

Default

Using the default output format the results are displayed inside of the command prompt.

SELECT top 25 distinct c-ip as ClientIP, Count(*) as Hits
FROM \\sbs2003\LogFiles\W3SVC68783193\ex0508*.log
group by c-ip
order by Hits, c-ip desc


Command Line

LogParser.exe file:distinctclientrequests.sql

Output

Notice in the above listing you get a "Press a key..." displayed you can turn this off if you use the -rtp:-1 switch

Chart

Using an output format of a chart you can create nice graphs of log entries

SELECT top 25 distinct c-ip as ClientIP, Count(*) as Hits
into test.gif
FROM \\sbs2003\LogFiles\W3SVC68783193\ex0508*.log
group by c-ip
order by Hits, c-ip desc


Command Line

LogParser.exe file:distinctclientrequests.sql -view

Output

The output in this case is a file on disk called test.gif. and the -view parameter displays it in a window.


 

DataGrid

Using an output format of a DataGrid you can view the results inside of a grid which is a lot easier for viewing the results in certain circumstances.

SELECT top 25 distinct c-ip as ClientIP, Count(*) as Hits
into DATAGRID
FROM \\sbs2003\LogFiles\W3SVC68783193\ex0508*.log
group by c-ip
order by Hits, c-ip desc


Command Line

LogParser.exe file:distinctclientrequests.sql

Output

posted on Wednesday, August 24, 2005 4:41 PM | Filed Under [ IIS IIS - Log Parser IIS / Tools / Log Files ]

Comments


# re: Log Parser - Different Output Formats available


Here is a GUI Based IIS Log file parser for anyone that is interested.

Alexander Higgins IIS Log File Parser
Posted by Alexander Higgins on 7/18/2008 4:12 PM

Post Comment


Title *
Name *
Email
Url
Comment *  
Please add 7 and 8 and type the answer here: