Very small and Lean Nginx log analysis tool goaccess, processing speed very fast, I use Xshell view, also can generate HTML report.
How to install goaccess on CentOS:
1. Need to install GeoIP, ncurses, Glib2, a sentence to fix
Yum-y Install glib2 glib2-devel ncurses ncurses-devel GeoIP geoip-devel
2. Download goaccess Decompression Compilation installation
# wget http://jaist.dl.sourceforge.net/project/goaccess/0.6.1/goaccess-0.6.1.tar.gz
# tar ZXVF goaccess-0.6.1.tar.gz
# CD goaccess-0.6.1
#./configure–enable-geoip–enable-utf8
# Make && make install
# Make Clean
3. How to use Goaccess
Enter the directory where Nginx logs are located
Direct view of the command line
# goaccess-f Access.log-c-A
You can also generate HTML reports
Goaccess-f/var/log/nginx/access.log-a > report.html zcat-f/var/log/nginx/access.log* | Goaccess-a > report.html zcat access.log.1.gz | Goaccess
Or simply analyze all the logs currently under
Zcat access.log* | Goaccess
If you need to analyze a day's logs, such as those on the October 5, we have Linux pipeline commands to ^_^.
Sed-n '/05\/dec\/2010/,$ p ' access.log | Goaccess-s–b
Analyze logs from November 5 to December 5 in one months
Sed-n '/5\/nov\/2010/,/5\/dec\/2010/p ' Access.log | Goaccess-s–b
When you do not want to install the Goaccess program on the server, you can analyze the log on the server by calling the local Goaccess program (very magical ^_^):
SSH user@server ' Cat/var/log/apache2/access.log ' | Goaccess-s-A
There's a detailed log analysis on GitHub.
GitHub Address Https://github.com/allinurl/goaccess
http://my.oschina.net/mrco/blog/181737
Goaccess Analysis Log