当前位置:文档之家› 分析IIS日志的最有效方法

分析IIS日志的最有效方法

分析IIS日志的最有效方法IIS日志分析方法和技巧:一、IIS日志的介绍IIS日志:即服务器日志,记录服务器上的一些访行为和状态.二、IIS日志的作用(1)是否有死链接、错误链接 (404状态码,可用robots进行死链接链接)(2)查看服务器是否正常(500,501,502状态码)(3)了解蜘蛛访问网站的频率(查看时间)(4)了解用户访问形为(即用户访问了哪些页面)(5)了解网站的安全信息例如:13:46:07 127.0.0.1 GET /scripts/..\../winnt/system32/cmd".exe 401 13:46:07 127.0.0.1 GET /scripts/..\../winnt/system32/cmd".exe 200 13:47:37 127.0.0.1 GET /scripts/..\../winnt/system32/cmd".exe 401如果出现上述这些命令,则表示有人在扫描你的网站(6)分析用户喜欢访问哪些栏目三、怎么下载IIS日志(1)如果是空间,可以在空间后台下载或找空间商(2独立服务器或VPS,进入服务器或VPS进行设置即可四、分析IIS日志例如:例如:#Software: Microsoft Internet Information Services 6.0#Version: 1.0#Date: 2012-04-19 16:03:02#Fields: date time cs-method cs-uri-stem cs-uri-query cs-username c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-bytes time-taken 2012-04-19 16:03:01 GET /robots.txt - - 123.125.71.81 HTTP/1.1Mozilla/5.0+(compatible;+Baiduspider/2.0;++/searc h/spider.html) - 200 574 152012-04-19 16:08:18 GET /index.php - - 222.77.187.33 HTTP/1.1Mozilla/5.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+Trident/5.0) - 200 30212 8592012-04-19 16:14:19 GET /favicon.ico - - 221.11.16.172 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+Trident/4.0;+.NET+ CLR+2.0.50727;+360space) - 200 3364 1562012-04-19 16:16:30 GET /index.php p=246 - 203.208.60.235 HTTP/1.1 Mozilla/5.0+(compatible;+Googlebot/2.1;++/bot.ht ml) - 200 14802 25462012-04-19 16:17:31 GET /index.php p=401 - 211.154.149.132 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0 ;+SLCC2;) - 200 18817 9372012-04-19 16:24:35 GET /index.php paged=3 - 180.153.227.29 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1)/s?wd= blog&pn=70&rsv_page=1 200 22752 10002012-04-19 16:29:46 GET /index.php feed=rss2 - 209.85.238.197 HTTP/1.1 Feedfetcher-Google;+(+/feedfetcher.html;+1+subsc ribers;+feed-id=13463723763221171900) - 304 326 11092012-04-19 16:31:01 GET /index.php - - 115.238.252.231 HTTP/1.0 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1. 4322;+.NET+CLR+2.0.50727) - 200 30212 11252012-04-19 16:31:04 GET /index.php - - 115.238.252.231 HTTP/1.0 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1. 4322;+.NET+CLR+2.0.50727) - 200 30212 9062012-04-19 16:31:04 GET /index.php - - 115.238.252.231 HTTP/1.0 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1. 4322;+.NET+CLR+2.0.50727) - 200 30212 10002012-04-19 16:31:07 GET /index.php - - 115.238.252.231 HTTP/1.0 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1. 4322;+.NET+CLR+2.0.50727) - 200 30212 10622012-04-19 16:33:28 GET /index.php - - 218.5.46.237 HTTP/1.1Jakarta+Commons-HttpClient/3.1 - 200 16307 1197342012-04-19 16:42:46 GET /favicon.ico - - 113.206.195.98 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+Trident/4.0;+.NET+ CLR+2.0.50727;+360space) - 200 3364 2032012-04-19 16:42:47 GET /favicon.ico - - 113.206.195.98 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+Trident/4.0;+.NET+ CLR+2.0.50727;+360space) - 200 3364 1712012-04-19 16:50:24 GET /index.php - - 101.226.66.21 HTTP/1.1 Mozilla/4.0 - 200 30212 8432012-04-19 16:50:43 GET/wp-content/plugins/dynamic-to-top/js/dynamic.to.top.js ver=3.1.6 - 101.226.66.21 HTTP/1.1 Mozilla/4.0 - 200 439 462012-04-19 16:50:43 GET /wp-includes/js/l10n.js ver=20101110 -101.226.66.21 HTTP/1.1 Mozilla/4.0 - 200 592 1092012-04-19 16:50:43 GET/wp-content/plugins/dynamic-to-top/js/libs/jquery.easing.js ver=1.3 - 101.226.66.21 HTTP/1.1 Mozilla/4.0 - 200 5573 1712012-04-19 16:50:43 GET /wp-includes/js/jquery/jquery.js ver=1.6.1 - 101.226.66.21 HTTP/1.1 Mozilla/4.0 - 200 91314 6402012-04-19 16:52:23 GET /robots.txt - - 208.115.113.89 HTTP/1.1 Mozilla/5.0+(compatible;+Ezooms/1.0;+ezooms.bot@) - 200 555 296分析如下:#Software: Microsoft Internet Information Services 6.0#Version: 1.0 这是版本号#Fields: date time cs-method cs-uri-stem cs-uri-query cs-username c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-bytes time-taken 这是文本定义,具体可对照下面二张图片例如:2012-04-19 16:03:01 GET /robots.txt - - 123.125.71.81 HTTP/1.1 Mozilla/5.0+(compatible;+Baiduspider/2.0;++/searc h/spider.html) - 200 574 15其中四个最主要参数(1)访问路径 /robots.txt(2)访问者IP 123.125.71.81(3)Baiduspider 百度蜘蛛(4) 返回的状态码 200 574 15(其中200为正常访问,574表示抓取的字节数,15表秒花费了的毫秒)注:怎么判断是不是百度假蜘蛛点击“开始”-“运行”-“cmd”-“nslookup IP地址”-“回车”代码具体如下:2xx (成功)表示成功处理了请求的状态代码。

代码说明200 (成功)服务器已成功处理了请求。

通常,这表示服务器提供了请求的网页。

201 (已创建)请求成功并且服务器创建了新的资源。

202 (已接受)服务器已接受请求,但尚未处理。

相关主题