forked from allinurl/goaccess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
goaccess.1
244 lines (215 loc) · 7.39 KB
/
goaccess.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
.TH goaccess 1 "JULY 2013" Linux "User Manuals"
.SH NAME
goaccess \- fast web log analyzer and interactive viewer.
.SH SYNOPSIS
.B goaccess [-f
.I input-file
.B ]
.I [-c] [-e] [-r] [-a]
.SH DESCRIPTION
.B goaccess
is a free (GPL) real-time web log analyzer and interactive
viewer that runs in a terminal 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 web log file, then it will collect data
from the parsed file and it will display it
to the console or the X terminal. The collected information will be
displayed to the user in a visual/interactive window.
The collected information includes:
.IP "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
.IR (css, ico, jpg, js, swf, gif, png)
Total unique HTTP referrers (URLs),
Total unique 404s
.I (not found),
Size of the parsed log file,
Total bandwidth consumption.
.IP "Unique visitors:"
HTTP requests having the same IP,
same date and same agent will be
considered a unique visit.
.I (including crawlers).
.IP "Requested files"
Hit totals are based on total requests.
This module will display hits, percent, [bandwidth, time served]
.IP "Requested static files"
Hit totals are based on total requests. Includes files such as:
jpg, css, swf, js, gif, png etc. This module will display hits,
percent, [bandwidth, time served]
.IP "404 or Not Found"
Hit totals are based on total requests. This module will display
hits, percent, [bandwidth, time served]
.IP "Hosts"
Hit totals are based on total requests. This module will display
hits, percent, [bandwidth, time served]. The expanded module
can display extra information such as reverse DNS and country.
If -a is enabled, a list of user agents will be displayed.
.IP "Operating Systems"
Hit totals are based on unique visitors. This module will
display hits and percent. The expanded module shows all available
versions of the parent node.
.IP "Browsers"
Hit totals are based on unique visitors. This module will
display hits and percent. The expanded module shows all
available versions of the parent node.
.IP "Referrers URLs"
The URL where the request came from. Hit totals are based on
total requests. This module will display hits and percent.
.IP "Referring Sites"
This module will display only the host but not the whole URL.
The URL where the request came from. Hit totals are based on
total requests. This module will display hits and percent.
.IP "Keyphrases"
This module will report keyphrases used on Google search,
Google cache, and Google translate. Hit totals are based on
total requests. This module will display hits and percent.
.IP "HTTP Status Codes"
The values of the numeric status code to HTTP requests.
Hit totals are based on total requests. This module will
display hits and percent.
.SH OPTIONS
.IP "-f input-file"
Path to input log file.
.IP -c
Prompt date and log format configuration window.
.IP -e
Exclude an IP from being counted under the HOST module.
.IP -a
Enable a list of User-Agents for the selected host.
.IP -r
Disables IP resolver
.SH CUSTOM LOG/DATE FORMAT
GoAccess can parse virtually any web log format.
Predefined options include, Common Log Format (CLF),
Combined Log Format (XLF/ELF), including virtual host,
Amazon CloudFront (Download Distribution) and
W3C format (IIS).
GoAccess allows any custom format string as well.
There are two ways to configure the log format.
The easiest is to run GoAccess with
.I -c
to prompt a configuration window. Otherwise, it can be
configured under ~/.goaccessrc.
.IP "date_format"
The
.I date_format
variable followed by a space, specifies the log format
date containing any combination of regular characters
and special format specifiers. They all begin with a
percentage (%) sign. See http://linux.die.net/man/3/strftime
.IP "log_format"
The
.I log_format
variable followed by a space, specifies the log format string.
.IP %d
date field matching the
.I date_format
variable.
.IP %h
host (the client IP address, either IPv4 or IPv6)
.IP %r
The request line from the client.
.IP %s
The status code that the server sends back to the client.
.IP %b
The size of the object returned to the client.
.IP %R
The "Referer" HTTP request header.
.IP %u
The User-Agent HTTP request header.
.IP %D
The time taken to serve the request, in microseconds.
.IP %T
The time taken to serve the request, in seconds.
.I Note:
%D will take priority over %T if both are used.
.IP %^
Ignore this field.
.SH INTERACTIVE MENU
.IP "F1 or ^ h"
Main help.
.IP "F5"
Redraw main window.
.IP "q"
Quit the program, current window or collapse active module
.IP "o or ENTER"
Expand selected module or open window
.IP "^ DOWN or j"
Scroll down within expanded module
.IP "^ UP or k"
Scroll up within expanded module
.IP "c"
Set or change scheme color.
.IP "TAB"
Forward iteration of modules. Starts from current active module.
.IP "SHIFT + TAB"
Backward iteration of modules. Starts from current active module.
.IP "^ f"
Scroll forward one screen within an active module.
.IP "^ b"
Scroll backward one screen within an active module.
.IP "s"
Sort options for active module
.IP "/"
Search across all modules (regex allowed)
.IP "n"
Find the position of the next occurrence across all modules.
.IP "g"
Move to the first item or top of screen.
.IP "G"
Move to the last item or bottom of screen.
.SH EXAMPLES
The simplest and fastest usage would be:
# goaccess -f access.log
That will generate an interactive text-only output.
To generate an HTML report:
# goaccess -f access.log -a > report.html
To generate full statistics we can run GoAccess as:
# goaccess -f access.log -a
The
.I -a
flag indicates that we want to process an agent-list for every host parsed.
The
.I -c
flag will prompt the date and log format configuration window. Only when
curses is initialized.
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
.I 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 web 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 -a
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 -a
.I Note that this could take longer time to parse depending on the speed of sed.
.B 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 -a
and if you don't want to install it on your server, you can still run it
from your local machine:
# ssh root@server 'cat /var/log/apache2/access.log' | goaccess -a
.SH NOTES
For now, each active window has a total of 300 items.
Eventually this will be customizable.
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 feature.
.SH BUGS
If you think you have found a bug, please send me an email to
.SH AUTHOR
Gerardo Orellana <[email protected]>
For more details about it, or new releases, please visit http://goaccess.prosoftcorp.com