1,更改awstats.pl 中的LIMITFLUSH值 改为50000 默认为5000
一般是以内存换速度,减少flush data on disk 的次数!
2,更改awstats.yourdomain.conf, 去除不需要分析的日志 减少磁盘占用空间及加速分析速度
LevelForBrowsersDetection=2 # 0 disables Browsers detection.
# 2 reduces AWStats speed by 2%
# allphones reduces AWStats speed by 5%
LevelForOSDetection=2 # 0 disables OS detection.
# 2 reduces AWStats speed by 3%
LevelForRefererAnalyze=2 # 0 disables Origin detection.
# 2 reduces AWStats speed by 14%
LevelForRobotsDetection=2 # 0 disables Robots detection.
# 2 reduces AWStats speed by 2.5%
LevelForSearchEnginesDetection=2 # 0 disables Search engines detection.
# 2 reduces AWStats speed by 9%
LevelForKeywordsDetection=2 # 0 disables Keyphrases/Keywords detection.
# 2 reduces AWStats speed by 1%
LevelForFileTypesDetection=2 # 0 disables File types detection.
# 2 reduces AWStats speed by 1%
LevelForWormsDetection=0 # 0 disables Worms detection.
# 2 reduces AWStats speed by 15%
3,增加 500 403 等http error code 页面显示,具体url浏览
更改awstats.yourdomain.conf,添加以下字段
ExtraSectionName1="Internal Server Errors (500)"
ExtraSectionCodeFilter1="500"
ExtraSectionCondition1="URL,^.*$"
ExtraSectionFirstColumnTitle1="URL"
ExtraSectionFirstColumnValues1="URL,^(.*)$"
ExtraSectionFirstColumnFormat1="<A HREF='http://*%s'TARGET='_blank'>%s"
ExtraSectionStatTypes1=HBL
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=10
MinHitExtra1=1
ExtraSectionName2="Forbidden (403)"
ExtraSectionCodeFilter2="403"
ExtraSectionCondition2="URL,^.*$"
ExtraSectionFirstColumnTitle2="URL"
ExtraSectionFirstColumnValues2="URL,^(.*)$"
ExtraSectionFirstColumnFormat2="<A HREF='http://*%s'TARGET='_blank'>%s"
ExtraSectionStatTypes1=HBL
ExtraSectionAddSumRow2=1
MaxNbOfExtra2=10
MinHitExtra2=1
数据是要每次分析完日志才生效 ( Change : Effective for new updates only)
起先是修改 awstats.pl及awstats_buildstaticpages.pl 代码 没调试成功!
4,日志分析格式注意
iis 日志一般是LogFormat=2
apache日志 LogFormat = 1
如自定义日志格式的 拿来分析必须 指定 %method 或%methodurl
如 LogFormat = "%time2 %method %url %query %host %ua %referer %code"
5,导出独立静态页面
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=yourdomain.com -output=errors404 -staticlinks > awstats.yourdomain.com .html
方便浏览 及自定义
具体可以awstats.pl --help