Chinaunix首页 | 论坛 | 博客
  • 博客访问: 341756
  • 博文数量: 64
  • 博客积分: 2301
  • 博客等级: 大尉
  • 技术积分: 570
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-25 11:48
文章分类

全部博文(64)

文章存档

2013年(5)

2012年(6)

2011年(36)

2010年(7)

2009年(10)

分类: LINUX

2011-07-12 18:05:56

I. Setup: Installation and configuration using awstats_configure.pl
If you answer yes, awstats_configure.pl will modify your httpd.conf, changing the following directive:
from
CustomLog /yourlogpath/yourlogfile common
to
CustomLog /yourlogpath/yourlogfile combined
windows设置

II. Process logs: Building/updating statistics database
cd  /usr/local/awstats/awstats-7.0/wwwroot/cgi-bin(awstats.p 在此目录下,也可以把文件拷到别的目录下。)
perl awstats.pl -config= -update
AWStats will read the configuration file awstats.mysite.conf (or if not found, awstats.conf) and create/update its database with all summary information issued from analyzed log file.
AWStats statistics database files are saved in directory defined by the DirData parameter in configuration file.
When the create/update is finished, you should see a similar result on your screen:
Create/Update database for config "/etc/awstats/awstats..conf" by AWStats version 7.0 (build 1.971)
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 394
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 394 new qualified records.
III. Run reports: Building and reading reports
1.生成静态的html页面
perl awstats.pl -config= -output -staticlinks > awstats.mysite.html
       where mysite must be substituted with the domain/virtual host name you selected earlier during AWStats configuration.
      
To create specific individual reports, specify the report name on the command line as follows1:(生成不同的报告页面)
perl awstats.pl -config=mysite -output=alldomains -staticlinks > awstats.mysite.alldomains.html
perl awstats.pl -config=mysite -output=allhosts -staticlinks > awstats.mysite.allhosts.html
perl awstats.pl -config=mysite -output=lasthosts -staticlinks > awstats.mysite.lasthosts.html
perl awstats.pl -config=mysite -output=unknownip -staticlinks > awstats.mysite.unknownip.html
perl awstats.pl -config=mysite -output=alllogins -staticlinks > awstats.mysite.alllogins.html
perl awstats.pl -config=mysite -output=lastlogins -staticlinks > awstats.mysite.lastlogins.html
perl awstats.pl -config=mysite -output=allrobots -staticlinks > awstats.mysite.allrobots.html
perl awstats.pl -config=mysite -output=lastrobots -staticlinks > awstats.mysite.lastrobots.html
perl awstats.pl -config=mysite -output=urldetail -staticlinks > awstats.mysite.urldetail.html
perl awstats.pl -config=mysite -output=urlentry -staticlinks > awstats.mysite.urlentry.html
perl awstats.pl -config=mysite -output=urlexit -staticlinks > awstats.mysite.urlexit.html
perl awstats.pl -config=mysite -output=browserdetail -staticlinks > awstats.mysite.browserdetail.html
perl awstats.pl -config=mysite -output=osdetail -staticlinks > awstats.mysite.osdetail.html
perl awstats.pl -config=mysite -output=unknownbrowser -staticlinks > awstats.mysite.unknownbrowser.html
perl awstats.pl -config=mysite -output=unknownos -staticlinks > awstats.mysite.unknownos.html
perl awstats.pl -config=mysite -output=refererse -staticlinks > awstats.mysite.refererse.html
perl awstats.pl -config=mysite -output=refererpages -staticlinks > awstats.mysite.refererpages.html
perl awstats.pl -config=mysite -output=keyphrases -staticlinks > awstats.mysite.keyphrases.html
perl awstats.pl -config=mysite -output=keywords -staticlinks > awstats.mysite.keywords.html
perl awstats.pl -config=mysite -output=errors404 -staticlinks > awstats.mysite.errors404.html
如果要生成所有页面也页面可以运行如下命令同时生成
If you prefer, you can use the awstats_buildstaticpages tool to build all these pages in one command, or to generate PDF files.
perl  awstats_buildstaticpages.pl -config= -awstatsprog=../wwwroot/cgi-bin/awstats.pl
2.动态访问页面
阅读(2754) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~