分享一個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

 

 

   


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM