为了节省日志服务器的cpu,在awstats配置文件里我是这样写的
- /path_to_awstats/awstats.pl -update -config=vod -lang=cn
- Create/Update database for config "/etc/awstats/vod.conf" by AWStats version 6.95 (build 1.943)
- From data in log file "/path_to_log/20110328"...
- Error: Couldn't open server log file "/path_to_log/20110328" : No such file or directory
- Setup ('/etc/awstats/vod.conf' file, web server or permissions) may be wrong.
- Check config file, permissions and AWStats documentation (in 'docs' directory).
- /path_to_awstats/awstats.pl -update -config=vod -lang=cn -LogFile=/path_to_log/20110228
- Create/Update database for config "/etc/awstats/vod.conf" by AWStats version 6.95 (build 1.943)
- From data in log file "/path_to_log/20110228"…
- Phase 1 : First bypass old records, searching new record...
- Direct access to last remembered record has fallen on another record.
- So searching new records from beginning of log file...
- Jumped lines in file: 0
- Parsed lines in file: 2507347
- Found 0 dropped records,
- Found 1 corrupted records,
- Found 2507346 old records,
- Found 0 new qualified records.
- php -r 'var_dump(date("Ymd",time()-86400));'
- string(8) "20110228"
- date +%Y%m%d -d yesterday
- 20110228
- <?php
- system('/path_to_awstats/awstats.pl -update -config=vod -lang=cn -LogFile='.date('Ymd',time()-86400));
- ?>