开发者

Select top 10 pages with log parser from iis logs

开发者 https://www.devze.com 2023-02-07 03:21 出处:网络
Hi Could you please let me know query to select top 10 pages from every iis log fil开发者_StackOverflow社区es using logparser.

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消