Did You Know?
Donate to TecMint

LFCS - Linux Foundation Certified SysAdmin - Exam Preparation Guide

GoAccess (A Real-Time Apache and Nginx) Web Server Log Analyzer

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

GoAccess is an interactive and real time web server log analyzer program that quickly analyze and view web server logs. It comes as an open source and runs as a command line in Unix/Linux operating systems. It provides brief and beneficial HTTP (web server) statistics report for Linux administrators on the fly. It also take care of both the Apache and Ngnix web server log formats.

GoAccess parses and analyze the given web server log formats such CLF (Common Log Format), W3C format (IIS) and Apache virtual hosts and then generate output of the data to the terminal. It includes the following features.

    General Statistics, bandwidth etc.
    Top Visitors
    Requested files
    Requested static files, images, swf, js, etc.
    Referrers URLs
    404 or Not Found
    Operating Systems
    Browsers and Spiders
    Hosts, Reverse DNS, IP Location
    HTTP Status Codes
    Referring Sites
    Support for IPv6
    Different Color Schemes
    Unlimited log file size
    Custom log format

How Do I Install GoAccess?

Presently, GoAccess is not available from yum repositories, so we need to manually download and compile it using source code under redhat based systems.

On RHEL/Centos/Fedora
# yum install ncurses-devel glib2-devel GeoIP*
# cd /usr/src
# wget http://sourceforge.net/projects/goaccess/files/0.5/goaccess-0.5.tar.gz/download
# tar zxvf goaccess-0.5.tar.gz
# cd goaccess-0.5
# ./configure
#  make; make install
On Debian

GoAccess utility is available since Debian Squeeze 6. To install just run the following command on the terminal.

# apt-get install goaccess

For older Debian releases, you can be able to install it by adding a line to your /etc/apt/sources.list file as shown below.

# vim /etc/apt/sources.list
# deb http://ftp.de.debian.org/debian sid main
# apt-get update
# apt-get install goaccess
On Ubuntu

Since Ubuntu 11.04 it is available from the apt-get repositories. So, you can simple type the following command on the terminal to install it.

# apt-get install goaccess

For older Ubuntu releases, simple add the following line to your /etc/apt/sources.list file and then run the commands to install it as shown below.

# vim /etc/apt/sources.list
# deb http://ubuntu.mirror.cambrium.nl/ubuntu/ natty main universe
# apt-get update
# apt-get install goaccess

How Do I Use GoAccess?

Once, goaccess is installed, execute ‘goaccess‘ command without any arguments will list the help menu.

# goaccess
GoAccess - 0.5

Usage: goaccess [ -e IP_ADDRESS][ - a ][ - c ]< -f log_file >

The following options can also be supplied to the command:

 -f <argument> - Path to input log file.
 -c            - Prompt log/date configuration window.
 -a            - Enable a List of User-Agents by host.
                 For faster parsing, don't enable this flag.
 -e <argument> - Exclude an IP from being counted under the
                 HOST module. Disabled by default.

Examples can be found by running `man goaccess`.

For more details visit: http://goaccess.prosoftcorp.com
GoAccess Copyright (C) 2009-2012 GNU GPL'd, by Gerardo Orellana

The easiest way to get the any web server statistics use the flag ‘f‘ with input log file name as shown below. The below command will give you general statistics of your web server logs.

# goaccess -f /var/log/httpd/tecmint.com
# goaccess -f /var/log/nginx/tecmint.com
GoAccess Web Log Analyzer

GoAccess Web Log Analyzer

For more information and usage please visit http://goaccess.prosoftcorp.com/.

Ravi Saive

Owner at TecMint.com
Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.
Download Free eBooks
Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

8 Responses

  1. nobicycle says:

    Interesting, but the terminal I use captures F10, which prevents specifying the log format. Log format cannot be specified on the command line either.

  2. James says:

    I had the same issue, however, I configured my log format/date in my: ~/.goaccessrc

    color_scheme 1
    date_format %d/%b/%Y
    log_format %h %^[%d:%^] %^ “%r” %s %b “%R” “%u”

  3. Lance says:

    This is works awesome on my nginx server. Version 0.6 just came out which fixed the F10 key in gnome term.

  4. Samson Mugo says:

    Yea, Version 0.6 fixed the F10 key binding issue. Great post Ravi, just what I needed. Very cool that it is real time.

  5. anand vamsi says:


    Is it possible to parse the logs from remote server ie. if i have apache server running in and logs placed in /var/log/apache.log in the same server .is it possible to watch the stats from go access is installed)

    Please help me

    • Ravi Saive says:

      Anand, I never tried on the remote machine, but you should give a try, if it works for you then it definitely works others too and don’t forget to post your output here, if you’ve tried.

  6. Pierre says:

    Hello, I just start with Goaccess, is there a way to know pageviews per mouth?
    I can’t find info?


Leave a Reply

This work is licensed under a (cc) BY-NC | TecMint uses cookies. By using our services, you comply to use of our cookies. More info: Privacy Policy.
© 2012-2014 All Rights Reserved.