我的服务器上预装了 3 个日志分析工具。您认为这 3 个分析工具中哪一个最好?
我的目标:基本上分析错误日志文件
安装的软件:
* Analog
* Awstats
* Webalizer
我确实读过这个问题-->Apache 日志分析器
谢谢。
答案1
答案2
四处寻找 Apache 错误日志解析器,直到我找到这命令将按错误发生顺序解析您的错误文件:
sed 's^\[.*\]^^g' error.log | sed 's^\, referer: [^\n]*^^g' | sort | uniq -c | sort -n
输出:错误发生 - 错误文本
1 AH00126: Invalid URI in request GET HTTP/1.1
1 PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in /var/www/con/libraries/joomla/database/driver/mysql.php on line 425
108 PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 512 bytes) in /var/www/es/libraries/joomla/database/driver/mysql.php on line 425
156 PHP Notice: Undefined index: select in /var/www/con/cli/form_output.php on line 3
156 PHP Notice: Undefined index: inputfrom_value in /var/www/con/cli/form_output.php on line 2
157 PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 83 bytes) in /var/www/es/libraries/joomla/database/driver/mysql.php on line 425
202 PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in /var/www/es/libraries/joomla/database/driver/mysql.php on line 425
218 PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 80 bytes) in /var/www/es/libraries/joomla/database/driver/mysql.php on line 425
316 PHP Notice: Undefined index: in /var/www/con/cli/unit.php on line 513
520 PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 81 bytes) in /var/www/es/libraries/joomla/database/driver/mysql.php on line 425