Man Page
goaccess(1) User Manuals goaccess(1)
NAME
goaccess - fast log analyzer and interactive viewer for the Apache web server
SYNOPSIS
goaccess [-f input-file ] [-b] [-s] [-e]
DESCRIPTION
goaccess is a free (GPL) real-time Apache web log analyzer and interactive viewer that runs in a ter‐
minal in *nix systems. It provides fast and valuable HTTP statistics for system administrators that
require a visual server report on the fly. First it will parse the access log file, then it will
collect data from the parsed file and it will display it to the console or the X terminal. The col‐
lected information will be displayed to the user in a visual/interactive window. The collected
information includes:
General Statistics:
Total number of valid requests, Total number of invalid requests, Total time to analyze the
data, Total unique visitors, Total unique requested files, Total unique static files
(css,ico,jpg,js,swf,gif,png) Total unique HTTP referrers (URLs), Total unique 404s (not
found), Size of the parsed log file, Total bandwidth consumption.
Unique visitors:
HTTP requests having the same IP, same date and same agent will be considered a unique visit.
(including crawlers). {Detail view} is available for this module
Requested files
The totals are based on unique requested files. This is based on the premise that HTTP
requests having the same IP, same date and same agent will be considered a unique visit.
{Detail view} is available for this module
Requested static files
The totals are based on unique requested files. Includes files such as: jpg, css, swf, js,
gif, png etc. Unique requests are based on the premise that HTTP requests having the same IP,
same date and same agent will be considered a unique visit. {Detail view} is available for
this module
Referrers URLs
The URL where the request came from. Totals are not based on the above premise, but instead,
based on the total number of requests. {Detail view} is available for this module
404 or Not Found
The total number is based on total requests. {Detail view} is available for this module
Operating Systems
The total number is based on unique visitors. {Detail view} is available for this module
Browsers
The total number is based on unique visitors. {Detail view} is available for this module
Hosts The total number is based on total requests. {Detail view} is available for this module.
{Detail view} for each IP can display extra information for the particular host, including
reverse dns, and geolocation of the IP.
HTTP Status Codes
Totals are based on total requests. {Detail view} is available for this module
Referring Sites
This module will display only the host but not the whole URL. The total number is based on
total requests. {Detail view} is available for this module
Keyphrases
This module will report keyphrases used on Google search, Google cache, and Google translate.
The total number is based on total requests. {Detail view} is available for this module
OPTIONS
-b Enable total bandwidth consumption. To achieve faster parsing, do not enable this flag. This
has been disabled by default.
-f input-file
Path to input log file.
-s Enable HTTP response status codes report. To avoid overhead while parsing, this feature has
been disabled by default.
-e Exclude an IP from being counted under the HOST module.
-a Enable a list of User-Agents for the selected host.
INTERACTIVE MENU
F1 Main help.
F5 Redraw main window.
q Quit the program or the current {detail view} (window).
o Open a {detail view} for the current active module.
c set or change scheme color.
TAB Forward iteration of modules. Starts from current active module.
SHIFT + TAB
Backward iteration of modules. Starts from current active module.
RIGHT ARROW
Open a {detail view} for the current active module.
0-9 Activate module so the user can open a {detail view} with either ^o^ or ^RIGHT ARROW^.
SHIFT + 0-9
Activate module above 10.
s Sort unique visitors by date. This will only work on the Unique visitors module(1).
S Sort unique visitors by hits. This will only work on the Unique visitors module(1).
/ Search forward on any {detail view} window for the occurrence of typed pattern.
n Find the position of the next occurrence on any {detail view} window.
t Move to the first item on any {detail view} window.
b Move to the last item on any {detail view} window.
EXAMPLES
The simplest and fastest usage would be:
# goaccess -f access.log
That will generate an interactive text-only output.
To generate full statistics we can run GoAccess as:
# goaccess -f access.log -a -s -b
The -a flag indicates that we want to process an agent-list for every host parsed. The -s flag tells
GoAccess go get every HTTP status code. The -b flag will process the total bandwidth consumption for
files, hosts, and dates.
Now if we want to add more flexibility to GoAccess, we can do a series of pipes. For instance:
If we would like to process all access.log.*.gz we can do:
# zcat access.log.*.gz | goaccess
OR
# zcat -f access.log* | goaccess
Another useful pipe would be filtering dates out of the Apache's access log
The following will get all HTTP requests starting on 05/Dec/2010 until the end of the file.
# sed -n '/05\/Dec\/2010/,$ p' access.log | goaccess -s -b
If we want to parse only a certain time-frame from DATE a to DATE b, we can do:
sed -n '/5\/Nov\/2010/,/5\/Dec\/2010/ p' access.log | goaccess -s -b
Note that this could take longer time to parse depending on the speed of sed.
Also, it is worth pointing out that if we want to run GoAccess at lower priority, we can run it as:
# nice -n 19 goaccess -f access.log -s -a -b
and if you don't want to install it on your server, you can still run it from your local machine:
# ssh user@server 'cat /var/log/apache2/access.log' | goaccess -s -a -b
NOTES
On each {detail view} window, the total number of items is 300.
Piping a log to GoAccess will disable the real-time functionality. This is due to the portability
issue on determining the actual size of STDIN. However, a future release *might* include this fea‐
ture.
BUGS
If you think you have found a bug, please send me an email to goaccess@prosoftcorp.com
AUTHOR
Gerardo Orellana For more details about it, or new releases, please visit
http://goaccess.prosoftcorp.com
Linux DECEMBER 2010 goaccess(1)