开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜