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 fil开发者_StackOverflow社区es using logparser.
Thanks,
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).
Adding to Marks answer, here is how to limit the output to 10 records:
logparser "SELECT TOP 10 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).
精彩评论