Goaccess Analysis Log

Source: Internet
Author: User
Tags geoip

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.