AWstats

AWStats的自定义扩展统计:Using the Extra Sections features

0

如何利用AWStats针对网站自身应用进行特定参数的统计,今天学习了一下:AWStats Documentation – Using the Extra Sections features。文档中主要有以下几个例子:
# Example 1: Tracking Product orders
跟踪商品订单:解析出GET /cgi-bin/order.cgi?productid=49&session=A0B1C2 中的productid=字段
# Example 2: Tracking Bugzilla most frequently viewed bugs
跟踪bugzilla中最经常被访问的Bug:原理同上,这在内部开发中非常有用,类似的,也很容易给BBS系统配置出最常访问的论坛等统计。
# Example 3: Tracking Exit clicks
跟踪用户离开当前网站的点击:前提是你将所有指向其他网站的链接通过/cgi-bin/awredir.pl?url=http://externalsite/pagelinked这样的链接进行部署。
# Example 4: Tracking aborted download
跟踪中断的下载:利用的是HTTP返回的状态码206 ExtraSectionCodeFilter1=”206″
# Example 5: Tracking most requested domain aliases
跟踪最常用的域名别名:这需要在日志中部署并定义扩展字段%your_extra_field,然后在ExtraSestion中部署统计相应的扩展字段 %your_extra_field 这里的例子就是将域名的别名,在一个域名有多个别名的时候,分析那个域名最常用最有帮助。
# Example 6: List of top level 2 path under a directory /mydir
跟踪某个目录下最常访问的2级子目录,根据样例设置了一个 /tech /blog 2个目录下的TOP文章统计。

增加的配置如下
ExtraSectionName1=”Top aticles under /tech”
ExtraSectionCodeFilter1=”200 304″
ExtraSectionCondition1=”URL,^/tech/.*”
ExtraSectionFirstColumnTitle1=”Article Name”
ExtraSectionFirstColumnValues1=”URL,^/tech/([w]+).html”
ExtraSectionFirstColumnFormat1=”<a href=’/tech/%s.html’ target=’new’>%s</a>”
ExtraSectionStatTypes1=PHL
MaxNbOfExtra2=20
MinHitExtra2=1
(更多…)

给AWStats增加针对Googlebot/Baiduspider/Yahoo!Slurp/MSNBot的详细统计

2

 

虽然AWStats中提供了蜘蛛的分类统计:

搜索引擎网站的机器人 (前 10) – 全部列出 – 最近参观日期
102 个机器人* 文件数 字节 最近参观日期
Sina Iask Spider 41894 520.80 M字节 2006年 九月 09日 07:17
GouGou 34577 920.11 M字节 2006年 九月 09日 12:23
Googlebot 12171+39 212.60 M字节 2006年 九月 09日 12:23
Yahoo Slurp 5775+1275 91.10 M字节 2006年 九月 09日 12:24
GigaBot 5334+233 53.62 M字节 2006年 九月 09日 12:24
Unknown robot (identified by ‘robot’) 5421+6 71.46 M字节 2006年 九月 09日 12:17
Lilina 5278 76.67 M字节 2006年 九月 09日 12:22
MSNBot 4075+217 52.31 M字节 2006年 九月 09日 12:19
Yahoo! Slurp China 3135+460 25.83 M字节 2006年 九月 09日 12:21
Unknown robot (identified by ‘crawl’) 3431+6 78.98 M字节 2006年 九月 09日 12:23

有汇总后的数据,但是每个蜘蛛具体抓取了那些页面和抓取的频度就无法得知了,利用AWStats的扩展配置,统计也可以详细到每个蜘蛛的具体访问(参考了http://www.antezeta.com/awstats.html上的配置样例)。

注意:配置完Extra后可能会遇到以下这样的警告: (更多…)

awstats 纯perl的方式 安装geoip插件

0

There is a rumor that GeoIP is not supported by Powweb. This is
completely false. It must first be configured prior to use. Now stay
with me so I don’t lose you…

1. Install your own copy of
awstats in the cgi-bin directory. Once this is working properly, you
may move on to the next step. There is a tutorial for this on the
Powweb site under “Site Statistics” I believe.

2. Download GeoIP::PurePerl module from Maxmind.com

http://www.maxmind.com/download/geoip/api/pureperl/

1.17
is the latest version as of Sept 1, 2005. This is a tar.gz file so make
sure you have WinRAR or another compatible decompressor.

3. Once
decompressed, create a directory in your cgi-bin called GeoIP (You can
name it anything you like, but for this tutorial it shall be GeoIP).
Move the contents from the decompressed folder to “/cgi-bin/GeoIP/”.
The decompressed folder should be called “Geo-IP-PurePerl-1.xx”. Now
before we configure we need to get the latest database.

(更多…)

安装 MaxMind GeoIP、GeoIP City Lite 为 awstats 配置 IP 位置国家城市统计信息

1

安装 MaxMind GeoIP、GeoIP City Lite 为 awstats 配置 IP 位置国家城市统计信息

http://www.maxmind.com/download/geoip/api/c/
http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.4.tar.gz

http://www.maxmind.com/download/geoip/api/perl/
http://www.maxmind.com/download/geoip/api/perl/Geo-IP-1.31.tar.gz

http://www.maxmind.com/app/geolitecity
http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

安装配置全程脚本:
# 下载
wget http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.4.tar.gz
wget http://www.maxmind.com/download/geoip/api/perl/Geo-IP-1.31.tar.gz
wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

(更多…)

AWStats上的IP(城市信息解析包安装 GeoIP City Lite)

0

一、简介
MaxMind的GeoIP非常流行的地理信息Web应用包。原先提供的免费版只提供了一个IP=>国家的,但是对于网站的统计来说:精确到城市级
别的才有比较好的分析价值。最近MaxMind提供了一个IP=>城市的简化版本。可以用于AWStats的分析统计。
但是对于中国城市还不是很全,不过还能出来beijing henan这样的东东,大体还能看,呵呵…

二、安装
1、安装GeoIP的C API和Perl API
www.maxmind.com/download/geoip/api/c/
www.maxmind.com/download/geoip/api/perl/

wget www.maxmind.com/download/geoip/api/c/GeoIP-1.3.14.tar.gz
tar zxf GeoIP-1.3.14.tar.gz
cd GeoIP-1.3.14
./configure
make
make install

wget www.maxmind.com/download/geoip/api/perl/Geo-IP-1.27.tar.gz
tar zxf Geo-IP-1.27.tar.gz
cd Geo-IP-1.27
perl Makefile.PL
make
make install

2、下载MaxMind’s GeoLiteCity database
www.maxmind.com/app/geolitecity
www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gzip -d GeoLiteCity.dat.gz
大约25M

3、配置awstates
复制GeoLiteCity.dat到/usr/local/share/GeoIP/下
然后修改awstats.panzhiqi.conf中的
LoadPlugin=”geoip_city_maxmind GEOIP_STANDARD /usr/local/share/GeoIP/GeoLiteCity.dat”

等待crontab中的update下次执行的时候就可以看到城市信息了,性能很好。

Powered by ScribeFire.

搜索引擎爬虫程序一览表

0

高强度爬虫程序

Baiduspider+(+http://www.baidu.com/search/spider.htm“)
百度爬虫
高强度爬虫,有时会从多个IP地址启动多个爬虫程序!
由于算法问题,百度爬虫对相同页面会多次发出请求(尤其是首页),令人烦恼。
推广效果好。
Mozilla/5.0 (compatible; Yahoo! Slurp China; http://misc.yahoo.com.cn/help.html“)
Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp“)
雅虎爬虫,分别是雅虎中国和美国总部的爬虫
高强度爬虫,有时会从多个IP地址启动多个爬虫程序!
比较规范的爬虫,看参考其网址,设定爬虫访问间隔。(但需要考虑同时出现多个yahoo爬虫)
推广效果尚可。
iaskspider/2.0(+http://iask.com/help/help_index.html“)
Mozilla/5.0 (compatible; iaskspider/1.0; MSIE 6.0)
新浪爱问爬虫
算法差,大量扫描无实际意义的页面,对动态链接网站负担很大
推广效果差。
Sogou web spider/3.0(+http://www.sogou.com/docs/help/webmasters.htm#07“)
Sogou Push Spider/3.0(+http://www.sogou.com/docs/help/webmasters.htm#07“)
【早期用法:“sogou spider”】
搜狗爬虫
算法差,大量扫描无实际意义的页面,对动态链接网站负担很大
推广效果差。

[编辑]

中等强度爬虫程序

Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html“)
Google爬虫
算法优秀,多为访问有实际内容的页面
推广效果好。 → 详情
Mediapartners-Google/2.1
Google AdSense广告内容匹配爬虫,对网页收录有一定辅助作用。→ 详情
Mozilla/5.0 (compatible; YodaoBot/1.0; http://www.yodao.com/help/webmaster/spider/“; )
【早期采用“ OutfoxBot/0.5 (for internet experiments; http://”; outfoxbot@gmail.com)”】
网易爬虫
其搜索算法需要改进
推广效果差。
ia_archiver
Alexa排名爬虫,用于检测网站是否做了alexa排名的作弊。→ 详情
Mozilla/5.0 (Twiceler-0.9 http://www.cuill.com/twiceler/robot.html“)
美国斯坦福大学的一个学生研究项目。→ 详情

[编辑]

其他搜索引擎的爬虫

msnbot/1.0 (+http://search.msn.com/msnbot.htm“)
MSN爬虫
特点未知
msnbot-media/1.0 (+http://search.msn.com/msnbot.htm“)
(欢迎补充资料)
特点未知
Mozilla/4.0(compatible; MSIE 5.0; Windows 98; DigExt)
DigExt并非一个独立的爬虫程序,而是IE5的“允许脱机阅读”模式标记。→ 详情
Mozilla/3.0 (compatible; Indy Library)
Indy Library本来是个开源程序库,但后来被spam bots冒用。→ 详情
抓取强度:各服务器上不一定
推广效果:无
P.Arthur 1.1
据称为北大天网的搜索引擎爬虫程序
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QihooBot 1.0)
名字上看来是Qihoo的
特点未知
Gigabot
Gigabot/2.0 (http://www.gigablast.com/spider.html“)
Gigabot搜索引擎爬虫。已被google收购?(欢迎补充资料)
eApolloBot/1.0 (eApollo search engine robot; http://www.eapollo.com“; eapollo at global-opto dot com)
lanshanbot/1.0
据说是中搜爬虫。(欢迎补充资料)
iearthworm/1.0, iearthworm@yahoo.com.cn
专抓图片的爬虫,据说来源IP是3721或阿里巴巴。→ 详情
TMCrawler
Mozilla/5.0 (compatible; heritrix/1.10.2 +http://i.stanford.edu/“)
开源的网络爬虫,一个数字图书馆项目。→ 详情
WebNews http.pl

[编辑]

RSS扫描器

rss.asp Mozilla/6.0 (MSIE 6.0; Windows NT 5.1;Foxmail/MILOWU)
这是用foxmail6.0订阅了你的rss
rss.asp Feedfetcher-Google; (+http://www.google.com/feedfetcher.html“)
google的rss搜索扫描器
rss.asp feedsky_spider http://www.feedsky.com
一款rss扫描器,有兴趣者进入此网站添加您的rss

Powered by ScribeFire.

Indy Library-一个什么性质的爬虫?

0

Indy Library最初是一个关于网络操作的开源程序库,可在 http://www.nevrona.com/Indy” 或 http://indy.torry.net” 找到。这个程序库被Borland Delphi 6、 7、 C++Builder 6,以及所有 Kylix 版本所引用。

不幸的是,这个程序库被强制破解(hi-jacked)并被滥用于一些中国的spam bots中。近期所见使用“Indy Library”字串作为User Agent信息的访问,大多是这些中国“原创作品”。

是开源项目Indy的一部分,是关于网络操作的一个程序库。
[编辑]爬虫信息
爬虫名称: Indy Library
HTTP User Agent:
Mozilla/3.0 (compatible; Indy Library) </pre>

抓取强度: 不一定,很多服务器上较少出现,但也有部分服务器被大量访问
搜索引擎推广效果:无!
来访IP:无规律,很杂乱
[编辑]对Indy Library爬虫进行控制
Indy Library只是一个程序库,很多使用它的用户并不遵循robots.txt抓取规范,可能抓取你服务器上声明禁止访问的内容!。如果此类爬虫对您的服务器造成困扰,您可以:
用服务器防火墙屏蔽相关访问
用.htaccess屏蔽相关访问
在程序中进行相关检测和屏蔽
[编辑]参考资料
官方网站
http://www.indyproject.org/” 关于Indy Library项目的官方信息

Awstats 多個 log 的顯示方法

0

一般大型網站的 Web Servre log 太大,通常會以 logrotate 將 log 分割成為數個檔案。

以 Apache 為例就是像:
access_log.1、access_log.2、access_log.3…以此類推

另外如果使用 Load balance ,也是會產生個 log 檔,但 awstats 預設的 LogFile 是只有一個,在多個 log file 的狀態下,變成無法更新至最新的狀態,這時就要使用 awstats 內建的工具logresolvemerge.pl 來合併 log ,其實用法也很簡單,只要更改網站的設定檔就好了,以本站為例就是編輯 /etc/awstats/awstats.neo.conf

找到 LogFile 的地方,原來預設單個 log 的設定如下:
LogFile=”/var/log/httpd/access_log”

(更多…)

AWstats 如何统计旧日志

0

awstats 文档中提供了一个方法 ,需要清空过去所有的统计数据,并依次重新更新所有的历史日志;另外还包含了一个tips,不必清空所有过去的统计数据,就可以把过去遗漏的某天数据加入统计,但依然要求清空一整个月的统计数据。

这些历史统计数据保存在config 文件中DirData 参数所定义的目录中,并且是按月保存的。

awstats.micronsky.com.conf :

DirData="./xyz"

目录包含文件:

 (更多...)

优化AWSTATS性能的7个建议

0

对于一个访问量巨大的网站来说,使用awstats来分析其日志是一件很痛苦的事情,这往往需要耗费很多时间才能得到一个结果,偶尔还会让机器内存耗尽。在awstats的文档中,找到几个关于性能优化的建议,如下:

  • 关掉DNSLookup(DNSLookup不能设置为1). 虽然这样你会丢失一些关于访问者的国家信息,但是我觉得这无关紧要,大部分网站的访问者集中在国内。这样能给awstats性能带来小小提升。
  • 小心使用这三个参数: URLWithQuery, URLReferrerWithQuery ,URLWithAnchor (如果你不知道它们有什么作用最好设置为0)
  • 使 用最新版本的perl (例如Perl 5.8比5.6要快上5%) 。另外比较重要的一点,用标准版本的perl代替ActiveState版本的perl,因为ActiveState 5.006有内存泄漏方面的问题,它在解析日志的时候会越来越慢最终一行日志也跑不动。
  • 回卷日志。尽可能的把日志分成更小的一份,这样awstats能处理的快一些,可以适当提高awstats解析频率.
  • 确认HostAliases参数是完整的
  • 使用最新版本的AWStats (例如AWStats 6.0比5.9快15%).
  • 某些geeks,你可以考虑采用不同的参数来重新编译perl,例如使用”use64bitint=define usemymalloc=y”编译perl,这样perl的速度能提升10%.

原文见awstats benchmark

Go to Top