{"id":16,"date":"2005-04-13T15:34:27","date_gmt":"2005-04-13T07:34:27","guid":{"rendered":"http:\/\/www.banbanli.net\/wordpress\/?p=16"},"modified":"2005-04-15T08:50:48","modified_gmt":"2005-04-15T00:50:48","slug":"awstat","status":"publish","type":"post","link":"http:\/\/www.banbanli.net\/blog\/?p=16","title":{"rendered":"Awstat"},"content":{"rendered":"<p><a href=\"http:\/\/phorum.study-area.org\/viewtopic.php?t=24569\">http:\/\/phorum.study-area.org\/viewtopic.php?t=24569<\/a><\/p>\n<p>\u3010\u524d\u8a00\u3011<br \/>\nAWStats\u662f\u4e00\u5957\u514d\u8cbb\u53ca\u529f\u80fd\u5f37\u5927\u7684Log\u5206\u6790\u8edf\u9ad4\uff0c\u5b83\u53ef\u4ee5\u900f\u904eCGI\u53caCommand line\u7684\u65b9\u5f0f\u4f86\u7522\u751f\u5831\u8868\u3002<\/p>\n<p>\u5b83\u652f\u63f4\u4e86\u4ee5\u4e0b\u7684Log\u683c\u5f0f<\/p>\n<p>      (1)Apache-combined log(XLF\/ELF)<br \/>\n      (2)Apache or Squid-common log(CLF)<br \/>\n      (3)IIS 5.0\/6.0-W3C log<br \/>\n      (4)\u5927\u90e8\u4efd\u7684Web\/Wap\/Proxy\/Streaming Servers(Apache 1.3.x and 2.x, IIS 5.0 and 6.0, WebStar, WebLogic, WebSite, Windows Media Server, Tomcat, Squid, Sambar,Roxen, Resin, RealMedia server, Oracle9iAS, Lotus Notes\/Domino, Darwin, IPlanet, IceCast, ZeroBrand, Zeus, Zope,<br \/>\n      Abyss..)<br \/>\n      (5)FTP Server(ProFTP&#8230;)<br \/>\n      (6)Mail Server(Postfix\/Sendmail\/QMail\/Mdaemon\/www4mail&#8230;)<\/p>\n<p>\u652f\u63f4\u5e73\u53f0<\/p>\n<p>      (1)Windows 2000\/NT4\/Me\u3001Linux\u3001Macintosh\u3001Solaris\u3001Aix\u3001BeOS\u3001FreeBSD<br \/>\n      (2)ActivePerl 5.6\/5.8\u3001Perl 5.6\/5.8<\/p>\n<p><!--more-->=========================================<br \/>\n\u4f5c\u8005\uff1a zoob (vincent@myunix.idv.tw)<\/p>\n<p>\u7248\u6b0a\u8072\u660e\uff1a\u53ef\u4ee5\u4efb\u610f\u8f49\u8f09\uff0c\u8f49\u8f09\u6642\u8acb\u52d9\u5fc5\u6a19\u660e\u539f\u59cb\u51fa\u8655\u548c\u4f5c\u8005\u8cc7\u8a0a<\/p>\n<p>\u3010\u5b89\u88ddAWStats\u3011<\/p>\n<p>(1)\u8acb\u5148\u5f9e\u5b98\u65b9\u7db2\u5740 ( http:\/\/awstats.sourceforge.net\/ ) \u4e0b\u8f09AWStats ( http:\/\/prdownloads.sourceforge.net\/awstats\/awstats-6.1.tgz )<\/p>\n<p>(2)\u89e3\u58d3\u7e2e awstats-6.1.tgz<\/p>\n<p>(3)\u5c07\u89e3\u58d3\u7e2e\u51fa\u4f86\u7684 tools \u53ca wwwroot \u76ee\u9304\u8907\u88fd\u5230 \/usr\/local\/awstats \u76ee\u9304\u4e0b<\/p>\n<p>(4)\u5207\u63db\u76ee\u9304\u81f3 \/usr\/local\/awstats \u76ee\u9304<\/p>\n<p>(5)\u57f7\u884c tools \u76ee\u9304\u4e0b\u7684 configure.pl<\/p>\n<p>\u4ee3\u78bc:<br \/>\ntools\/configure.pl<\/p>\n<p>(6)\u8a2d\u5b9aconfig\u6a94<br \/>\n&#8212;&#8211; AWStats configure 1.0 (build 1.32) (c) Laurent Destailleur &#8212;&#8211;<br \/>\nThis tool will help you to configure AWStats to analyze statistics for<br \/>\none web server. You can try to use it to let it do all that is possible<br \/>\nin AWStats setup, however following the step by step manual setup<br \/>\ndocumentation (docs\/index.html) is often a better idea. Above all if:<br \/>\n&#8211; You are not an administrator user,<br \/>\n&#8211; You want to analyze downloaded log files without web server,<br \/>\n&#8211; You want to analyze mail or ftp log files instead of web log files,<br \/>\n&#8211; You need to analyze load balanced servers log files,<br \/>\n&#8211; You want to &#8216;understand&#8217; all possible ways to use AWStats&#8230;<br \/>\nRead the AWStats documentation (docs\/index.html).<\/p>\n<p>&#8212;&#8211;> Running OS detected: Linux, BSD or Unix<\/p>\n<p>&#8212;&#8211;> Check for web server install<\/p>\n<p>Enter full config file path of your Web server.<br \/>\nExample: \/etc\/httpd\/httpd.conf<br \/>\nExample: \/usr\/local\/apache2\/conf\/httpd.conf<br \/>\nExample: c:\\Program files\\apache group\\apache\\conf\\httpd.conf<br \/>\nConfig file path (&#8216;none&#8217; to skip web server setup):<br \/>\n> \/etc\/httpd\/conf\/httpd.conf < -----\u8f38\u5165httpd.conf\u7684\u7d55\u5c0d\u8def\u5f91\n\n-----> Check and complete web server config file &#8216;\/etc\/httpd\/conf\/httpd.conf&#8217;<br \/>\nAWStats directives already present.<\/p>\n<p>&#8212;&#8211;> Update model config file &#8216;\/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.model.conf&#8217;<br \/>\nFile awstats.model.conf updated.<\/p>\n<p>&#8212;&#8211;> Need to create a new config file ?<br \/>\nDo you want me to build a new AWStats config\/profile<br \/>\nfile (required if first install) [y\/N] ?y<\/p>\n<p>&#8212;&#8211;> Define config file name to create<br \/>\nWhat is the name of your web site or profile analysis ?<br \/>\nExample: www.mysite.com<br \/>\nExample: demo<br \/>\nYour web site, virtual server or profile name:<br \/>\n> www.myunix.idv.tw < -------- \u8f38\u5165\u4f60\u6240\u8981\u5efa\u7acb\u7684WebSite name\n\n-----> Add update process inside a scheduler<br \/>\nSorry, configure.pl does not support automatic add to cron yet.<br \/>\nYou can do it manually by adding the following command to your cron:<br \/>\n\/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -update -config=wwww.myunix.idv.tw<br \/>\nOr if you have several config files and prefer having only one command:<br \/>\n\/usr\/local\/awstats\/tools\/awstats_updateall.pl now<br \/>\nPress ENTER to continue&#8230;<\/p>\n<p>A SIMPLE config file has been created: \/etc\/awstats\/awstats.wwww.myunix.idv.tw.conf<br \/>\nYou should have a look inside to check and change manually main parameters.<br \/>\nYou can then manually update your statistics for &#8216;wwww.myunix.idv.tw&#8217; with command:<br \/>\n> perl awstats.pl -update -config=wwww.myunix.idv.tw<br \/>\nYou can also read your statistics for &#8216;wwww.myunix.idv.tw&#8217; with URL:<br \/>\n> http:\/\/localhost\/awstats\/awstats.pl?config=wwww.myunix.idv.tw<\/p>\n<p>Press ENTER to finish&#8230;<\/p>\n<p>(7)\u4ee5\u4e0a\u6b65\u9a5f\u5b8c\u6210\u5f8c\uff0c\u6703\u5728\/etc\/awstats\u76ee\u9304\u4e0b\u5efa\u7acb\u4e00\u6a94\u6848- awstats.www.myunix.idv.tw.conf<\/p>\n<p>(8)\u5efa\u7acb \/var\/lib\/awstats \u76ee\u9304\uff0c\u4e26\u7d66\u4e88 777 \u4e4b\u6b0a\u9650<br \/>\n\u8a3b\uff1a\u82e5\u4e0d\u7d66\u4e88777\u6b0a\u9650\uff0c\u5c07\u4f86\u82e5\u8a2d\u5b9a AllowToUpdateStatsFromBrowser=1 \u6642\uff0c\u6703\u7121\u6cd5\u900f\u904eBrowser\u4f86\u5373\u6642\u66f4\u65b0Report<\/p>\n<p>(9)\u8a2d\u5b9a httpd.conf\uff0c\u6aa2\u67e5\u5728httpd.conf\u4e2d\u662f\u5426\u6709\u4ee5\u4e0b\u8a2d\u5b9a\uff0c\u5982\u679c\u6c92\u6709\u7684\u8a71\uff0c\u8acb\u81ea\u884c\u52a0\u5165\uff0c\u4e26\u4e14\u91cd\u65b0\u555f\u52d5httpd\u670d\u52d9<\/p>\n<p>\u4ee3\u78bc:<br \/>\n#<br \/>\n# Directives to add to your Apache conf file to allow use of AWStats as a CGI.<br \/>\n# Note that path &#8220;\/usr\/local\/awstats\/&#8221; must reflect your AWStats install path.<br \/>\n#<br \/>\nAlias \/awstatsclasses &#8220;\/usr\/local\/awstats\/wwwroot\/classes\/&#8221;<br \/>\nAlias \/awstatscss &#8220;\/usr\/local\/awstats\/wwwroot\/css\/&#8221;<br \/>\nAlias \/awstatsicons &#8220;\/usr\/local\/awstats\/wwwroot\/icon\/&#8221;<br \/>\nScriptAlias \/awstats\/ &#8220;\/usr\/local\/awstats\/wwwroot\/cgi-bin\/&#8221;<br \/>\n#<br \/>\n# This is to permit URL access to scripts\/files in AWStats directory.<br \/>\n#<br \/>\n<directory \"\/usr\/local\/awstats\/wwwroot\"><br \/>\nOptions None<br \/>\nAllowOverride None<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\n<\/directory><\/p>\n<p>\u3010\u5206\u6790 Apache Log\u3011<br \/>\n\u9069\u7528\u65bc\uff1aApache 1.3.x\u3001Apache 2.0.x<\/p>\n<p>(1)\u8a2d\u5b9ahttpd\u7684log format\u70bacombined\uff0c\u8acb\u7de8\u8f2f httpd.conf\uff0c\u5c07CustomLog\u8a2d\u5b9a\u70bacombined<\/p>\n<p>\u4ee3\u78bc:<br \/>\nCustomLog logs\/access_log combined<\/p>\n<p>\u8a3b\uff1a\u5982\u679c\u4f60\u6709\u591a\u500bVirtual Domain\u7684\u8a71\uff0c\u5efa\u8b70\u5206\u6210\u4e0d\u540c\u7684access log\uff0c\u4ee5\u5229\u5206\u6790<\/p>\n<p>Log\u683c\u5f0f\u7bc4\u4f8b\u5982\u4e0b\uff1a<\/p>\n<p>      172.16.46.96 &#8211; &#8211; [07\/Feb\/2004:17:19:30 +0800] &#8220;GET \/forum\/templates\/subSilver\/images\/spacer.gif HTTP\/1.1&#8221; 304 0 &#8220;http:\/\/it.myunix.idv.tw\/forum\/viewtopic.php?t=274&#8221; &#8220;Mozilla\/4.0 (compatible; MSIE 6.0; Windows NT 5.0)&#8221;<\/p>\n<p>(2)\u8a2d\u5b9aawstats.www.myunix.idv.tw.conf<\/p>\n<p>\u4ee3\u78bc:<br \/>\nLogFile=&#8221;\/var\/log\/httpd\/access_log&#8221;  <----\u8acb\u6307\u5b9a\u4f60apache log file\u7684\u7d55\u5c0d\u8def\u5f91\u53calog\u540d\u7a31\nLogType=W <---- W\u4ee3\u8868\u5206\u6790\u985e\u578b\u70baweb log files\nLogFormat=1 <---- 1\u4ee3\u8868Apache or Lotus Notes\/Domino native combined log format\nSiteDomain=\"www.myunix.idv.tw\" <----\u6307\u5b9a\u5b9a\u5f9elog\u6a94\u4e2d\u904e\u6ffe\u7b26\u5408SiteDomain\u7684\u8a18\u9304(\u4e0d\u540c\u7684Virtual Domain\u5c31\u9808\u6307\u5b9a\u70ba\u4e0d\u540c\u7684SiteDomain)\nHostAliases=\"myunix.idv.tw www.myunix.idv.tw\" <-----\u6307\u5b9a\u54ea\u4e9bDomain\u70baLocal\uff0c\u5176\u9918\u7686\u8996\u70baExternal\n\n\n\u8a2d\u5b9a\u5b8c\u7562\uff0c\u8acb\u5b58\u6a94\n\n(3)\u57f7\u884cawstats.pl\uff0c\u8a18\u5f97\u6307\u5b9a\u8a2d\u5b9a\u6a94\u6642\uff0c\u4e0d\u8981\u8f38\u5165\u8a2d\u5b9a\u6a94\u540d\u524d\u9762\u7684 awstats. \u53ca .conf\n\n\u4ee3\u78bc:\n[root@xxx awstats]# \/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=www.myunix.idv.tw -update\n\n\n\u5982\u679c\u51fa\u73fe\u4ee5\u4e0b\u8a0a\u606f\uff0c\u5c31\u4ee3\u8868\u57f7\u884c\u6210\u529f\n\n      Update for config \"\/etc\/awstats\/awstats.www.myunix.idv.tw.conf\"\n      With data in log file \"\/var\/log\/httpd\/access_log.1\"...\n      Phase 1 : First bypass old records, searching new record...\n      Direct access after last parsed record (after line 4311)\n      Jumped lines in file: 4311\n      Found 4311 already parsed records.\n      Parsed lines in file: 0\n      Found 0 dropped records,\n      Found 0 corrupted records,\n      Found 0 old records,\n      Found 0 new qualified records.\n\n\n\n(4)\u958b\u555fBrowser\uff0c\u8f38\u5165 http:\/\/www.xxx.xxx\/awstats\/awstats.pl?config=www.myunix.idv.tw \uff0c\u4fbf\u53ef\u6aa2\u8996\u4f60\u525b\u525b\u6240\u7522\u751f\u7684\u5831\u8868\u4e86\u3002\n\nDemo Site\n\n(5)\u8a18\u5f97\u5c07\u6b65\u9a5f(3)\u7684\u6307\u4ee4\u8a2d\u5b9a\u5728crontab\uff0c\u8b93\u5b83\u5b9a\u671f\u7522\u751fLog Report\n\n\u3010\u5206\u6790 IIS Log\u3011\n\u9069\u7528\u65bc\uff1aIIS 6.0\n\n(1)\u958b\u555fIIS\u7ba1\u7406\u54e1\uff0c\u8a2d\u5b9aWWW\u4f3a\u670d\u5668Log\u64f4\u5145\u5167\u5bb9\u5982\u4e0b\uff1a(\u82e5\u6c92\u5217\u5728\u4e0b\u9762\u7684\u9805\u76ee\uff0c\u8acb\u53d6\u6d88\u52fe\u9078)\uff0c\u8a2d\u5b9a\u5b8c\u7562\uff0c\u8acb\u91cd\u65b0\u555f\u52d5IIS Web Service\n\n      \u65e5\u671f(date)\n      \u6642\u9593(time)\n      \u7528\u6236\u7aefIP\u4f4d\u5740(c-ip)\n      \u4f7f\u7528\u8005\u540d\u7a31(cs-username)\n      \u65b9\u6cd5(cs-method)\n      URI\u4e3b\u9ad4(cs-uri-stem)\n      URI\u67e5\u8a62(cs-uti-query)\n      \u901a\u8a0a\u5354\u5b9a\u72c0\u614b(sc-status)\n      \u50b3\u9001\u7684\u4f4d\u5143\u7d44(sc-bytes)\n      \u901a\u8a0a\u5354\u5b9a\u7248\u672c(cs-version)\n      \u4f7f\u7528\u8005\u4ee3\u7406(cs(User-Agent))\n      \u63a8\u85a6\u8005(cs(Referer))\n\n\n\n\u8a3b\uff1aIIS WWW Log\u9810\u8a2d\u6703\u5b58\u653e\u5728 C:\\WINDOWS\\system32\\LogFiles\\W3SVC1 \u76ee\u9304\u4e0b\n\nLog\u683c\u5f0f\u7bc4\u4f8b\u5982\u4e0b\uff1a\n\n      2004-02-07 09:23:08 POLL \/exchange\/A12345\/\u6536\u4ef6\u5323 - MYUNIX\/A12345 192.168.1.1 HTTP\/1.1 Mozilla\/4.0+(compatible;+MSIE+6.0;+Windows+98) https:\/\/exchange.myunix.idv.tw\/exchange\/A12345\/?Cmd=navbar 207 585\n\n\n\n\n(2)\u8a2d\u5b9aawstats.iis.myunix.idv.tw.conf\n\n\u4ee3\u78bc:\nLogFile=\"\/var\/log\/iis.log\"  <----\u8acb\u6307\u5b9a\u4f60IIS log file\u7684\u7d55\u5c0d\u8def\u5f91\u53calog\u540d\u7a31\nLogType=W <---- W\u4ee3\u8868\u5206\u6790\u985e\u578b\u70baweb log files\nLogFormat=\"date time cs-method cs-uri-stem cs-uri-query cs-username c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-by\ntes\"\nSiteDomain=\"iis.myunix.idv.tw\" <----\u6307\u5b9a\u5b9a\u5f9elog\u6a94\u4e2d\u904e\u6ffe\u7b26\u5408SiteDomain\u7684\u8a18\u9304(\u4e0d\u540c\u7684Virtual Domain\u5c31\u9808\u6307\u5b9a\u70ba\u4e0d\u540c\u7684SiteDomain)\nHostAliases=\"myunix.idv.tw\" <-----\u6307\u5b9a\u54ea\u4e9bDomain\u70baLocal\uff0c\u5176\u9918\u7686\u8996\u70baExternal\nLevelForBrowsersDetection=0\nLevelForOSDetection=0\nLevelForRefererAnalyze=0\nLevelForRobotsDetection=0\nLevelForSearchEnginesDetection=0\nLevelForKeywordsDetection=0\nLevelForFileTypesDetection=2\nLevelForWormsDetection=2\nShowDomainsStats=0\nShowRobotsStats=0\nShowWormsStats=HBL\nShowFileSizesStats=0\nShowOSStats=0\nShowBrowsersStats=0\nShowOriginStats=0\nShowKeyphrasesStats=0\nShowKeywordsStats=0\nShowMiscStats=0\n\n\n\u8a2d\u5b9a\u5b8c\u7562\uff0c\u8acb\u5b58\u6a94\n\n(3)\u57f7\u884cawstats.pl\uff0c\u8a18\u5f97\u6307\u5b9a\u8a2d\u5b9a\u6a94\u6642\uff0c\u4e0d\u8981\u8f38\u5165\u8a2d\u5b9a\u6a94\u540d\u524d\u9762\u7684 awstats. \u53ca .conf\n\n\u4ee3\u78bc:\n[root@xxx awstats]# \/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=iis.myunix.idv.tw -update\n\n\n\u5982\u679c\u51fa\u73fe\u4ee5\u4e0b\u8a0a\u606f\uff0c\u5c31\u4ee3\u8868\u57f7\u884c\u6210\u529f\n\n      Update for config \"\/etc\/awstats\/awstats.iis.myunix.idv.tw.conf\"\n      With data in log file \"\/var\/log\/iis.log\"...\n      Phase 1 : First bypass old records, searching new record...\n      Direct access after last parsed record (after line 4311)\n      Jumped lines in file: 4311\n      Found 4311 already parsed records.\n      Parsed lines in file: 0\n      Found 0 dropped records,\n      Found 0 corrupted records,\n      Found 0 old records,\n      Found 0 new qualified records.\n\n\n\n(4)\u958b\u555fBrowser\uff0c\u8f38\u5165 http:\/\/www.xxx.xxx\/awstats\/awstats.pl?config=iis.myunix.idv.tw \uff0c\u4fbf\u53ef\u6aa2\u8996\u4f60\u525b\u525b\u6240\u7522\u751f\u7684\u5831\u8868\u4e86\u3002\n\n(5)\u8a18\u5f97\u5c07\u6b65\u9a5f(3)\u7684\u6307\u4ee4\u8a2d\u5b9a\u5728crontab\uff0c\u8b93\u5b83\u5b9a\u671f\u7522\u751fLog Report\n\n\u3010\u5206\u6790 Mail Log-Postfix\/Sendmail\/Qmail\/MDaemon\u3011\n\u9069\u7528\u65bc\uff1aPostfix\/Sendmail\/Qmail\/MDaemon\n\n(1)\u8a2d\u5b9aawstats.mail.myunix.idv.tw.conf\n\n\u4ee3\u78bc:\nLogFile=\"perl \/usr\/local\/awstats\/tools\/maillogconvert.pl standard < \/var\/log\/maillog |\"  <----\u8acb\u6307\u5b9a\u4f60mail log file\u7684\u7d55\u5c0d\u8def\u5f91\u53calog\u540d\u7a31\nLogType=M <---- M\u4ee3\u8868\u5206\u6790\u985e\u578b\u70bamail log files\nLogFormat=\"%time2 %email %email_r %host %host_r %method %url %code %bytesd\"\nSiteDomain=\"mail.myunix.idv.tw\" <----\u6307\u5b9a\u5b9a\u5f9elog\u6a94\u4e2d\u904e\u6ffe\u7b26\u5408SiteDomain\u7684\u8a18\u9304\nHostAliases=\"myunix.idv.tw mail.myunix.idv.tw localhost 127.0.0.1\" <-----\u6307\u5b9a\u54ea\u4e9bDomain\u6216ip address\u70baLocal\uff0c\u5176\u9918\u7686\u8996\u70baExternal\nLevelForBrowsersDetection=0\nLevelForOSDetection=0\nLevelForRefererAnalyze=0\nLevelForRobotsDetection=0\nLevelForWormsDetection=0\nLevelForSearchEnginesDetection=0\nLevelForFileTypesDetection=0\nShowMenu=1\nShowMonthStats=HB\nShowDaysOfMonthStats=HB\nShowDaysOfWeekStats=HB\nShowHoursStats=HB\nShowDomainsStats=0\nShowHostsStats=HBL\nShowAuthenticatedUsers=0\nShowRobotsStats=0\nShowEMailSenders=HBML\nShowEMailReceivers=HBML\nShowSessionsStats=0\nShowPagesStats=0\nShowFileTypesStats=0\nShowFileSizesStats=0\nShowBrowsersStats=0\nShowOSStats=0\nShowOriginStats=0\nShowKeyphrasesStats=0\nShowKeywordsStats=0\nShowMiscStats=0\nShowHTTPErrorsStats=0\nShowSMTPErrorsStats=1\n\n\n\u8a2d\u5b9a\u5b8c\u7562\uff0c\u8acb\u5b58\u6a94\n\n(2)\u57f7\u884cawstats.pl\uff0c\u8a18\u5f97\u6307\u5b9a\u8a2d\u5b9a\u6a94\u6642\uff0c\u4e0d\u8981\u8f38\u5165\u8a2d\u5b9a\u6a94\u540d\u524d\u9762\u7684 awstats. \u53ca .conf\n\n\u4ee3\u78bc:\n[root@xxx awstats]# \/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=mail.myunix.idv.tw -update\n\n\n\u5982\u679c\u51fa\u73fe\u4ee5\u4e0b\u8a0a\u606f\uff0c\u5c31\u4ee3\u8868\u57f7\u884c\u6210\u529f\n\n      Update for config \"\/etc\/awstats\/awstats.mail.myunix.idv.tw.conf\"\n      With data in log file \"perl \/usr\/local\/awstats\/tools\/maillogconvert.pl standard < \/var\/log\/maillog |\"...\n      Phase 1 : First bypass old records, searching new record...\n      Searching new records from beginning of log file...\n      Jumped lines in file: 0\n      Parsed lines in file: 358\n      Found 0 dropped records,\n      Found 0 corrupted records,\n      Found 358 old records,\n      Found 0 new qualified records.\n\n\n\n(3)\u958b\u555fBrowser\uff0c\u8f38\u5165 http:\/\/www.xxx.xxx\/awstats\/awstats.pl?config=mail.myunix.idv.tw \uff0c\u4fbf\u53ef\u6aa2\u8996\u4f60\u525b\u525b\u6240\u7522\u751f\u7684\u5831\u8868\u4e86\u3002\n\nDemo Site\n\n(4)\u8a18\u5f97\u5c07\u6b65\u9a5f(2)\u7684\u6307\u4ee4\u8a2d\u5b9a\u5728crontab\uff0c\u8b93\u5b83\u5b9a\u671f\u7522\u751fLog Report\n\n\u3010\u5206\u6790 Mail Log-Exchange Server\u3011\n\u9069\u7528\u65bc\uff1aExchange 2000\/2003 Server\n\n(1)\u82e5\u6c92\u6709\u958b\u555fExchange Server Tracking Log\uff0c\u8acb\u4f9d\u4ee5\u4e0b\u7db2\u5740\u958b\u555fExchange Tracking Log\nhttp:\/\/support.microsoft.com\/default.aspx?scid=kb;en-us;246856\n\n\u8a3b\uff1aTracking Log\u9810\u8a2d\u6703\u5b58\u653e\u5728 C:\\Program Files\\Exchsrvr\\[Server Name].log \u76ee\u9304\u4e0b\n\nLog\u683c\u5f0f\u7bc4\u4f8b\u5982\u4e0b\uff1a\n\n      2004-2-4 23:59:52 GMT 172.17.13.104 mail.myunix.idv.tw exchange.tw.idv.tw Exchange 172.17.13.1 usera@myunix.idv.tw 1031 00dc01c46222$c3442650$2c1313ac@sh44 3 0 230711 1 2004-7-4 23:59:52 GMT0Version: 6.0.3790.0 - =?big5?B?111=?= userb@myunix.idv.tw -\n\n\n\n\n(2)\u8a2d\u5b9aawstats.exchange.myunix.idv.tw.conf\n\n\u4ee3\u78bc:\nLogFile=\"perl \/usr\/local\/awstats\/tools\/maillogconvert.pl standard < \/var\/log\/exchange.maillog |\"  <----\u8acb\u6307\u5b9a\u4f60mail log file\u7684\u7d55\u5c0d\u8def\u5f91\u53calog\u540d\u7a31\nLogType=M <---- M\u4ee3\u8868\u5206\u6790\u985e\u578b\u70bamail log files\nLogFormat=\"%time2 %email %email_r %host %host_r %method %url %code %bytesd\"\nSiteDomain=\"exchange.myunix.idv.tw\" <----\u6307\u5b9a\u5b9a\u5f9elog\u6a94\u4e2d\u904e\u6ffe\u7b26\u5408SiteDomain\u7684\u8a18\u9304\nHostAliases=\"myunix.idv.tw exchange.tw.myunix.idv exchange.myunix.idv.tw localhost 127.0.0.1\" <-----\u6307\u5b9a\u54ea\u4e9bDomain\u6216ip address\u70baLocal\uff0c\u5176\u9918\u7686\u8996\u70baExternal\nLevelForBrowsersDetection=0\nLevelForOSDetection=0\nLevelForRefererAnalyze=0\nLevelForRobotsDetection=0\nLevelForWormsDetection=0\nLevelForSearchEnginesDetection=0\nLevelForFileTypesDetection=0\nShowMenu=1\nShowMonthStats=HB\nShowDaysOfMonthStats=HB\nShowDaysOfWeekStats=HB\nShowHoursStats=HB\nShowDomainsStats=0\nShowHostsStats=HBL\nShowAuthenticatedUsers=0\nShowRobotsStats=0\nShowEMailSenders=HBML\nShowEMailReceivers=HBML\nShowSessionsStats=0\nShowPagesStats=0\nShowFileTypesStats=0\nShowFileSizesStats=0\nShowBrowsersStats=0\nShowOSStats=0\nShowOriginStats=0\nShowKeyphrasesStats=0\nShowKeywordsStats=0\nShowMiscStats=0\nShowHTTPErrorsStats=0\nShowSMTPErrorsStats=1\n\n\n\u8a2d\u5b9a\u5b8c\u7562\uff0c\u8acb\u5b58\u6a94\n\n(3)\u57f7\u884cawstats.pl\uff0c\u8a18\u5f97\u6307\u5b9a\u8a2d\u5b9a\u6a94\u6642\uff0c\u4e0d\u8981\u8f38\u5165\u8a2d\u5b9a\u6a94\u540d\u524d\u9762\u7684 awstats. \u53ca .conf\n\n\u4ee3\u78bc:\n[root@xxx awstats]# \/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=exchange.myunix.idv.tw -update\n\n\n\u5982\u679c\u51fa\u73fe\u4ee5\u4e0b\u8a0a\u606f\uff0c\u5c31\u4ee3\u8868\u57f7\u884c\u6210\u529f\n\n      Update for config \"\/etc\/awstats\/awstats.exchange.myunix.idv.tw.conf\"\n      With data in log file \"perl \/usr\/local\/awstats\/tools\/maillogconvert.pl standard < \/var\/log\/exchange.maillog |\"...\n      Phase 1 : First bypass old records, searching new record...\n      Searching new records from beginning of log file...\n      Jumped lines in file: 0\n      Parsed lines in file: 358\n      Found 0 dropped records,\n      Found 0 corrupted records,\n      Found 358 old records,\n      Found 0 new qualified records.\n\n\n\n(4)\u958b\u555fBrowser\uff0c\u8f38\u5165 http:\/\/www.xxx.xxx\/awstats\/awstats.pl?config=exchange.myunix.idv.tw \uff0c\u4fbf\u53ef\u6aa2\u8996\u4f60\u525b\u525b\u6240\u7522\u751f\u7684\u5831\u8868\u4e86\u3002\n\n(5)\u8a18\u5f97\u5c07\u6b65\u9a5f(3)\u7684\u6307\u4ee4\u8a2d\u5b9a\u5728crontab\uff0c\u8b93\u5b83\u5b9a\u671f\u7522\u751fLog Report\n\n\u3010\u5206\u6790 Squid Log\u3011\n\u9069\u7528\u65bc\uff1aSquid 2.x\n\n(1)\u8a2d\u5b9asquid\u7684log format\u70baemulate_httpd_log\uff0c\u8acb\u7de8\u8f2f squid.conf\uff0c\u5c07emulate_httpd_log\u8a2d\u5b9a\u70baon\n\n\u4ee3\u78bc:\nemulate_httpd_log on\n\n\nLog\u683c\u5f0f\u7bc4\u4f8b\u5982\u4e0b\uff1a\n\n      172.17.132.32 - - [06\/Feb\/2004:23:59:04 +0800] \"POST http:\/\/gateway.messenger.hotmail.com\/gateway\/gateway.dll? HTTP\/1.1\" 200 432 TCP_MISS:DIRECT\n\n\n\n(2)\u8a2d\u5b9aawstats.squid.myunix.idv.tw.conf\n\n\u4ee3\u78bc:\nLogFile=\"\/var\/log\/squid\/access_log\"  <----\u8acb\u6307\u5b9a\u4f60apache log file\u7684\u7d55\u5c0d\u8def\u5f91\u53calog\u540d\u7a31\nLogType=W <---- W\u4ee3\u8868\u5206\u6790\u985e\u578b\u70baweb log files\nLogFormat=4 <---- 4\u4ee3\u8868Apache or Squid native log format\nSiteDomain=\"squid.myunix.idv.tw\" <----\u6307\u5b9a\u5b9a\u5f9elog\u6a94\u4e2d\u904e\u6ffe\u7b26\u5408SiteDomain\u7684\u8a18\u9304(\u4e0d\u540c\u7684Virtual Domain\u5c31\u9808\u6307\u5b9a\u70ba\u4e0d\u540c\u7684SiteDomain)\nHostAliases=\"myunix.idv.tw\" <-----\u6307\u5b9a\u54ea\u4e9bDomain\u70baLocal\uff0c\u5176\u9918\u7686\u8996\u70baExternal\nLevelForBrowsersDetection=0\nLevelForOSDetection=0\nLevelForRefererAnalyze=0\nLevelForRobotsDetection=0\nLevelForSearchEnginesDetection=0\nLevelForKeywordsDetection=0\nLevelForFileTypesDetection=2\nLevelForWormsDetection=2\nShowDomainsStats=0\nShowRobotsStats=0\nShowWormsStats=HBL\nShowFileSizesStats=0\nShowOSStats=0\nShowBrowsersStats=0\nShowOriginStats=0\nShowKeyphrasesStats=0\nShowKeywordsStats=0\nShowMiscStats=0\n\n\n\u8a2d\u5b9a\u5b8c\u7562\uff0c\u8acb\u5b58\u6a94\n\n(3)\u57f7\u884cawstats.pl\uff0c\u8a18\u5f97\u6307\u5b9a\u8a2d\u5b9a\u6a94\u6642\uff0c\u4e0d\u8981\u8f38\u5165\u8a2d\u5b9a\u6a94\u540d\u524d\u9762\u7684 awstats. \u53ca .conf\n\n\u4ee3\u78bc:\n[root@xxx awstats]# \/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=squid.myunix.idv.tw -update\n\n\n\u5982\u679c\u51fa\u73fe\u4ee5\u4e0b\u8a0a\u606f\uff0c\u5c31\u4ee3\u8868\u57f7\u884c\u6210\u529f\n\n      Update for config \"\/etc\/awstats\/awstats.squid.myunix.idv.tw.conf\"\n      With data in log file \"\/var\/log\/squid\/access_log\"...\n      Phase 1 : First bypass old records, searching new record...\n      Direct access after last parsed record (after line 4311)\n      Jumped lines in file: 4311\n      Found 4311 already parsed records.\n      Parsed lines in file: 0\n      Found 0 dropped records,\n      Found 0 corrupted records,\n      Found 0 old records,\n      Found 0 new qualified records.\n\n\n\n(4)\u958b\u555fBrowser\uff0c\u8f38\u5165 http:\/\/www.xxx.xxx\/awstats\/awstats.pl?config=squid.myunix.idv.tw \uff0c\u4fbf\u53ef\u6aa2\u8996\u4f60\u525b\u525b\u6240\u7522\u751f\u7684\u5831\u8868\u4e86\u3002\n\n(5)\u8a18\u5f97\u5c07\u6b65\u9a5f(3)\u7684\u6307\u4ee4\u8a2d\u5b9a\u5728crontab\uff0c\u8b93\u5b83\u5b9a\u671f\u7522\u751fLog Report\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/phorum.study-area.org\/viewtopic.php?t=24569 \u3010\u524d\u8a00\u3011 AWStats\u662f\u4e00\u5957\u514d\u8cbb\u53ca\u529f\u80fd\u5f37\u5927\u7684Log\u5206\u6790\u8edf\u9ad4\uff0c\u5b83\u53ef\u4ee5\u900f\u904eCGI\u53caCommand line\u7684\u65b9\u5f0f\u4f86\u7522\u751f\u5831\u8868\u3002 \u5b83\u652f\u63f4\u4e86\u4ee5\u4e0b\u7684Log\u683c\u5f0f (1)Apache-combined log(XLF\/ELF) (2)Apache or Squid-common log(CLF) (3)IIS 5.0\/6.0-W3C log (4)\u5927\u90e8\u4efd\u7684Web\/Wap\/Proxy\/Streaming Servers(Apache 1.3.x and 2.x, IIS 5.0 and 6.0, WebStar, WebLogic, WebSite, Windows Media Server, Tomcat, Squid, Sambar,Roxen, Resin, RealMedia server, Oracle9iAS, Lotus Notes\/Domino, Darwin, IPlanet, IceCast, ZeroBrand, Zeus, Zope, Abyss..) (5)FTP Server(ProFTP&#8230;) (6)Mail Server(Postfix\/Sendmail\/QMail\/Mdaemon\/www4mail&#8230;) \u652f\u63f4\u5e73\u53f0 (1)Windows 2000\/NT4\/Me\u3001Linux\u3001Macintosh\u3001Solaris\u3001Aix\u3001BeOS\u3001FreeBSD (2)ActivePerl 5.6\/5.8\u3001Perl 5.6\/5.8<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16"}],"version-history":[{"count":0,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}