分享一个IIS日志分析工具LogParse

分享一个IIS日志分析工具 

LogParser工具的使用

1)先安装LogParser 2.2.msi ,是一个命令行工具,功能强大,但使用不便;

下载地址:http://www.microsoft.com/DownLoads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en

2)再安装Log Parser Lizard 1.0.exe,UI界面的管理工具。

下载地址:http://www.brothersoft.com/log-parser-lizard-download-238815.html

——这2个文件可以点此打包下载

   

3)查询IIS W3C Logs格式的日志

-- 查询所有字段

select top 100 * from D:\W3SVC1177423993\ex130201.log

-- 查询特定字段

select top 100 date,

time,

cs-method,

cs-uri-stem,

cs-uri-query,

sc-status,

time-taken,

cs(User-Agent)

from D:\task1\ex130203.log

   

--分组排序

select top 100 avg(time-taken) as [Average-Time],

date as [Date],

     time as [Time],   

     cs-method as [Request Verb],

     cs-uri-stem as [Request URI],

     sc-status as [Status]

from D:\task123\author-17.57-ex130203\ex130203.log

group by [Date],[Time],[Request Verb],[Request URI],[Status]

order by [Average-Time] desc

   

4)查询HTTP Error Log格式的日志

select top 40 * from D:\HTTPERR\httperr4.log

   

原文地址:https://www.cnblogs.com/fanyong/p/3110022.html