【转】日志分析

1. 安装Log Parser 2.2

https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=24659

https://gallery.technet.microsoft.com/Log-Parser-Studio-cd458765  下载之后解压即可

2. 运行Log Parser Studio

在之前解压的LPSV2.D1文件夹中运行LPS.exe。

3. 指定IIS日志文件路径

新建查询

帮助文档

查询所有列

SELECT top 10  * FROM '[LOGFILEPATH]'   

查询指定时间范围类

SELECT TOP 100  * FROM '[LOGFILEPATH]'  where [date]>=TIMESTAMP('2016-06-27 00:00:00', 'yyyy-MM-dd hh:mm:ss')   AND  [time]>=TIMESTAMP('0000-01-01 00:01:00', 'yyyy-MM-dd hh:mm:ss')   AND  [time]<=TIMESTAMP('0000-01-01 00:03:00', 'yyyy-MM-dd hh:mm:ss')  

查询IP地址访问数量

SELECT c-ip,count(1) FROM '[LOGFILEPATH]'  group by c-ip having count(1)>100 order by count(1)      desc

原文链接:https://www.cnblogs.com/woxpp/p/5620153.html

posted @ 2020-12-04 11:45  努力奋斗小青年  阅读(142)  评论(0编辑  收藏  举报