Recently, I needed a tool for analysing the web site traffic for a customer. Microsoft IIS isn’t my main working area, so I started googling for free tools available. I came accross utilities from commecial companies like webtrend, but that wasn’t what I was looking for.
I create a file traffic_2011_March.sql with the following statement to determine hourly hit calculations for march month.
SELECT QUANTIZE(TO_LOCALTIME(TO_TIMESTAMP(date, time)), 3600) AS Hour, COUNT(*) AS Hits FROM c:\inetpub\logs\LogFiles\W3SVC1\* WHERE date >='2011-03-01' and date < '2011-04-01' Group By Hour
Opened a CMD window and located LogParser directory “C:\Program Files (x86)\Log Parser 2.2”, and ran the command.
LogParser.exe -i:W3C file:traffic_2011_March.sql -o:CSV