~ubuntu-branches/ubuntu/edgy/awstats/edgy

« back to all changes in this revision

Viewing changes to docs/awstats_faq.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2005-02-05 17:13:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050205171348-h8uy32bhbcnhciie
Tags: 6.3-1
* New upstream release. Closes: bug#293702, #293668 (thanks to Nelson
  A. de Oliveira <naoliv@biolinux.df.ibilce.unesp.br>).
  + Includes upstream fix for security bug fixed in 6.2-1.1.
  + Includes upstream fix for most of security bug fixed in 6.2-1.1.
* Acknowledge NMUs. Closes: bug#291064, #294488 (thanks to Martin
  Schulze <joey@infodrom.org>, Martin Pitt <mpitt@debian.org>, Ubuntu,
  Joey Hess <joeyh@debian.org>, Frank Lichtenheld <djpig@debian.org> and Steve
  Langasek <vorlon@debian.org>).
* Include patch for last parts of security bug fixed in 6.2-1.1:
  01_sanitize_more.patch.
* Patch (02) to include snapshot of recent development:
  + Fix security hole that allowed a user to read log file content
    even when plugin rawlog was not enabled.
  + Fix a possible use of AWStats for a DoS attack.
  + configdir option was broken on windows servers.
  + DebugMessages is by default set to 0 for security reasons.
  + Minor fixes.
* References:
  CAN-2005-0435 - read server logs via loadplugin and pluginmode
  CAN-2005-0436 - code injection via PluginMode
  CAN-2005-0437 - directory traversal via loadplugin
  CAN-2005-0438 - information leak via debug

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
<meta name="title" content="AWStats Documentation - FAQs">
8
8
<title>AWStats Documentation - FAQs</title>
9
9
<link rel="stylesheet" href="styles.css" type="text/css">
10
 
<!-- $Revision: 1.136 $ - $Author: eldy $ - $Date: 2004/01/25 15:32:43 $ -->
 
10
<!-- $Revision: 1.155 $ - $Author: eldy $ - $Date: 2005/01/15 23:30:52 $ -->
11
11
</head>
12
12
 
13
13
<body topmargin=10 leftmargin=5>
20
20
<td bgcolor=#9999cc align=center><a href="/"><img src="images/awstats_logo4.png" border=0></a></td>
21
21
<td bgcolor=#9999cc align=center>
22
22
<br>
23
 
<font style="font: 16pt arial,helvetica,sanserif" color=#EEEEFF><b>AWStats logfile analyzer 6.0 Documentation</b></font><br>
 
23
<font style="font: 16pt arial,helvetica,sans-serif" color=#EEEEFF><b>AWStats logfile analyzer 6.3 Documentation</b></font><br>
24
24
<br>
25
25
</td>
26
26
<td bgcolor=#9999cc align=center>
31
31
</table>
32
32
 
33
33
 
34
 
<br><br><H1 style="font: 26px arial,helvetica,sanserif">Frequently Asked Questions + Troubleshooting</H1>
 
34
<br><br><H1 style="font: 26px arial,helvetica,sans-serif">Frequently Asked Questions + Troubleshooting</H1>
35
35
 
36
36
 
37
37
<br>
39
39
<ul>
40
40
FAQ-ABO100 <a href="#SERVERSOS">Which server log files or operating systems are supported ?</a><br>
41
41
FAQ-ABO150 <a href="#LOGFORMAT">Which log format can AWStats analyze ?</a><br>
42
 
FAQ-ABO200 <a href="#LANG">Which languages are available ?</a><br>
 
42
FAQ-ABO200 <a href="#LANG">Which languages are available ? How to add my own language ?</a><br>
43
43
FAQ-ABO250 <a href="#PHPNUKE">Can AWStats be integrated with PHP Nuke ?</a><br>
44
44
</ul>
45
45
<br>
49
49
<ul>
50
50
FAQ-COM025 <a href="#NOLOG">How to use AWStats with no server log</a><br>
51
51
FAQ-COM050 <a href="#LIMITLOG">What is the log size limit AWStats can analyze ?</a><br>
52
 
FAQ-COM090 <a href="#FTP">Setup for FTP server log files.</a><br>
 
52
FAQ-COM090 <a href="#FTP">Setup for FTP server log files (proftpd, vsftpd, ...).</a><br>
53
53
FAQ-COM100 <a href="#MAIL">Setup for MAIL log files (Postfix, Sendmail, QMail, MDaemon, Exchange).</a><br>
54
54
FAQ-COM110 <a href="#MEDIASERVER">Setup for MEDIA SERVER log files (Realmedia, Windows media, Darwin streaming server).</a><br>
55
55
FAQ-COM120 <a href="#ROTATE">How to rotate my logs without loosing data.</a><br>
61
61
FAQ-COM250 <a href="#DIFFERENT_RESULTS">Different results than other log analyzers (Analog, Webalizer, WUsage, wwwStats...).</a><br>
62
62
FAQ-COM300 <a href="#DIFFERENCE_HOURS">Difference between local hour and AWStats reported hour.</a><br>
63
63
FAQ-COM350 <a href="#OLDLOG">How can I process old log file ?</a><br>
64
 
FAQ-COM400 <a href="#MULTILOG">How can I update my statistics when I use a load balancing system that splits my logs ?</a><br>
 
64
FAQ-COM360 <a href="#MULTILOG">How can I process several log files in one run ?</a><br>
 
65
FAQ-COM400 <a href="#LOADLOG">How can I update my statistics when I use a load balancing system that splits my logs ?</a><br>
65
66
FAQ-COM500 <a href="#RESET">How can I reset all my statistics ?</a><br>
66
67
FAQ-COM600 <a href="#DAILY">How can I compile and build statistics on a daily basis only ?</a><br>
67
68
FAQ-COM700 <a href="#EDITHISTORY">Can I safely remove a line in AWStats history files (awstatsMMYYYY*.txt) ?</a><br>
83
84
FAQ-SET300 <a href="#COULDNOTOPEN">Error "Couldn't open file ..."</a><br>
84
85
FAQ-SET320 <a href="#MALFORMEDUTF8">Error "Malformed UTF-8 character (unexpected..."</a><br>
85
86
FAQ-SET350 <a href="#EMPTY_STATS">Empty or null statistics reported.</a><br>
 
87
FAQ-SET360 <a href="#PARTIAL_STATS">Statistics reported except for os, browsers, robots and keywords/keyphrases.</a><br>
86
88
FAQ-SET400 <a href="#REDIRECT">Pipe redirection to a file give me an empty file.</a><br>
87
89
FAQ-SET450 <a href="#NO_ICON">No pictures/graphics shown.</a><br>
88
90
FAQ-SET700 <a href="#MIGRATEDOUBLED">My visits are doubled for old month I migrated from 3.2 to 5.x</a><br>
 
91
FAQ-SET750 <a href="#OUTOFMEMORYCYGWIN">AWStats run out of memory during update process with cygwin Perl.</a><br>
89
92
FAQ-SET800 <a href="#SPEED">AWStats speed/timeout problems.</a><br>
90
93
</ul>
91
94
<br>
115
118
Examples of used platforms (bold means 'tested by author', others were reported by AWStats users to work correctly) :<br>
116
119
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
117
120
<u>OS:</u><br>
118
 
<b>Windows 2000</b>, <b>Windows NT 4.0</b>, Windows Me, <b>Linux (RedHat, Mandrake, Debian, Suse...)</b>, Macintosh, <b>Solaris</b>, <b>Aix</b>, BeOS, ...<br>
 
121
<b>Windows 2000</b>, <b>Windows NT 4.0</b>, Windows Me, <b>Linux (RedHat, Mandrake, Debian, Suse...)</b>, Macintosh, <b>Solaris</b>, <b>Aix</b>, BeOS, FreeBSD, ...<br>
119
122
<u>Web/Wap/Proxy/Streaming servers</u><br>
120
123
<b>Apache 1.3.x and 2.x</b>, <b>IIS 5.0 and 6.0</b>, WebStar, WebLogic, WebSite, <b>Windows Media Server</b>, Tomcat, <b>Squid</b>,
121
124
Sambar, Roxen, Resin, RealMedia server, Oracle9iAS, <b>Lotus Notes/Domino</b>, Darwin, IPlanet, IceCast, ZeroBrand, Zeus, Zope, Abyss...<br>
122
125
<u>FTP servers</u><br>
123
 
<b>ProFTP</b>, ...<br>
 
126
<b>ProFTPd</b>, vsFTPd...<br>
124
127
<u>Mails servers</u><br>
125
128
<b>Postfix</b>, <b>Sendmail</b>, QMail, <b>Mdaemon</b>, www4mail, ...<br>
126
129
<u>Perl interpreters (all Perl >= 5.005):</u><br>
143
146
Any IIS log format (known as W3C format),<br>
144
147
Webstar native log format,<br>
145
148
Realmedia server, Windows Media Server, Darwin streaming server,<br>
146
 
ProFTP server,<br>
 
149
ProFTPd server, vsFTPd server,<br>
147
150
Postfix, Sendmail, QMail, Mdaemon<br>
148
151
A lot of web/wap/proxy/streaming servers log format<br>
149
152
<br>
159
162
 
160
163
<a name="LANG"></a><br>
161
164
<b><u>FAQ-ABO200 : WHICH LANGUAGES ARE AVAILABLE ?</u></b><br>
162
 
AWStats can make reports in 39 languages. This is a list of all of them, for last version, in
163
 
alphabetical order (with the code you can use for <a href="awstats_config.html#Lang">Lang</a>
164
 
and <a href="awstats_config.html#ShowFlagLinks">ShowFlagLinks</a> parameter) :<br>
 
165
AWStats can make reports in 40 languages. This is a list of all of them, for last version, in
 
166
alphabetical order (The code you can use for <a href="awstats_config.html#Lang">Lang</a>
 
167
and <a href="awstats_config.html#ShowFlagLinks">ShowFlagLinks</a> parameter are 
 
168
the ISO-639-1 language codes):<br>
165
169
<i>
166
170
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
167
171
Albanian=al, Bosnian=ba, Bulgarian=bg, Catalan=ca,
171
175
Icelandic=is, Indonesian=id, Italian=it, Japanese=jp, Korean=kr,
172
176
Latvian=lv, Norwegian (Nynorsk)=nn, Norwegian (Bokmal)=nb, Polish=pl,
173
177
Portuguese=pt, Portuguese (Brazilian)=br, Romanian=ro, Russian=ru,
174
 
Serbian=sr, Slovak=sk,  Spanish=es, Swedish=se, Turkish=tr, Ukrainian=ua,
175
 
Welsh=wlk.
 
178
Serbian=sr, Slovak=sk, Solvenian=si, Spanish=es, Swedish=se, Thai=th,
 
179
Turkish=tr, Ukrainian=ua, Welsh=cy.
176
180
</td></tr></table>
177
181
</i>
178
182
However, AWStats documentation is only provided in English.<br>
179
183
But, you may find small documentation for other languages made by contributors on
180
184
<a href="http://awstats.sourceforge.net/awstats_contrib.html#DOC">Documentation Contrib page</a>.<br>
181
185
<br>
 
186
If your language is not in this list, you can translate it yourself. For this, find what is your
 
187
2 letter language code: <a href="http://www.oasis-open.org/cover/iso639a.html">here</a>.<br>
 
188
Once, you get it, for example "gl" for Galician, copy the file awstats-en.txt into awstats-<i>gl</i>.txt,
 
189
in langs directory and translate every sentences inside. You can do same for files inside
 
190
tooltips_f, tooltips_m and tooltips_w sub-directories. Then send your translated file(s) to eldy@users.sourceforge.net.<br>
 
191
<br>
182
192
 
183
193
<a name="PHPNUKE"></a><br>
184
194
<b><u>FAQ-ABO250 : CAN AWSTATS BE INTEGRATED WITH PHP NUKE ?</u></b><br>
185
 
I don't know any plan to make an Add-On for PHPNuke to include AWStats, for the moment.
186
 
But this can change. You should ask to have a such Add-On to PHPNuke authors, and on PHPNuke forums.<br>
 
195
The only plugin I know to integrate AWStats inside PHPNuke is here: <a href="http://phpnuke.org/modules.php?name=News&file=article&sid=7041">PhpNuke addon for AWStats</a><br>
187
196
<br>
188
197
 
189
198
 
222
231
<br>
223
232
 
224
233
<a name="FTP"></a><br>
225
 
<b><u>FAQ-COM090 : SETUP FOR FTP SERVER LOG FILES</u></b><br>
 
234
<b><u>FAQ-COM090 : SETUP FOR FTP SERVER LOG FILES (proftpd, vsftpd, ...)</u></b><br>
226
235
<font class=CProblem>PROBLEM:</font><br>
227
 
What do I have to do to use AWStats to analyze some FTP server log files.<br>
 
236
What do I have to do to use AWStats to analyze some FTP server log files ?<br>
228
237
<font class=CSolution>SOLUTION:</font><br>
229
238
AWStats can be used with some FTP server log files.<br>
230
239
<br>
231
 
1- Setup your FTP log file format:<br>
232
 
<br>
233
 
With ProFTP, modify the proftpd.conf file to add the following two lines :
 
240
<u>With ProFTPd</u>:<br>
 
241
<br>
 
242
1- Setup your server log file format:<br>
 
243
<br>
 
244
Modify the proftpd.conf file to add the following two lines :
234
245
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
235
246
<!--<br>With ProFTPd 1.2.2:-->
236
247
<i>LogFormat awstats "%t %h %u %m %f %s %b"</i> &nbsp; &nbsp; # WARNING: You must use a tab char between % tags and not a space !
251
262
<br>
252
263
2- Then setup AWStats to analyze the FTP log file:<br>
253
264
<br>
254
 
Copy config awstats.model.conf file to "awstats.proftp.conf".<br>
 
265
Copy config file "awstats.model.conf" to "awstats.ftp.conf".<br>
255
266
Modify this new config file:
256
267
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
257
268
<i>
294
305
<br>
295
306
Now you can use AWStats as usual (run the update process and read statistics).<br>
296
307
<br>
 
308
<br>
 
309
<u>With vsFTPd, or any FTP server that log with xferlog format</u>:<br>
 
310
<br>
 
311
1- Check your server log file format:<br>
 
312
<br>
 
313
Take a look at your FTP server log file. You must have a format that match the following example to
 
314
use this FAQ :<br>
 
315
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
 
316
<i>Wed Jan 01 19:29:35 2001 1 192.168.1.1 102 /home/file1.txt b _ o r username ftp 0 * c</i>
 
317
</td></tr></table>
 
318
<br>
 
319
2- Then setup AWStats to analyze the FTP log file:<br>
 
320
<br>
 
321
If your FTP log file format looks good, copy config file "awstats.model.conf" to "awstats.ftp.conf".<br>
 
322
Modify this new config file:
 
323
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
 
324
<i>
 
325
LogFile="/var/log/xferlog"
 
326
<br>LogType=F
 
327
<br>LogFormat="%time3 %other %host %bytesd %url %other %other %method %other %logname %other %code %other %other"
 
328
<br>LogSeparator="\s"
 
329
<br>NotPageList=""
 
330
<br>LevelForBrowsersDetection=0
 
331
<br>LevelForOSDetection=0
 
332
<br>LevelForRefererAnalyze=0
 
333
<br>LevelForRobotsDetection=0
 
334
<br>LevelForWormsDetection=0
 
335
<br>LevelForSearchEnginesDetection=0
 
336
<br>ShowLinksOnUrl=0
 
337
<br>ShowMenu=1
 
338
<br>ShowMonthStats=UVHB
 
339
<br>ShowDaysOfMonthStats=HB
 
340
<br>ShowDaysOfWeekStats=HB
 
341
<br>ShowHoursStats=HB
 
342
<br>ShowDomainsStats=HB
 
343
<br>ShowHostsStats=HBL
 
344
<br>ShowAuthenticatedUsers=HBL
 
345
<br>ShowRobotsStats=0
 
346
<br>ShowEMailSenders=0
 
347
<br>ShowEMailReceivers=0
 
348
<br>ShowSessionsStats=1
 
349
<br>ShowPagesStats=PBEX
 
350
<br>ShowFileTypesStats=HB
 
351
<br>ShowFileSizesStats=0
 
352
<br>ShowBrowsersStats=0
 
353
<br>ShowOSStats=0
 
354
<br>ShowOriginStats=0
 
355
<br>ShowKeyphrasesStats=0
 
356
<br>ShowKeywordsStats=0
 
357
<br>ShowMiscStats=0
 
358
<br>ShowHTTPErrorsStats=0
 
359
<br>ShowSMTPErrorsStats=0
 
360
</i></td></tr></table>
 
361
<br>
 
362
Now you can use AWStats as usual (run the update process and read statistics).<br>
 
363
<br>
 
364
 
297
365
 
298
366
<a name="MAIL"></a><br>
299
 
<b><u>FAQ-COM100 : SETUP FOR MAIL LOG FILES (POSTFIX, SENDMAIL, QMAIL, MDAEMON, EXCHANGE...)</u></b><br>
 
367
<b><u>FAQ-COM100 : SETUP FOR MAIL LOG FILES (Postfix, Sendmail, Qmail, MDaemon, Exchange...)</u></b><br>
300
368
<font class=CProblem>PROBLEM:</font><br>
301
 
What do I have to do to use AWStats to analyze my mail log files.<br>
 
369
What do I have to do to use AWStats to analyze my mail log files ?<br>
302
370
<font class=CSolution>SOLUTION:</font><br>
303
371
<br>
304
372
This tip works with AWStats 5.5 or higher.<br>
310
378
For this, copy config <i>"awstats.model.conf"</i> file to <i>"awstats.mail.conf"</i>.<br>
311
379
Modify this new config file:
312
380
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
313
 
For standard Postfix, Sendmail, MDaemon and standard QMail logfiles, set<br>
314
 
<i>
315
 
LogFile="perl /path/to/maillogconvert.pl standard &lt; /pathtomaillog/maillog |"<br>
316
 
</i>
317
 
If the logfiles are compressed, they can be processed this way<br>
318
 
<i>
319
 
LogFile="gzip -cd /var/log/maillog.0.gz | /path/to/maillogconvert.pl standard |"<br>
320
 
</i>
321
 
And for VAdmin QMail logfiles (multi-host/virtualhost mail servers running vadmin software), set<br>
322
 
<i>
323
 
LogFile="perl /path/to/maillogconvert.pl vadmin &lt; /pathtomaillog/maillog |"<br>
 
381
For standard Postfix, Sendmail, MDaemon and standard QMail logfiles, set<br>
 
382
<i>
 
383
LogFile="perl /path/to/maillogconvert.pl standard &lt; /pathtomaillog/maillog |"<br>
 
384
</i>
 
385
If the logfiles are compressed, they can be processed this way<br>
 
386
<i>
 
387
LogFile="gzip -cd /var/log/maillog.0.gz | /path/to/maillogconvert.pl standard |"<br>
 
388
</i>
 
389
And for VAdmin QMail logfiles (multi-host/virtualhost mail servers running vadmin software), set<br>
 
390
<i>
 
391
LogFile="perl /path/to/maillogconvert.pl vadmin &lt; /pathtomaillog/maillog |"<br>
324
392
</i>
325
393
Then, whatever is you mail server, you must also change:
326
394
<i>
342
410
<br>ShowHostsStats=HBL
343
411
<br>ShowAuthenticatedUsers=0
344
412
<br>ShowRobotsStats=0
345
 
<br>ShowEMailSenders=HBL
346
 
<br>ShowEMailReceivers=HBL
 
413
<br>ShowEMailSenders=HBML
 
414
<br>ShowEMailReceivers=HBML
347
415
<br>ShowSessionsStats=0
348
416
<br>ShowPagesStats=0
349
417
<br>ShowFileTypesStats=0
370
438
Despite the high number of possible log format provided with Exchange,
371
439
none of them is built enough seriously to offer an interseting analyze (missing informations,
372
440
messy data, no id to join multiple records for same mail, etc...).
373
 
For this reason, an "interesting" log analysis is a joke with Exchange log files (No data is
374
 
better than false data). So forget using AWStats or use a more serious mail server (sendmail,
375
 
postfix, qmail, mdaemon, ...). Sorry.<br>
376
 
<!--
377
 
Your Exchange mail log file might looks like this:<br>
378
 
<i>2002-9-29    0:3:2 GMT       -       -       -       S_EXCHANG01     -       /O=INVESTMENT SCORECARD INC/OU=MAIL/CN=RECIPIENTS/CN=KJOHNSON   1027    1640EF7202084243942C5EC620117D376B68AA@s_exchang01.investmentscorecard.com      0       0       1943    2       2002-9-29 0:3:2 GMT     0       -       c=US;a= ;p=Investment Score;l=S_EXCHANG01-020929000302Z-2583    Dev Request Late Notification: KS_CM00004271    EX:/O=INVESTMENT SCORECARD INC/OU=MAIL/CN=RECIPIENTS/CN=CLEARQUEST(KS_CM)       -</i><br>
379
 
Copy config awstats.model.conf file to "awstats.mail.conf".<br>
 
441
For this reason, an "exact" log analysis is a joke with Exchange log files.
 
442
However a little support is provided. In order to analyze Exchange traffic, you have to
 
443
enable "Message Tracking" (see article http://support.microsoft.com/default.aspx?scid=kb;EN-US;246856).<br>
 
444
Then copy config awstats.model.conf file to "awstats.mail.conf".<br>
380
445
Modify this new config file:
 
446
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
381
447
<i>
382
 
<br>LogFile="yourmaillogfilename"
383
 
<br>LogFormat="%time2 %other %host %other %other %other %email %method %other %url %code %bytesd %other %other %other %other %other %other %email_r"
384
 
<br>LogSeparator="\t"
385
 
-->
 
448
LogType=M
 
449
<br>LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"
 
450
<br>LevelForBrowsersDetection=0
 
451
<br>LevelForOSDetection=0
 
452
<br>LevelForRefererAnalyze=0
 
453
<br>LevelForRobotsDetection=0
 
454
<br>LevelForWormsDetection=0
 
455
<br>LevelForSearchEnginesDetection=0
 
456
<br>LevelForFileTypesDetection=0
 
457
<br>ShowMenu=1
 
458
<br>ShowMonthStats=HB
 
459
<br>ShowDaysOfMonthStats=HB
 
460
<br>ShowDaysOfWeekStats=HB
 
461
<br>ShowHoursStats=HB
 
462
<br>ShowDomainsStats=0
 
463
<br>ShowHostsStats=HBL
 
464
<br>ShowAuthenticatedUsers=0
 
465
<br>ShowRobotsStats=0
 
466
<br>ShowEMailSenders=HBML
 
467
<br>ShowEMailReceivers=HBML
 
468
<br>ShowSessionsStats=0
 
469
<br>ShowPagesStats=0
 
470
<br>ShowFileTypesStats=0
 
471
<br>ShowFileSizesStats=0
 
472
<br>ShowBrowsersStats=0
 
473
<br>ShowOSStats=0
 
474
<br>ShowOriginStats=0
 
475
<br>ShowKeyphrasesStats=0
 
476
<br>ShowKeywordsStats=0
 
477
<br>ShowMiscStats=0
 
478
<br>ShowHTTPErrorsStats=0
 
479
<br>ShowSMTPErrorsStats=1
 
480
<br>
 
481
</i>
 
482
</td></tr></table>
 
483
<br>
 
484
Also don't forget that with Exchange, informations in a log analyses can't be exact.
 
485
Do not send any questions or requests for using AWStats with Exchange, this is not a problem in
 
486
AWStats and we have no time to support non opened products.<br>
 
487
If you want to have complete and accurate information with Exchange, forget using AWStats or use a
 
488
more serious mail serveur (Postfix, Sendmail, QMail...)<br>
386
489
<br>
387
490
 
388
491
<a name="MEDIASERVER"></a><br>
389
 
<b><u>FAQ-COM110 : SETUP FOR A MEDIA SERVER (REALMEDIA, WINDOWS MEDIA SERVER)</u></b><br>
 
492
<b><u>FAQ-COM110 : SETUP FOR A MEDIA SERVER (REALMEDIA, WINDOWS MEDIA SERVER, DARWIN STREAMING SERVER)</u></b><br>
390
493
<font class=CProblem>PROBLEM:</font><br>
391
494
What do I have to do to use AWStats to analyze my Media Server log files.<br>
392
495
<font class=CSolution>SOLUTION:</font><br>
535
638
<b><u>FAQ-COM120 : HOW TO ROTATE MY LOGS WITHOUT LOOSING DATA</u></b><br>
536
639
<font class=CProblem>PROBLEM:</font><br>
537
640
I want to archive/rotate my logs using my server system (for example logrotate) options or a third
538
 
software (rotatelog, cronolog) but I don't want to loose any visits information during the rotate
 
641
software (rotatelog, cronolog) but I don't want to lose any visits information during the rotate
539
642
process.<br>
540
643
<font class=CSolution>SOLUTION:</font><br>
541
644
<li> If your config file is setup with a <a href="awstats_config.html#LogFile">LogFile</a> parameter
547
650
edit the logrotate config file used for your web server log file (usually stored in /etc/logrotate.d
548
651
directory) by adding the AWStats update process as a preprocessor command, like this example (bold
549
652
lines are lines to add for having a prerotate process):<br><i>
550
 
/usr/local/apache/logs/*log<br>
551
 
{<br>
552
 
notifempty<br>
553
 
daily<br>
554
 
rotate 7<br>
555
 
compress<br>
 
653
/usr/local/apache/logs/*log<br>
 
654
{<br>
 
655
notifempty<br>
 
656
daily<br>
 
657
rotate 7<br>
 
658
compress<br>
556
659
<b>
557
 
sharedscripts<br>
558
 
prerotate<br>
559
 
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=mydomainconfig<br>
560
 
endscript<br>
 
660
sharedscripts<br>
 
661
prerotate<br>
 
662
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=mydomainconfig<br>
 
663
endscript<br>
561
664
</b>
562
 
postrotate<br>
563
 
/usr/bin/killall -HUP httpd<br>
564
 
endscript<br>
 
665
postrotate<br>
 
666
/usr/bin/killall -HUP httpd<br>
 
667
endscript<br>
565
668
}<br>
566
669
</i>
567
670
<br>
582
685
</table>
583
686
<br>
584
687
The advantage of this solution is that it is a very common way of working, used by a lot of
585
 
products, and easy to setup. You will notice that you can "loose" some hits:<br>
586
 
If you use the -HUP signal, you will only loose all hits that were written during D and E.
 
688
products, and easy to setup. You will notice that you can "lose" some hits:<br>
 
689
If you use the -HUP signal, you will only lose all hits that were written during D and E.
587
690
Note that you will also break all requests still running at G. In the example, it's a 
588
691
1 minute lost (for small or medium web sites, it will be less than few seconds), so this
589
692
give you an error less than 0.07% (less for small web sites). This is not significant,
590
693
above all for a "statistics" progam.<br>
591
 
If you use the -USR1 signal, you will not kill any request. But you will loose all hits that
 
694
If you use the -USR1 signal, you will not kill any request. But you will lose all hits that
592
695
were wrote during D and E (like with -HUP) but also all hits that are still running after H
593
696
(all very long request that requires several minutes to be served). If hit ends during I, it is
594
697
wrote in a log file already analyzed, if hit ends at K, it is wrote nowhere. In the example,
619
722
The problem with that is that your data are refreshed only after a rotate has done. However,
620
723
you will miss absolutely nothing (no hits) and your server processes are never killed.<br>
621
724
<br>
622
 
<li> So, if you really want to not loose absolutely no hit and want to have updates more
 
725
<li> So, if you really want to not lose absolutely no hit and want to have updates more
623
726
frequently than the rotate frequency, the best way is still an hybrid solution (i am not sure
624
727
that it worth the pain, and remember that statistics are only statistics):<br>
625
728
You run the awstats update process from you crontab frequently, every hour for example, and half and hour
709
812
can set <a href="awstats_config.html#DNSLookup">DNSLookup</a>=0 in AWStats config file.
710
813
If you prefer, you can make the reverse DNS lookup on a log file before running
711
814
your log analyzer (If you only need to convert a logfile with IP Addresses into a
712
 
logfile with resolved hostnames). You can use for this <a href="awstats_config.html#logresolvemerge">logresolvemerge</a> tool
 
815
logfile with resolved hostnames). You can use for this <a href="awstats_tools.html#logresolvemerge">logresolvemerge</a> tool
713
816
provided with AWStats distribution (This tools is an improved version of <i>logresolve</i> provided with Apache).<br>
714
817
<br>
715
818
 
769
872
log files but that are only one page "viewed".<br>
770
873
Etc...<br>
771
874
<br>
772
 
If you want to check how serious is your log analyzer, try to parse the following log file:<br>
 
875
If you want to check how serious is your log analyzer, try to parse the following log file.
 
876
It's a very common log file but results will show you how bad are most log analyzers (above
 
877
all commercial products):<br>
773
878
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
774
879
<i><font style="font: 8px verdana,arial,helvetica">
775
 
<br># This is a sample of log file that contains a lot of various data we can find
776
 
<br># in a log file. Great sample to test reliability and accuracy of any log
777
 
<br># analyzer.
778
 
<br># ----------------------------------------------------------------------------
779
 
<br># This sample log file contains 10 differents IPs that are :
780
 
<br># 6 human visits done, by 5 different true visitors
781
 
<br># 1 proxy visit done, by one of the 5 true visitors
782
 
<br># 1 try of a 6th human visit failed because of wrong url
783
 
<br># 1 bot visit
784
 
<br># 1 worm attack
785
 
<br># 1 add to favourites (two hits but first is non root hit with error)
786
 
<br># ----------------------------------------------------------------------------
787
 
<br># 80.8.55.1     2 visits (start at 00:00:00 and at 12:00:00 with both entry page on /)
788
 
<br># 80.8.55.2     this is not a visit, only an image included into a page of an other site
789
 
<br># 80.8.55.3     1 visit (and add home page to favourites)
790
 
<br># 80.8.55.4     same visitor than 80.8.55.3 using aol proxy
791
 
<br># 80.8.55.5     not a visit (but a bot indexing)
792
 
<br># 80.8.55.6     1 visit (authenticated visitor)
793
 
<br># 80.8.55.7     1 visit (authenticated visitor with space in name)
794
 
<br># 80.8.55.8     not a visit (try but failed twice with 404 and 405 error)
795
 
<br># 80.8.55.9     not a visit (but a worm attack)
796
 
<br># 80.8.55.10    1 visit that come from web page not search engines
797
 
<br># TOTAL:
798
 
<br>
799
 
<br>80.8.55.1 - - [01/Jan/2001:00:00:10 +0100] "GET /page1.html HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
800
 
<br>80.8.55.1 - - [01/Jan/2001:00:00:00 +0100] "GET / HTTP/1.0" 200 7009 "http://www.sitereferer/cgi-bin/search.pl?q=a" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
801
 
<br>80.8.55.1 - - [01/Jan/2001:00:00:20 +0100] "GET /page2.cgi HTTP/1.0" 200 7009 "http://localhost/page1.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
802
 
<br>80.8.55.1 - - [01/Jan/2001:00:00:25 +0100] "GET /page3 HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
803
 
<br>80.8.55.1 - - [01/Jan/2001:00:00:30 +0100] "GET /image.gif HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
804
 
<br>80.8.55.1 - - [01/Jan/2001:00:00:35 +0100] "GET /image2.png HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
805
 
<br>80.8.55.1 - - [01/Jan/2001:00:00:40 +0100] "GET /dir/favicon.ico HTTP/1.0" 404 299 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
806
 
<br>80.8.55.1 - - [01/Jan/2001:00:00:40 +0100] "GET /favicon.ico HTTP/1.0" 200 299 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
807
 
<br>80.8.55.1 - - [01/Jan/2001:12:00:00 +0100] "GET / HTTP/1.0" 200 7009 "http://WWW.SiteRefereR:80/cgi-bin/azerty.pl?q=a" "Mozilla/4.7 [fr] (Win95; I)"
808
 
<br>80.8.55.1 - - [01/Jan/2001:12:00:10 +0100] "GET /page1.html HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
809
 
<br>80.8.55.1 - - [01/Jan/2001:12:00:20 +0100] "GET /page2.cgi HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
810
 
<br>80.8.55.1 - - [01/Jan/2001:12:00:25 +0100] "GET /page3 HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
811
 
<br>80.8.55.1 - - [01/Jan/2001:12:00:30 +0100] "GET /image.gif HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
812
 
<br>80.8.55.1 - - [01/Jan/2001:12:00:35 +0100] "GET /image2.png HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
813
 
<br>80.8.55.1 - - [01/Jan/2001:12:00:40 +0100] "GET /js/awstats_misc_tracker.js HTTP/1.1" 200 4998 "-" "Mozilla/4.7 [fr] (Win95; I)"
814
 
<br>80.8.55.1 - - [01/Jan/2001:12:00:45 +0100] "GET /js/awstats_misc_tracker.js?SCREEN=1024x768&CDI=32&JAVA=true&UC=UserCode1056710428488r6832&SC=SessionCode1056710428488r6832&SHK=N&FLA=Y&RP=N&MOV=N&WMA=Y&PDF=Y HTTP/1.1" 200 4998 "-" "Mozilla/4.7 [fr] (Win95; I)"
815
 
<br>
816
 
<br>80.8.55.2 - - [01/Jan/2001:12:01:00 +0100] "GET /hitfromothersitetoimage.gif HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312"
817
 
<br>
818
 
<br>80.8.55.3 - - [01/Jan/2001:12:01:10 +0100] "GET / HTTP/1.0" 200 7009 "http://www.sitereferer:81/cgi-bin/azerty.pl" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
819
 
<br>80.8.55.3 - - [01/Jan/2001:12:01:15 +0100] "GET /page1.html HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
820
 
<br>80.8.55.3 - - [01/Jan/2001:12:01:20 +0100] "GET /page2.cgi?x=a&family=a&y=b&familx=x HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
821
 
<br>80.8.55.3 - - [01/Jan/2001:12:01:25 +0100] "GET /page3 HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
822
 
<br>80.8.55.3 - - [01/Jan/2001:12:01:30 +0100] "GET /image.gif HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
823
 
<br>80.8.55.3 - - [01/Jan/2001:12:01:35 +0100] "GET /image2.png HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
824
 
<br>
825
 
<br>80.8.55.4 - - [01/Jan/2001:12:01:45 +0100] "GET /samevisitorthan80.8.55.3usingaolproxy.gif HTTP/1.0" 200 7009 "-" "Mozilla/3.0 (Windows 98; U) Opera 6.03"
826
 
<br>
827
 
<br>80.8.55.5 - - [01/Jan/2001:12:02:00 +0200] "GET /robots.txt HTTP/1.0" 200 299 "-" "GoogleBot"
828
 
<br>80.8.55.5 - - [01/Jan/2001:12:02:05 +0200] "GET / HTTP/1.0" 200 7009 "-" "GoogleBot"
829
 
<br>
830
 
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /cgi-bin/order.cgi?x=a&family=a&productId=998&titi=i&y=b&y=b HTTP/1.0" 200 7009 "http://www.google.com/search?sourceid=navclient&ie=utf-8&oe=utf-8&q=ma%C3%AEtre" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
831
 
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /cgi-bin/order.cgi?x=a&family=a&productId=998&titi=i&y=b&y=b HTTP/1.0" 200 7009 "http://www.google.com/search?sourceid=navclient&ie=utf-8&oe=utf-8&q=�l�ve" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
832
 
<br>
833
 
<br>80.8.55.7 - John Begood [01/Jan/2001:13:01:00 +0100] "GET /cgi-bin/order.cgi;family=f&type=t&productId=999&titi=i#BIS HTTP/1.0" 200 7009 "-" "Mozilla/3.01 (compatible;)"
834
 
<br>
835
 
<br>80.8.55.8 - - [01/Jan/2001:14:01:20 +0100] "GET /404notfoundpage.html?paramnotpagefound=valparamnotpagefound HTTP/1.0" 404 0 "http://refererto404nofoundpage/pageswithbadlink.html?paramrefnotpagefound=valparamrefnotpagefound" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
836
 
<br>80.8.55.8 - - [01/Jan/2001:14:01:20 +0100] "GET /405error.html HTTP/1.0" 405 0 "http://refererto405error/pagesfrom405.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
837
 
<br>
838
 
<br>80.8.55.9 - - [01/Jan/2001:15:00:00 +0200] "GET /default.ida?XXXXXXXXXXXXXXXXXX%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u0000%u00=a  HTTP/1.0" 404 299 "-" "-"
839
 
<br>
840
 
<br>80.8.55.10 - - [01/Jan/2001:16:00:00 -0300] "GET / HTTP/1.1" 200 70476 "http://us.f109.mail.yahoo.com/ym/ShowLetter?box=Inbox&MoreYahooParams..." "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.2.8.0)"
841
 
<br>80.8.55.10 - - [01/Jan/2001:17:00:00 -0300] "GET /page1.html HTTP/1.1" 200 70476 "http://www.freeweb.hu/icecat/filmek/film04.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.2.8.0)"
842
 
<br>80.8.55.10 - - [01/Jan/2001:18:00:00 -0300] "GET /cgi-bin/awredir.pl?url=http://xxx.com/aa.html HTTP/1.1" 302 70476 "http://us.f109.mail.yahoo.com/ym/ShowLetter?box=Inbox&MoreYahooParams..." "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.2.8.0)"
 
880
<br># This is a sample of log file that contains a lot of various data we can find
 
881
<br># in a log file. Great sample to test reliability and accuracy of any log
 
882
<br># analyzer.
 
883
<br># ----------------------------------------------------------------------------
 
884
<br># This sample log file contains 10 differents IPs that are :
 
885
<br># 6 human visits, done by 5 different true visitors
 
886
<br># 1 proxy visit, done by one of the 5 true visitors
 
887
<br># 1 try of a 6th human visit failed because of wrong url (He saw nothing)
 
888
<br># 1 bot visit to index your site
 
889
<br># 1 worm attack
 
890
<br># 1 add to favourites (two hits but first is non root hit with error meaning it's same "add")
 
891
<br># ----------------------------------------------------------------------------
 
892
<br># 80.8.55.1     2 visits (start at 00:00:00 and at 12:00:00 with both entry page on /)
 
893
<br># 80.8.55.2     this is not a visit, only an image included into a page of an other site
 
894
<br># 80.8.55.3     1 visit (and add home page to favourites)
 
895
<br># 80.8.55.4     same visitor than 80.8.55.3 using aol proxy
 
896
<br># 80.8.55.5     not a visit (but a bot indexing)
 
897
<br># 80.8.55.6     1 visit (authenticated visitor)
 
898
<br># 80.8.55.7     1 visit (authenticated visitor with space in name)
 
899
<br># 80.8.55.8     not a visit (try but failed twice with 404 and 405 error)
 
900
<br># 80.8.55.9     not a visit (but a worm attack)
 
901
<br># 80.8.55.10    1 visit that come from a web page that is not a search engine
 
902
<br>
 
903
<br>80.8.55.1 - - [01/Jan/2001:00:00:10 +0100] "GET /page1.html HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
904
<br>80.8.55.1 - - [01/Jan/2001:00:00:00 +0100] "GET / HTTP/1.0" 200 7009 "http://www.sitereferer/cgi-bin/search.pl?q=a" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
905
<br>80.8.55.1 - - [01/Jan/2001:00:00:20 +0100] "GET /page2.cgi HTTP/1.0" 200 7009 "http://localhost/page1.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
906
<br>80.8.55.1 - - [01/Jan/2001:00:00:25 +0100] "GET /page3 HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
907
<br>80.8.55.1 - - [01/Jan/2001:00:00:30 +0100] "GET /image.gif HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
908
<br>80.8.55.1 - - [01/Jan/2001:00:00:35 +0100] "GET /image2.png HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
909
<br>80.8.55.1 - - [01/Jan/2001:00:00:40 +0100] "GET /dir/favicon.ico HTTP/1.0" 404 299 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
910
<br>80.8.55.1 - - [01/Jan/2001:00:00:40 +0100] "GET /favicon.ico HTTP/1.0" 200 299 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
911
<br>80.8.55.1 - - [01/Jan/2001:12:00:00 +0100] "GET / HTTP/1.0" 200 7009 "http://WWW.SiteRefereR:80/cgi-bin/azerty.pl?q=a" "Mozilla/4.7 [fr] (Win95; I)"
 
912
<br>80.8.55.1 - - [01/Jan/2001:12:00:10 +0100] "GET /page1.html HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
 
913
<br>80.8.55.1 - - [01/Jan/2001:12:00:20 +0100] "GET /page2.cgi HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
 
914
<br>80.8.55.1 - - [01/Jan/2001:12:00:25 +0100] "GET /page3 HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
 
915
<br>80.8.55.1 - - [01/Jan/2001:12:00:30 +0100] "GET /image.gif HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
 
916
<br>80.8.55.1 - - [01/Jan/2001:12:00:35 +0100] "GET /image2.png HTTP/1.0" 200 7009 "-" "Mozilla/4.7 [fr] (Win95; I)"
 
917
<br>80.8.55.1 - - [01/Jan/2001:12:00:40 +0100] "GET /js/awstats_misc_tracker.js HTTP/1.1" 200 4998 "-" "Mozilla/4.7 [fr] (Win95; I)"
 
918
<br>80.8.55.1 - - [01/Jan/2001:12:00:45 +0100] "GET /js/awstats_misc_tracker.js?SCREEN=1024x768&CDI=32&JAVA=true&UC=UserCode1056710428488r6832&SC=SessionCode1056710428488r6832&SHK=N&FLA=Y&RP=N&MOV=N&WMA=Y&PDF=Y HTTP/1.1" 200 4998 "-" "Mozilla/4.7 [fr] (Win95; I)"
 
919
<br>
 
920
<br>80.8.55.2 - - [01/Jan/2001:12:01:00 +0100] "GET /hitfromothersitetoimage.gif HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312"
 
921
<br>
 
922
<br>80.8.55.3 - - [01/Jan/2001:12:01:10 +0100] "GET / HTTP/1.0" 200 7009 "http://www.sitereferer:81/cgi-bin/azerty.pl" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
 
923
<br>80.8.55.3 - - [01/Jan/2001:12:01:15 +0100] "GET /page1.html HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
 
924
<br>80.8.55.3 - - [01/Jan/2001:12:01:20 +0100] "GET /page2.cgi?x=a&family=a&y=b&familx=x HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
 
925
<br>80.8.55.3 - - [01/Jan/2001:12:01:25 +0100] "GET /page3 HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
 
926
<br>80.8.55.3 - - [01/Jan/2001:12:01:30 +0100] "GET /image.gif HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
 
927
<br>80.8.55.3 - - [01/Jan/2001:12:01:35 +0100] "GET /image2.png HTTP/1.0" 200 7009 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1"
 
928
<br>
 
929
<br>80.8.55.4 - - [01/Jan/2001:12:01:45 +0100] "GET /samevisitorthan80.8.55.3usingaolproxy.gif HTTP/1.0" 200 7009 "-" "Mozilla/3.0 (Windows 98; U) Opera 6.03"
 
930
<br>
 
931
<br>80.8.55.5 - - [01/Jan/2001:12:02:00 +0200] "GET /robots.txt HTTP/1.0" 200 299 "-" "GoogleBot"
 
932
<br>80.8.55.5 - - [01/Jan/2001:12:02:05 +0200] "GET / HTTP/1.0" 200 7009 "-" "GoogleBot"
 
933
<br>
 
934
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /cgi-bin/order.cgi?x=a&family=a&productId=998&titi=i&y=b&y=b HTTP/1.0" 200 7009 "http://www.google.com/search?sourceid=navclient&ie=utf-8&oe=utf-8&q=ma%C3%AEtre" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
 
935
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /cgi-bin/order.cgi?x=a&family=a&productId=998&titi=i&y=b&y=b HTTP/1.0" 200 7009 "http://www.google.com/search?sourceid=navclient&ie=utf-8&oe=utf-8&q=�l�ve" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
 
936
<br>
 
937
<br>80.8.55.7 - John Begood [01/Jan/2001:13:01:00 +0100] "GET /cgi-bin/order.cgi;family=f&type=t&productId=999&titi=i#BIS HTTP/1.0" 200 7009 "-" "Mozilla/3.01 (compatible;)"
 
938
<br>
 
939
<br>80.8.55.8 - - [01/Jan/2001:14:01:20 +0100] "GET /404notfoundpage.html?paramnotpagefound=valparamnotpagefound HTTP/1.0" 404 0 "http://refererto404nofoundpage/pageswithbadlink.html?paramrefnotpagefound=valparamrefnotpagefound" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
940
<br>80.8.55.8 - - [01/Jan/2001:14:01:20 +0100] "GET /405error.html HTTP/1.0" 405 0 "http://refererto405error/pagesfrom405.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
 
941
<br>
 
942
<br>80.8.55.9 - - [01/Jan/2001:15:00:00 +0200] "GET /default.ida?XXXXXXXXXXXXXXXXXX%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u0000%u00=a  HTTP/1.0" 404 299 "-" "-"
 
943
<br>
 
944
<br>80.8.55.10 - - [01/Jan/2001:16:00:00 -0300] "GET / HTTP/1.1" 200 70476 "http://us.f109.mail.yahoo.com/ym/ShowLetter?box=Inbox&MoreYahooParams..." "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.2.8.0)"
 
945
<br>80.8.55.10 - - [01/Jan/2001:17:00:00 -0300] "GET /page1.html HTTP/1.1" 200 70476 "http://www.freeweb.hu/icecat/filmek/film04.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.2.8.0)"
 
946
<br>80.8.55.10 - - [01/Jan/2001:18:00:00 -0300] "GET /cgi-bin/awredir.pl?url=http://xxx.com/aa.html HTTP/1.1" 302 70476 "http://us.f109.mail.yahoo.com/ym/ShowLetter?box=Inbox&MoreYahooParams..." "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.2.8.0)"
843
947
</i>
844
948
</td></tr></table><br>
845
949
<u>This is what you should find:</u><br>
846
950
6 true human visits<br>
847
951
5 different true visitors<br>
848
 
1 bot visit<br>
849
 
1 worm attack<br>
 
952
1 bot visit<br>
 
953
1 worm attack<br>
850
954
The entry pages for true visits should be "/" (even for 80.8.55.1) or "/cgi-bin/order.cgi" but nothing else.<br>
851
 
 
 
955
Note: I did not find any commercial log analyzer that can deal such a common log file correctly, so if you find, let me know !<br>
852
956
<br>
853
957
 
854
958
<a name="DIFFERENCE_HOURS"></a><br>
878
982
<br>
879
983
 
880
984
<a name="OLDLOG"></a><br>
881
 
<b><u>FAQ-COM350 : HOW CAN I PROCESS OLD LOG FILE ?</u></b><br>
 
985
<b><u>FAQ-COM350 : HOW CAN I PROCESS AN OLD LOG FILE ?</u></b><br>
882
986
<font class=CProblem>PROBLEM:</font><br>
883
987
I want to process an old log file to include its data in my AWStats reports.<br>
884
988
<font class=CSolution>SOLUTION:</font><br>
885
989
You must change your <a href="awstats_config.html#LogFile">LogFile</a> parameter to point to the old log file and run
886
 
the update (or use the -logfile option on command line to overwrite <a href="awstats_config.html#LogFile">LogFile</a> parameter).
 
990
the update (or use the -LogFile option on command line to overwrite <a href="awstats_config.html#LogFile">LogFile</a> parameter).
887
991
The update process can only accept files in chronological order for a particular month, so if you
888
992
have already processed a recent file and forgot to run update
889
993
on a log file that contains older data, you must before reset all
906
1010
<br>
907
1011
 
908
1012
<a name="MULTILOG"></a><br>
 
1013
<b><u>FAQ-COM360 : HOW CAN I PROCESS SEVERAL LOG FILES IN ONE RUN ?</u></b><br>
 
1014
<font class=CProblem>PROBLEM:</font><br>
 
1015
How can I update my statistics for several log file, in one run ?<br>
 
1016
<font class=CSolution>SOLUTION:</font><br>
 
1017
A solution should be to setup your config file with something like:<br>
 
1018
<i>LogFile=mylog*.log</i><br>
 
1019
However, with such a syntax, AWStats can't know in wich order processing log files (wich log file is the first, next or last). So
 
1020
to work like this you must use the following syntax:<br>
 
1021
<i>LogFile="/pathto/logresolvemerge.pl mylog*.log |"</i><br>
 
1022
<a href="awstats_tools.html#logresolvemerge">Logresolvemerge</a> is a tool provided with
 
1023
AWStats (in tools directory) that merge several log files on the fly sending line by line always the older record
 
1024
from a list of several log files. Using such a tool as a pipe source for AWStats <a href="awstats_config.html#LogFile">LogFile</a>
 
1025
parameter is a very good solution because, it allows you to merge log files whatever their size
 
1026
with no memory use, no hard disk use (no temporary files built), it is fast, it prevents
 
1027
you from a bad order if your log files are not correctly ordered, etc...<br>
 
1028
This tool can also be used to process log files from load balanced systems (see <a href="awstats_faq.html#LOADLOG">FAQ-COM400</a>)<br>
 
1029
<br>
 
1030
 
 
1031
<a name="LOADLOG"></a><br>
909
1032
<b><u>FAQ-COM400 : HOW CAN I UPDATE MY STATISTICS WHEN I USE A LOAD BALANCING SYSTEM THAT SPLITS MY LOGS ?</u></b><br>
910
1033
<font class=CProblem>PROBLEM:</font><br>
911
1034
How can I update my statistics when i use a load balancing system that split my logs ?<br>
912
1035
<font class=CSolution>SOLUTION:</font><br>
913
 
The best solution is to merge all split log files resulted from all your load balanced servers into one. For this, you can use
914
 
the <a href="awstats_config.html#logresolvemerge">logresolvemerge</a> tool provided with AWStats :<br>
 
1036
First solution is to merge all split log files resulted from all your load balanced servers into one. For this, you can use
 
1037
the <a href="awstats_tools.html#logresolvemerge">logresolvemerge</a> tool provided with AWStats :<br>
915
1038
<i>logresolvemerge.pl file1.log file2.log ... filen.log > newfiletoprocess.log</i><br>
916
1039
And setup the <a href="awstats_config.html#LogFile">LogFile</a> parameter in your config file to process the <i>newfiletoprocess.log</i> file or use
917
 
the <i>-logfile</i> command line option to overwrite <a href="awstats_config.html#LogFile">LogFile</a> value.<br>
 
1040
the <i>-LogFile</i> command line option to overwrite <a href="awstats_config.html#LogFile">LogFile</a> value.<br>
 
1041
As an other solution, if you miss disk space, or to save time, you can ask <a href="awstats_tools.html#logresolvemerge">logresolvemerge</a>
 
1042
to merge log files on the fly during the AWStats update process. For this, you can use the following syntax in your AWStats config file:<br>
 
1043
<i>LogFile="/pathto/logresolvemerge.pl file*.log |"</i><br>
 
1044
See also <a href="awstats_faq.html#MULTILOG">FAQ-COM360</a> for explanation on logresolvemerge use.<br>
918
1045
<br>
919
1046
 
920
1047
<a name="RESET"></a><br>
937
1064
How can I compile and build statistics on a daily basis. I mean i want to have a full report
938
1065
with all charts with data for a particular day only and want one report for each day of month.<br>
939
1066
<font class=CSolution>SOLUTION:</font><br>
940
 
This is an non documented and not supported trick, as this is not the standard way of working:<br>
 
1067
This is an non documented and not supported trick, as this is not the standard way of working:<br>
941
1068
First, run the update process at midnight (or on a log file that was rotated at midnight so that
942
1069
it contains only data for this particular day (you can choose another hour in night if you want
943
1070
to have days that "start" at an different hour).<br>
947
1074
Note that the name has been changed by adding the day. Repeat this each day after the update process.<br>
948
1075
With this you will have one history file for each day. You can then see full stats for
949
1076
a particular day by adding the non documented parameter -day=DD on command line (with others
950
 
like -month=MM and -year=YYYY). If ran from a browser you can also add &day=DD on URL.<br>
 
1077
like -month=MM and -year=YYYY). If ran from a browser you can also add &day=DD on URL.<br>
951
1078
However, if you have full day by day statistics, you don't have anymore statistics for full month,
952
1079
except if you create a second config file that whose history files would not be moved.<br>
953
1080
<br>
1038
1165
And also at Apache.org<br>
1039
1166
<a href="http://www.apache.org/dist/httpd/binaries/win32/">http://www.apache.org/dist/httpd/binaries/win32/</a><br>
1040
1167
MS produced a Hotfix which is now included in SP1.<br>
 
1168
But the best solution is to use a better web browser. Take a look at <a href="http://www.mozilla.org/products/firefox/">Firefox</a>,
 
1169
one of the best and most popular web browser.<br>
1041
1170
<br>
1042
1171
 
1043
1172
<a name="PERSONALIZEDLOG"></a><br>
1080
1209
<u>If your log records are EXACTLY like this (<b>NCSA combined with 2 spaces between some fields</b> with <b>Zope</b>):</u><br>
1081
1210
<i>62.161.78.73 &nbsp;- - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 3904 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" (45)</i><br>
1082
1211
You must use : <i><br>
1083
 
LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"<br>
 
1212
LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"<br>
1084
1213
LogSeparator=" *"<br>
1085
1214
</i>
1086
1215
 
1138
1267
and <i>LogSeparator="\s+"</i><br>
1139
1268
 
1140
1269
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1141
 
<u>If you use a FTP server like <b>ProFTP</b>:</u><br>
 
1270
<u>If you use a FTP server like <b>ProFTPd</b>:</u><br>
1142
1271
See <a href="#FTP">FAQ-COM090</a>.<br>
1143
1272
</td></tr></table>
1144
1273
 
1183
1312
of log files.<br>
1184
1313
If this is because the date is invalid, you might have a problem of date not computed correctly
1185
1314
this it happens in some Pentium4/Xeon4 processors:<br>
1186
 
On some (few) Intel Pentium4 (also Xeon4) based host systems, log file time can not be computed
1187
 
correctly. This is not an issue of AWStats itself. This error usually occurs on source-based linux
1188
 
distributions (gentoo, slackware etc.), where all system libraries are compiled with CPU optimization.
1189
 
AWStats is a highly developed PERL application. PERL itself relies on some system libraries,
1190
 
for example GLIBC. The GLIBC library usually is buggy in this case. There is an easy way to figure
1191
 
out whether the problem described here is responsible for AWStats problems on your system:<br>
1192
 
If you have shell access to your machine, simply type the following command:<br>
1193
 
<i>perl -e "print int ('541234567891011165415658')"</i><br>
1194
 
(NOTE: any 25-digit number works, there is no need to type this exact number)<br>
1195
 
If everything goes fine, you should see a floating point number as output:<br>
1196
 
<i>5.41234567891011e+23</i><br>
1197
 
In this case, please do more research on your log file formats. Your host system itself is not
1198
 
responsible for the error.<br>
1199
 
But if simply a "0" returns or some other error, this is an indication of your glibc beeing corrupt.<br>
1200
 
ATTENTION: The only solution in this case might be to recompile your GLIBC. This can be a quite tricky
1201
 
task. Please consult the documentation and F.A.Q.s of your linux distribution first!! (experts: first
 
1315
On some (few) Intel Pentium4 (also Xeon4) based host systems, log file time can not be computed
 
1316
correctly. This is not an issue of AWStats itself. This error usually occurs on source-based linux
 
1317
distributions (gentoo, slackware etc.), where all system libraries are compiled with CPU optimization.
 
1318
AWStats is a highly developed PERL application. PERL itself relies on some system libraries,
 
1319
for example GLIBC. The GLIBC library usually is buggy in this case. There is an easy way to figure
 
1320
out whether the problem described here is responsible for AWStats problems on your system:<br>
 
1321
If you have shell access to your machine, simply type the following command:<br>
 
1322
<i>perl -e "print int ('541234567891011165415658')"</i><br>
 
1323
(NOTE: any 25-digit number works, there is no need to type this exact number)<br>
 
1324
If everything goes fine, you should see a floating point number as output:<br>
 
1325
<i>5.41234567891011e+23</i><br>
 
1326
In this case, please do more research on your log file formats. Your host system itself is not
 
1327
responsible for the error.<br>
 
1328
But if simply a "0" returns or some other error, this is an indication of your glibc beeing corrupt.<br>
 
1329
ATTENTION: The only solution in this case might be to recompile your GLIBC. This can be a quite tricky
 
1330
task. Please consult the documentation and F.A.Q.s of your linux distribution first!! (experts: first
1202
1331
check your global compile flags, eg. march=Pentium4. Trying with other compile flags can solve problem
1203
 
quickly in some cases.<br>
1204
 
NOTE: In some cases, this error might occour "suddenly", even though AWStats was already running
1205
 
perfect already.<br>
 
1332
quickly in some cases.<br>
 
1333
NOTE: In some cases, this error might occur "suddenly", even though AWStats was already running
 
1334
perfect already.<br>
1206
1335
<br> 
1207
1336
 
1208
1337
<a name="NOTSAMENUMBER"></a><br>
1258
1387
I don't know if RedHat provides a fix for this, but some users had reported that you can
1259
1388
remove thoose warmless messages by changing your LANG environment variable, removing
1260
1389
the ".UTF-8" at the end. For example, set <i>LANG="en_US"</i> instead of <i>LANG="en_US.UTF8"</i><br>
1261
 
 
1262
1390
<br>
1263
1391
 
1264
1392
<a name="EMPTY_STATS"></a><br>
1296
1424
It is better to use a config file called awstats.mydomain.conf).<br>
1297
1425
<br>
1298
1426
 
 
1427
<a name="PARTIAL_STATS"></a><br>
 
1428
<b><u>FAQ-SET360 : STATISTICS REPORTED EXCEPT FOR OS, BROWSERS, ROBOTS AND KEYWORDS/KEYPHRASES</u></b><br>
 
1429
<font class=CProblem>PROBLEM:</font><br>
 
1430
AWStats seems to report my statistics however some charts, like robots, os', browsers, search engines,
 
1431
or keywords/keyphrases are empty.<br>
 
1432
<font class=CSolution>SOLUTION:</font><br>
 
1433
If only robots, search engines or keywords/keyphrases are empty, this simply means your web site was not
 
1434
yet visited by any robots and noone found your site using a search engines (this happens particularly
 
1435
for Intranet which are not referenced on search engines).
 
1436
If all of them are empty or with only unknown values, even after several updates, this probably means
 
1437
that your logfile does not contains all informations, this happens with Apache when using the
 
1438
standard <i>"common"</i> log format instead of the standard <i>"combined"</i> log format.<br>
 
1439
You may also use LogFormat=4 into your AWStats config files instead of 1.<br>
 
1440
Read AWStats setup documentation to known how to setup your Apache Web server to report logs in
 
1441
a "combined" log format then set <a href="awstats_config.html#LogFormat">LogFormat</a>=1 into your
 
1442
AWStats config file.<br>
 
1443
<br>
 
1444
 
1299
1445
<a name="REDIRECT"></a><br>
1300
1446
<b><u>FAQ-SET400 : PIPE REDIRECTION TO A FILE GIVE ME AN EMPTY FILE</u></b><br>
1301
1447
<font class=CProblem>PROBLEM:</font><br>
1351
1497
one such line) and then run the migrate process again on the file.<br>
1352
1498
<br>
1353
1499
 
 
1500
<a name="OUTOFMEMORYCYGWIN"></a><br>
 
1501
<b><u>FAQ-SET750 : AWSTATS RUN OUT OF MEMORY DURING UPDATE PROCESS WITH CYGWIN PERL</u></b><br>
 
1502
<font class=CProblem>PROBLEM:</font><br>
 
1503
When I run the update process on a large log file with cygwin Perl, AWStats run out of memory
 
1504
but I am sure that I have enough memory to run AWStats according to the 'memory' column in
 
1505
benchmark chart available in AWStats documentation (<a href="awstats_benchmark.html">benchmark page</a>).<br>
 
1506
<font class=CSolution>SOLUTION:</font><br>
 
1507
It might be a limit inside Cygwin Perl.
 
1508
Try to increase the Cygwin parameter <i>heap_chunk_in_mb</i>.<br>
 
1509
<br>
 
1510
 
1354
1511
<a name="SPEED"></a><br>
1355
1512
<b><u>FAQ-SET800 : AWSTATS SPEED/TIMEOUT PROBLEMS ?</u></b><br>
1356
1513
<font class=CProblem>PROBLEM:</font><br>
1400
1557
URL is generated by the infected robot and the purpose is to exploit a vulnerability of the web server (In most cases, only IIS is vulnerable).
1401
1558
With such attacks, you will will always find a 'common string' in those URLs.
1402
1559
For example, with Code Red worm, there is always default.ida in the URL string. Some other worms send URLs with cmd.exe in it.<br>
1403
 
With 6.0 version and higher, you can set the <a href="awstats_config.html#LevelFor">LevelForFormDetection</a>
 
1560
With 6.0 version and higher, you can set the <a href="awstats_config.html#LevelFor">LevelForWormsDetection</a>
1404
1561
parameter to "2" and <a href="awstats_config.html#Show">ShowWormsStats</a> to "HBL" in 
1405
1562
config file to enable the worm filtering nd reporting.<br>
1406
1563
However, this feature reduce seriously AWStats speed and the worms database (lib/worms.pm file) can't contain
1413
1570
<hr>
1414
1571
 
1415
1572
<script language=javascript>
1416
 
        var date='$Date: 2004/01/25 15:32:43 $';
 
1573
        var date='$Date: 2005/01/15 23:30:52 $';
1417
1574
        document.writeln("Last revision: "+date);
1418
1575
</script>
1419
1576