iislogparser

Select top 10 pages with log parser from iis logs


Hi Could you please let me know query to select top 10 pages from every iis log files using logparser.

Thanks,


Solution

  • Get all the logs into a directory then run

    logparser "SELECT cs-uri-stem, COUNT(*) as cnt FROM *.log GROUP BY cs-uri-stem ORDER BY cnt DESC" -i:IISW3C -o:CSV
    

    (This assumes the logs are in W3C format).