我正在测试awstats一段时间,以决定是否可以使用它来为我的网站(很多虚拟主机)生成统计信息。一些信息:
LogFormat="%other %other %other %other %other %host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
PerlParsingFormat是(?^:^[^ ]+ [^ ]+ [^ ]+ [^ ]+ [^ ]+ ([^ ]+) [^ ]+ ([^\/[]+) [([^ ]+)( [^ ]+)?] \"([^ ]+) ([^ ]+)(?: [^\"]+|)\" ([^ ]+) ([^ ]+) \"([^\"])\" \"([^\"]*)\")
当我运行awstats来分析我的日志文件时,我只能达到10行/秒。使用htop,我可以看到使用100%只有一个CPU线程的awstats.pl进程。服务器内存保持正常,很多都是免费的。
我不知道要改变什么才能使用awstats。我认为使用自定义LogFormat会生成一个与Perl一起使用的速度非常慢的正则表达式。
在awstats网站上,有一些与CPU功率,日志大小和其他变量相关的基准测试结果。但是,这些测试使用LogFormat=1
。
任何人都可以帮助我吗?
-
编辑:我的日志文件的5行(已清理:host.mydomain.com是我的服务器,0.0.0.0是来自客户端的IP)
Jun 13 14:53:21 host.mydomain.br httpd-access: 0.0.0.0 - - [13/Jun/2015:14:53:20 -0300] "-" 408 - "-" "-"
Jun 13 14:53:21 host.mydomain.br httpd-access: 0.0.0.0 - - [13/Jun/2015:14:53:20 -0300] "GET /cgi-bin/SMS/STINGm/start_applet_chime.pl?1bx1,1bx1 HTTP/1.1" 200 16210 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 13 14:53:22 host.mydomain.br httpd-access: 0.0.0.0 - - [13/Jun/2015:14:53:21 -0300] "GET /Repositorio/oferta_000fl6un19i02wyiv80ispcrrkg1vg1w.gif HTTP/1.1" 200 4349 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; ms-office; MSOffice 14)"
Jun 13 14:53:22 host.mydomain.br httpd-access: 0.0.0.0 - - [13/Jun/2015:14:53:21 -0300] "GET /zoneamento/tabelas/SP/SANTA_CRUZ_DA_CONCEICAO_G.HTML HTTP/1.1" 304 - "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 13 14:53:23 host.mydomain.br httpd-access: 0.0.0.0 - - [13/Jun/2015:14:53:22 -0300] "GET /Repositorio/oferta1_000fl6uo9lz02wyiv80ispcrr1h2o7hx.gif HTTP/1.1" 200 8279 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; ms-office; MSOffice 14)"