在 Linux 下你可以通过配置 crontab 来实现分析的自动运行。
下面是一些示例,至于运行时间的配置,你可以参考 crontab 的配置手册。
在配置之前你需要确认你的命令能够正常在系统中被运行:/usr/lib/cgi-bin/awstats.pl -config=www.verani.com -update输出:root@verani-iweb2:/etc# /usr/lib/cgi-bin/awstats.pl -config=www.verani.com -updateCreate/Update database for config "/etc/awstats/awstats.www.verani.com.conf" by AWStats version 6.95 (build 1.943)
From data in log file "/usr/local/veranilogs/access_log/www.verani.com/www.verani.com_access_log.2011-06-21.log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 605693)
Jumped lines in file: 605693
Found 605693 already parsed records.
Parsed lines in file: 0
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 0 new qualified records.
root@verani-iweb2:/etc# ![]()
如果希望每天早上 03:50 运行分析程序:50 3 * * * /usr/lib/cgi-bin/awstats.pl -config=www.verani.com -update >/dev/null如果你希望每小时运行一次:0 * * * * /usr/lib/cgi-bin/awstats.pl -config=www.verani.com -update >/dev/null