0

我想自动更新我网站的每日统计信息。我做了一个这样的批处理脚本:

rem c:Perl64binperl.exe….toolsawstats_buildstaticpages.pl -config=mobilekat -lang=IT -databasebreak=day

c:Perl64binperl.exe "awstats.pl" -config=MobileKat -update -databasebreak=day
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output > awstatsawstats.MobileKat.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=alldomains >  awstatsawstats.MobileKat.alldomains.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=allhosts >  awstatsawstats.MobileKat.allhosts.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=lasthosts > awstatsawstats.MobileKat.lasthosts.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=unknownip > awstatsawstats.MobileKat.unknownip.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=allrobots > awstatsawstats.MobileKat.allrobots.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=lastrobots > awstatsawstats.MobileKat.lastrobots.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=session > awstatsawstats.MobileKat.session.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=urldetail > awstatsawstats.MobileKat.urldetail.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=urlentry > awstatsawstats.MobileKat.urlentry.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=urlexit > awstatsawstats.MobileKat.urlexit.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=osdetail > awstatsawstats.MobileKat.osdetail.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=unknownos >  awstatsawstats.MobileKat.unknownos.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=browserdetail >  awstatsawstats.MobileKat.browserdetail.html 
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=unknownbrowser >  awstatsawstats.MobileKat.unknownbrowser.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=downloads >  awstatsawstats.MobileKat.downloads.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=refererse >  awstatsawstats.MobileKat.refererse.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=refererpages > awstatsawstats.MobileKat.refererpages.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=keyphrases > awstatsawstats.MobileKat.keyphrases.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=keywords > awstatsawstats.MobileKat.keywords.html
c:Perl64binperl.exe "awstats.pl" -config=MobileKat -staticlinks -lang=IT -output=errors404 > awstatsawstats.MobileKat.errors404.html

但是当我打开页面时,我awstats.MobileKat.html看到Never updated (See 'Build/Update on awstats_setup.html page)所有内容都为 0(0 个访问者,依此类推……)。如果我删除-databasebreak=day并打开同一个页面,一切似乎都很完美。如果这仍然不起作用,我想我会做一个任务计划程序,每天运行我的批处理文件,而不需要这个-databasebreak=day

4

1 回答 1

0

Awstats 默认每月读取日志文件并创建摘要文本文件。这意味着:每个月都会有自己的摘要文件:awstatsmmyyyy.DomainName.txt

Databasebreak=day 意思是:每天都会创建摘要文件:每天都会有自己的摘要文件:awstatsmmyyyydd.DomainName.txt

我不明白你所说的“自动每日统计更新”是什么。

  • 如果您想每天运行 awstat.pl update,您只需每天运行一个 cron 作业/计划作业。

  • 如果你想每天报告,目前我认为 Awstats 不支持这个功能。但是,您可以使用 Awstats 更新数据库,并按天修改一些源代码以按天、周、月、年……按日期范围或任何您想要的方式获取报告。

于 2015-04-24T06:01:55.663 回答