Posts tagged 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.

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

AWstats 在 IIS 下最详细的安装说明文档

0

Awstats的用途好处我就不多多说了,在baidugoogle里面搜一下一箩筐,但大部分都是说在linux下的安装,有介绍在windows下的安装说明,但是都是非常的潦草的介绍下,本人就花了n多的时间在这些文档中搜索,

现在按照我的说明步骤安装,基本上是不会有任何错误,本人在windows2003上和windows2000上安装测试都没有问题。

参考文件

http://www.chedong.com/tech/awstats.html
http://awstats.sourceforge.net/docs/awstats_setup.html
http://awstats.sourceforge.net/docs/awstats_tools.html#awstats_buildstaticpages
http://awstats.sourceforge.net/docs/awstats_config.html#HTMLHeadSection

一、首先将IIS安装好,然后安装 ActivePerl

(更多…)

Go to Top