Programming

Categories

  • No categories

SEARCH

I’m Attending

CodeMash

LogParser Hits Per Day on Specific Page

Posted in: Programming by Steve on May 10, 2012

I was trying to get hits per week on a specific page, but I had to settle for exporting to a CSV and doing the rest in Excel.

logparser -i:IISW3C -o:CSV "SELECT TO_STRING(TO_LOCALTIME(TO_TIMESTAMP(date, time)), 'yyyy-MM-dd') AS [Day], COUNT(*) AS [Requests] INTO hits_per_day.csv FROM *.log WHERE cs-uri-stem = '/login.aspx' GROUP BY [Day] ORDER BY [Day]"