-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy pathREADME
367 lines (249 loc) · 11.7 KB
/
README
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
Logstalgia
a website access log visualisation tool
Copyright (C) 2008 Andrew Caudwell
http://logstalgia.io
Contents
========
1. Description
2. Requirements
3. Using Logstalgia
4. Copyright
1. Description
==============
Logstalgia is a visualization tool that replays or streams web server access
logs as a retro arcade game simulation.
2. Requirements
===============
Logstalgia's display is rendered using OpenGL and requires a 3D accelerated
video card to run.
Logstalgia supports several standardized access.log formats used by web servers
such as Apache and Nginx (see 'Supported Log Formats' below).
As Logstalgia is designed to playback logs in real time you will need a log from
a fairly busy webserver to achieve interesting results (eg 100s of requests
each minute).
3. Using Logstalgia
===================
logstalgia [options] logfile
options:
-f Fullscreen.
-WxH Set the window size. If -f is also supplied, will attempt to set the
video mode to this also. Add ! to make the window non-resizable.
--screen SCREEN
Set the number of the screen to display on.
--high-dpi
Request a high DPI display when creating the window.
On some platforms such as MacOS, the window resolution is specified in points instead of pixels.
The --high-dpi flag may be required to access some higher resolutions.
E.g. requesting a high DPI 800x600 window may produce a window that is 1600x1200 pixels.
--window-position XxY
Initial window position on your desktop which may be made up of
multiple monitors.
This will override the screen setting so don't specify both.
--frameless
Frameless window.
--title TITLE
Set a title.
-b, --background FFFFFF
Background colour in hex.
-x, --full-hostnames
Show full request ip/hostname.
-s, --simulation-speed
Simulation speed. Defaults to 1 (1 second-per-second).
-p, --pitch-speed
Speed balls travel across the screen (defaults to 0.15).
-u, --update-rate
Page Summary update speed. Defaults to 5 (5 seconds).
-g name,(HOST|URI|CODE)=regex[,SEP=chars][,MAX=n][,ABBR=n],percent[,colour]
Creates a new named summarizer group for requests for which a
specified attribute (HOST, URI or response CODE) matches a
regular expression. Percent specifies a vertical percentage of
screen to use.
SEP=chars can specify a list of separator characters (e.g. /)
to split on. The default separator is /.
MAX=n specifies the max depth into the path to be displayed.
(e.g. MAX=1 would show only root directory names of paths). By
default there is 0 (no limit).
ABBR=n specifies the minimum depth at which to allow partially
abbreviated strings. The default is 0 (allow). -1 to disallow.
A colour may optionally be supplied in hexadecimal format
(eg FF0000 for red) which will be applied to all labels
and request balls matched to the group.
Examples:
-g "HTML,URI=html?$,30"
-g "Lan,HOST=^192,30"
-g "Success,CODE=^[23],30"
If no groups are specified, the default groups are Images
(image files), CSS (.css files) and Scripts (.js files).
If there is enough space remaining a catch-all group 'Misc'
will appear as the last group.
--address-separators CHARS
List of address separator characters. Defaults to '.:'.
--address-max-depth DEPTH
Maximum depth to display in address summarizer. 0 for no maximum.
--address-abbr-depth DEPTH
Minimum abbreviation depth of address summarizer.
0 to always allow abbreviations, -1 to never abbreviate.
--path-separators CHARS
Default list of path separator characters. Defaults to /.
--path-max-depth DEPTH
Default maximum path depth shown in the summarizer.
0 for no maximum.
--path-abbr-depth DEPTH
Default minimum path abbreviation depth.
0 to always allow abbreviations, -1 to never abbreviate.
--paddle-mode MODE
Paddle mode (pid, vhost, single).
vhost - separate paddle for each virtual host in the log file.
pid - separate paddle for each process id in the log file.
single - single paddle (the default).
--paddle-position POSITION
Paddle position as a fraction of the view width (0.25 - 0.75).
--display-fields REQUEST_FIELDS
List of one or more request fields that are shown when the user
hovers the mouse over an individual request:
path - the path of the resource requested
hostname - hostname or IP address
response_size - size of the response in bytes
response_code - response code
method - method
protocol - protocol
timestamp - timestamp of request
referrer - referrer of the request
user_agent - user agent
vhost - virtual host name
log_entry - full log entry
pid - the pid of the instance that handled the request
Separate multiple fields with commas (eg 'path,hostname')
--sync Read from STDIN, ignoring entries before the current time.
--from, --to "YYYY-MM-DD hh:mm:ss +tz"
Show entries from a specific time period.
If a time zone offset isn't specified the local time zone is used.
Example accepted formats:
"2012-06-30"
"2012-06-30 12:00"
"2012-06-30 12:00:00 +12"
--start-position POSITION
Begin at some position in the log file (between 0.0 and 1.0).
--stop-position POSITION
Stop at some position.
--no-bounce
No bouncing.
--hide-response-code
Hide response code.
--hide-paddle
Hide paddle.
--hide-paddle-tokens
Hide paddle tokens shown in multi-paddle modes.
--hide-url-prefix
Hide URL protocol and hostname prefix of requests.
--disable-auto-skip
Disable automatic skipping of empty time periods.
--disable-progress
Disable the progress bar.
--disable-glow
Disable the glow effect.
--font-size SIZE
Font size (10 - 40).
--glow-duration
Duration of the glow (between 0.0 and 1.0).
--glow-multiplier
Adjust the amount of glow.
--glow-intensity
Intensity of the glow.
-o, --output-ppm-stream FILE
Write frames as PPM to a file ('-' for STDOUT).
-r, --output-framerate FPS
Framerate of output (used with --output-ppm-stream).
--load-config CONFIG_FILE
Load a config file.
--save-config CONFIG_FILE
Save a config file with the current options.
--detect-changes
Automatically reload config file when it is modified.
logfile
The path to the access log file to read or '-' if you wish to
supply log entries via STDIN.
Examples:
Watch an example access.log file using the default settings:
logstalgia data/example.log
Watch the live access.log, starting from the most recent batch of entries
in the log (requires tail). Note than '-' at the end is required for logstalgia
to know it needs to read from STDIN:
tail -f /var/log/apache2/access.log | logstalgia -
To follow the log in real time, use the --sync option. This will start reading
from the next entry received on STDIN:
tail -f /var/log/apache2/access.log | logstalgia --sync
Watch a remote access.log via ssh:
ssh user@example.com tail -f /var/log/apache2/access.log | logstalgia --sync
Supported Log Formats:
Logstalgia supports the following standardized log formats used by web servers like Apache and Nginx:
NCSA Common Log Format (CLF)
"%h %l %u %t \"%r\" %>s %b"
NCSA Common Log Format with Virtual Host
"%v %h %l %u %t \"%r\" %>s %b"
NCSA extended/combined log format
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
NCSA extended/combined log format with Virtual Host
"%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
The process id (%P), or some other identifier, may be included as an additional
field at the end of the entry. This can be used with '--paddle-mode pid' where
a separate paddle will be created for each unique value in this field.
Custom Log Format:
Logstalgia now supports a pipe ('|') delimited custom log file format:
timestamp - unix timestamp of the request date.
hostname - hostname of the request
path - path requested
response_code - the response code from the webserver (eg 200)
response_size - the size of the response in bytes
The following are optional:
success - 1 or 0 to indicate if successful
response_colour - response colour in hexidecial (#FFFFFF) format
referrer url - the referrer url
user agent - the user agent
virtual host - the virtual host (to use with --paddle-mode vhost)
pid - process id or some other identifier (--paddle-mode pid)
If success or response_colour are not provided, they will be derived from the
response_code using the normal HTTP conventions (code < 400 = success).
Recording Videos:
See the guide on the homepage for examples of recording videos with Logstalgia:
https://github.com/acaudwell/Logstalgia/wiki/Videos
Interface:
The time shown in the top left of the screen is set initially from the first log
entry read and is incremented according to the simulation speed (-s).
The counter in the bottom right hand corner shows the number of requests
displayed since the start of the current session.
Pressing space at any time will pause/unpause the simulation. While paused you
may use the mouse to inspect the detail of individual requests.
You can click on summarizer group entries on the left and right side of the
screen to filter to requests matching that entry. Click on the filter
description to remove the filter.
Interactive keyboard commands:
(C) Displays Logstalgia logo
(N) Jump forward in time to next log entry
(+-) Adjust simulation speed
(<>) Adjust pitch speed
(F5) Reload config
(F6) Load config (Windows only)
(F11) Window frame toggle
(F12) Screenshot
(Alt+Enter) Fullscreen toggle
(Ctrl+S) Save config
(Home/End) Adjust address summarizer maximum depth
(Page Up/Down) Adjust group summarizer maximum depth
(Ctrl+Home/End) Adjust address summarizer abbreviation depth
(Ctrl+Page Up/Down) Adjust group summarizer abbreviation depth
(ESC) Quit
4. Copyright
============
Logstalgia - web server access log visualization
Copyright (C) 2008 Andrew Caudwell <acaudwell@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.