52
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
FAQ-COM120 <a href="#ROTATE">How to rotate my logs without loosing data.</a><br>
55
FAQ-COM115 <a href="#PERSONALIZEDLOG">Setup/Examples for LogFormat parameter.</a><br>
56
FAQ-COM120 <a href="#ROTATE">How to rotate my logs without losing data.</a><br>
56
57
FAQ-COM130 <a href="#CRONTAB">How to run AWStats frequently ?</a><br>
57
58
FAQ-COM140 <a href="#EXCLUDEHOSTS">How to exclude my IP address (or whole subnet mask) from stats ?</a><br>
59
FAQ-COM142 <a href="#SCREENSIZE">How to get the screen size and browser capabilities report working ?</a><br>
58
60
FAQ-COM145 <a href="#EXTRA">How to use the Extra Sections features ?</a><br>
59
61
FAQ-COM150 <a href="#BENCHMARK">Benchmark question.</a><br>
60
62
FAQ-COM200 <a href="#DNS">How reverse DNS Lookup works, unresolved IP Addresses ?</a><br>
61
63
FAQ-COM250 <a href="#DIFFERENT_RESULTS">Different results than other log analyzers (Analog, Webalizer, WUsage, wwwStats...).</a><br>
62
64
FAQ-COM300 <a href="#DIFFERENCE_HOURS">Difference between local hour and AWStats reported hour.</a><br>
65
FAQ-COM320 <a href="#GEOIPEU">What does mean "eu (European country)" in GeoIP country reports.</a><br>
63
66
FAQ-COM350 <a href="#OLDLOG">How can I process old log file ?</a><br>
64
67
FAQ-COM360 <a href="#MULTILOG">How can I process several log files in one run ?</a><br>
65
68
FAQ-COM400 <a href="#LOADLOG">How can I update my statistics when I use a load balancing system that splits my logs ?</a><br>
115
117
<li> Most of all others Web/Wap/Proxy/Streaming servers.<br>
116
118
<li> Some FTP, Syslog or Mail log files.<br>
117
119
Because AWStats is in Perl, it can works on all Operating Systems.<br>
118
121
Examples of used platforms (bold means 'tested by author', others were reported by AWStats users to work correctly) :<br>
119
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
122
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
121
124
<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>
122
125
<u>Web/Wap/Proxy/Streaming servers</u><br>
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>,
126
<b>Apache 1.3.x and 2.x</b>, <b>IIS 5.0 or higher</b>, ISA, WebStar, WebLogic, WebSite, <b>Windows Media Server</b>, Tomcat, <b>Squid</b>,
124
127
Sambar, Roxen, Resin, RealMedia server, Oracle9iAS, <b>Lotus Notes/Domino</b>, Darwin, IPlanet, IceCast, ZeroBrand, Zeus, Zope, Abyss...<br>
125
128
<u>FTP servers</u><br>
126
129
<b>ProFTPd</b>, vsFTPd...<br>
149
152
ProFTPd server, vsFTPd server,<br>
150
153
Postfix, Sendmail, QMail, Mdaemon<br>
151
154
A lot of web/wap/proxy/streaming servers log format<br>
153
Note*: Apache common log format (AWStats can now analyze such log files but such log files does not
157
*Note: Apache common log format (AWStats can now analyze such log files but such log files does not
154
158
contain all information AWStats is looking for. The problem is in the content, not in the
155
159
format). I think analyzing common log files is not interesting because there is a lot of
156
160
missing information: no way to filter robots, find search engines, keywords, os, browser.
157
161
But a lot of users asked me for it, so AWStats support it.
158
162
However, a lot of interesting advanced features can't work: browsers, os's, keywords, robot detection...).
160
164
See also <a href="#PERSONALIZEDLOG">F.A.Q.: LOG FORMAT SETUP OR ERRORS </a>.<br>
163
167
<a name="LANG"></a><br>
164
168
<b><u>FAQ-ABO200 : WHICH LANGUAGES ARE AVAILABLE ?</u></b><br>
165
AWStats can make reports in 40 languages. This is a list of all of them, for last version, in
169
AWStats can make reports in 41 languages. This is a list of all of them, for last version, in
166
170
alphabetical order (The code you can use for <a href="awstats_config.html#Lang">Lang</a>
167
171
and <a href="awstats_config.html#ShowFlagLinks">ShowFlagLinks</a> parameter are
168
172
the ISO-639-1 language codes):<br>
170
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
174
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
171
175
Albanian=al, Bosnian=ba, Bulgarian=bg, Catalan=ca,
172
Chinese (Taiwan)=tw, Chinese (Simpliefied)=cn, Czech=cz, Danish=dk,
173
Dutch=nl, English=en, Estonian=et, Euskara=eu, Finnish=fi,
176
Chinese (Taiwan)=tw, Chinese (Simpliefied)=cn, Croatian=hr, Czech=cz,
177
Danish=dk, Dutch=nl, English=en, Estonian=et, Euskara=eu, Finnish=fi,
174
178
French=fr, Galician=gl, German=de, Greek=gr, Hebrew=he, Hungarian=hu,
175
Icelandic=is, Indonesian=id, Italian=it, Japanese=jp, Korean=kr,
179
Icelandic=is, Indonesian=id, Italian=it, Japanese=jp, Korean=ko,
176
180
Latvian=lv, Norwegian (Nynorsk)=nn, Norwegian (Bokmal)=nb, Polish=pl,
177
181
Portuguese=pt, Portuguese (Brazilian)=br, Romanian=ro, Russian=ru,
178
182
Serbian=sr, Slovak=sk, Solvenian=si, Spanish=es, Swedish=se, Thai=th,
242
251
1- Setup your server log file format:<br>
244
253
Modify the proftpd.conf file to add the following two lines :
245
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
254
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
246
255
<!--<br>With ProFTPd 1.2.2:-->
247
<i>LogFormat awstats "%t %h %u %m %f %s %b"</i> # WARNING: You must use a tab char between % tags and not a space !
248
<i><br>ExtendedLog /var/log/xferlog read,write awstats</i> # WARNING: ExtendedLog directive might need to be placed inside a virtual host context if you use them.
256
LogFormat awstats "%t %h %u %m %f %s %b"</i> # WARNING: You must use a tab char between % tags and not a space !
257
<br>ExtendedLog /var/log/xferlog read,write awstats</i> # WARNING: ExtendedLog directive might need to be placed inside a virtual host context if you use them.
249
258
<!--<br>With ProFTPd 1.2.6:
250
259
<i><br>LogFormat awstats ""${%F %H-%M-%S}t %h %u %m %F %s %b"</i> # WARNING: You must use a tab char between % tags and not a space !
251
260
<i><br>ExtendedLog /var/log/xferlog read,write awstats</i> # WARNING: ExtendedLog directive might need to be placed inside a virtual host context if you use them.
253
262
</td></tr></table>
254
264
Then turn off old format Transfer log:
255
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
256
<i>TransferLog none</i> # WARNING: TransferLog directive might need to be placed inside a virtual host context if you use them.
265
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
266
TransferLog none # WARNING: TransferLog directive might need to be placed inside a virtual host context if you use them.
257
267
</td></tr></table>
259
269
To have the change effective, stop your server, remove old log file /var/log/xferlog and restart the server.<br>
260
270
Download a file by FTP and check that your new log file looks like this:<br>
261
<i>[01/Jan/2001:21:49:57 +0200] ftp.server.com user RETR /home/fileiget.txt 226 1499</i><br>
271
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
272
[01/Jan/2001:21:49:57 +0200] ftp.server.com user RETR /home/fileiget.txt 226 1499
263
275
2- Then setup AWStats to analyze the FTP log file:<br>
265
277
Copy config file "awstats.model.conf" to "awstats.ftp.conf".<br>
266
278
Modify this new config file:
267
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
279
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
269
280
LogFile="/var/log/xferlog"
271
282
<br>LogFormat="%time1 %host %logname %method %url %code %bytesd"
379
389
into AWStats <i>tools</i> directory, but you can use the one of your choice):<br>
380
390
For this, copy config <i>"awstats.model.conf"</i> file to <i>"awstats.mail.conf"</i>.<br>
381
391
Modify this new config file:
382
<table width="95%" border=1 cellpadding=0 cellspacing=0><tr class=CFAQ><td class=CFAQ>
383
392
For standard Postfix, Sendmail, MDaemon and standard QMail logfiles, set<br>
385
LogFile="perl /path/to/maillogconvert.pl standard < /pathtomaillog/maillog |"<br>
393
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
394
LogFile="perl /path/to/maillogconvert.pl standard < /pathtomaillog/maillog |"
387
396
If the logfiles are compressed, they can be processed this way<br>
397
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
389
398
LogFile="gzip -cd /var/log/maillog.0.gz | /path/to/maillogconvert.pl standard |"<br>
391
400
And for VAdmin QMail logfiles (multi-host/virtualhost mail servers running vadmin software), set<br>
401
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
393
402
LogFile="perl /path/to/maillogconvert.pl vadmin < /pathtomaillog/maillog |"<br>
395
405
Then, whatever is you mail server, you must also change:
406
<table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ>
398
408
<br>LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"
399
409
<br>LevelForBrowsersDetection=0
400
410
<br>LevelForOSDetection=0
634
636
<br>ShowMiscStats=0
635
637
<br>ShowHTTPErrorsStats=1
636
638
<br>ShowSMTPErrorsStats=0
641
Now you can use AWStats as usual (run the update process and read statistics).<br>
644
<a name="PERSONALIZEDLOG"></a><br>
645
<b><u>FAQ-COM115 : SETUP/EXAMPLES FOR LOGFORMAT PARAMETER</u></b><br>
646
<font class=CProblem>PROBLEM:</font><br>
647
Which value do I have to put in the LogFormat parameter to make AWStats working with my log
649
<font class=CSolution>SOLUTION:</font><br>
650
The AWStats config file give you all possible values for LogFormat parameter.
651
To help you, this is some common cases of log file format, and
652
the corresponding value for LogFormat you must use in your AWStats config file:<br>
654
<u>If your log records are EXACTLY like this (<b>NCSA combined/XLF/ELF</b> log format):</u><br>
655
<i>62.161.78.73 - - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
657
You must use : <i>LogFormat=1</i><br>
658
This is same than: <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"</i><br>
661
<u>If your log records are EXACTLY like this (<b>NCSA combined with several virtualhostname</b> sharing same log file).</u><br>
662
<i>virtualserver1 62.161.78.73 - - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
663
You must use : <i>LogFormat="%virtualname %host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"</i><br>
665
<u>If your log records are EXACTLY like this (<b>NCSA combined and mod_gzip format 1</b> with <b>Apache 1.x</b>):</u><br>
666
<i>62.161.78.73 - - [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)" mod_gzip: 66pct.</i><br>
667
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %other %gzipratio"</i><br>
670
<u>If your log records are EXACTLY like this (<b>NCSA combined and mod_gzip format 2</b> with <b>Apache 1.x</b>):</u><br>
671
<i>62.161.78.73 - - [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)" mod_gzip: DECHUNK:OK In:11393 Out:3904:66pct.</i><br>
672
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %other %other %gzipin %gzipout"</i><br>
674
<u>If your log records are EXACTLY like this (<b>NCSA combined and mod_deflate</b> with <b>Apache 2</b>):</u><br>
675
<i>62.161.78.73 - - [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>
676
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %deflateratio"</i><br>
679
<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>
680
<i>62.161.78.73 - - [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>
681
You must use : <i><br>
682
LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"<br>
683
LogSeparator=" *"<br>
640
Now you can use AWStats as usual (run the update process and read statistics).<br>
686
<u>If your log records are EXACTLY like this (<b>NCSA common CLF</b> log format):</u><br>
687
<i>62.161.78.73 - - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234</i><br>
688
You must use : <i>LogFormat=4</i><br>
689
Note: Browsers, OS's, Keywords and Referers features are not available with a such format.<br>
692
<u>If your log records are EXACTLY like this (With some <b>Squid</b> versions, after setting <i>emulate_http_log</i> to on):</u><br>
693
<i>200.135.30.181 - - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET http://www.mydomain.com/page.html HTTP/1.0" 200 456 TCP_CLIENT_REFRESH_MISS:DIRECT</i><br>
694
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %other"</i><br>
696
<u>If your log records are EXACTLY like this (Some old <b>IIS</b> W3C log format):</u><br>
697
<i>yyyy-mm-dd hh:mm:ss 62.161.78.73 - GET /page.html 200 1234 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) http://www.from.com/from.html</i><br>
698
You must use : <i>LogFormat=2</i><br>
701
<u>If your log records are EXACTLY like this (Some <b>IIS</b> W3C log format with some <b>.net</b> servers):</u><br>
702
<i>yyyy-mm-dd hh:mm:ss GET /page.html - 62.161.78.73 - Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) http://www.from.com/from.html 200 1234 HTTP/1.1</i><br>
703
You must use : <i>LogFormat=2 (or LogFormat="%time2 %method %url %logname %host %other %ua %referer %code %bytesd %other")</i><br>
705
<u>If your log records are EXACTLY like this (Some <b>IIS 6+</b> W3C log format):</u><br>
706
<i>yyyy-mm-dd hh:mm:ss GET /page.html - 62.161.78.73 - Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) http://www.from.com/from.html 200 1234</i><br>
707
You must use : <i>LogFormat=2 (or LogFormat="date time cs-method cs-uri-stem cs-username c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-bytes")</i><br>
710
<u>If your log records are EXACTLY like this (Some <b>ISA</b> W3C log format):</u><br>
711
<i>62.161.78.73, anonymous, Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1), N, 1/1/2001, 0:00:16, W3ReverseProxy, HCSERV2, -, www.host.be, 192.168.141.101, 80, 266, 406, 10042, http, TCP, GET, http://192.168.141.101/, text/html, Inet, 200, 0x42330010, -, -</i><br>
713
<i>LogFile="sed -e 's/, /\t/g' "/yourlogpath/yourlogfile.log" |"</i><br>
714
<i>LogFormat=2</i><br>
715
<i>LogSeparator=" "</i><br>
717
<u>If your log records are EXACTLY like this (With some <b>WebSite</b> versions):</u><br>
718
<i>yyyy-mm-dd hh:mm:ss 62.161.78.73 - 192.168.1.1 80 GET /page.html - 200 11205 0 0 HTTP/1.1 mydomain.com Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+98) - http://www.from.com/from.html</i><br>
719
You must use : <i>LogFormat="%time2 %host %logname %other %other %method %url %other %code %bytesd %other %other %other %other %ua %other %referer"</i><br>
722
<u>If your log records are EXACTLY like this (<b>Webstar</b> native log format):</u><br>
723
<i>05/21/00 00:17:31 OK 200 212.242.30.6 Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) http://www.cover.dk/ "www.cover.dk" :Documentation:graphics:starninelogo.white.gif 1133</i><br>
724
You must use : <i>LogFormat=3</i><br>
726
<u>If your log records are EXACTLY like this (With some <b>Lotus Notes/Domino</b> versions):</u><br>
727
<i>62.161.78.73 - Name Surname Service [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
728
You must use : <i>LogFormat=6</i><br>
731
<u>If your log records are EXACTLY like this (<b>Lotus Notes/Domino 6.x</b> log format):</u><br>
732
<i>62.161.78.73 - "Name Surname" Service [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
733
You must use : <i>LogFormat="%host %other %lognamequot %time1 %methodurl %code %bytesd %refererquot %uaquot"</i><br>
735
<u>If your log records are EXACTLY like this (With <b>Oracle9iAS</b>):</u><br>
736
<i>62.161.78.73 - [dd/mmm/yyyy:hh:mm:ss +0x00] GET /page.html HTTP/1.1 200 1234 - "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
737
Where separators are "tab" characters or several "spaces",
738
You must use : <i>LogFormat="%host %logname %time1 %method %url %other %code %bytesd %referer %uaquot"</i>
739
and <i>LogSeparator="\s+"</i><br>
742
<u>If you use a FTP server like <b>ProFTPd</b>:</u><br>
743
See <a href="#FTP">FAQ-COM090</a>.<br>
745
<u>If you want to analyze a mail log file (<b>Postfix</b>, <b>Sendmail</b>, <b>QMail</b>, <b>MDaemon</b>, <b>Exchange</b>):</u><br>
746
See <a href="#MAIL">FAQ-COM100</a>.<br>
749
<u>If you use a Media Server (<b>Realmedia</b>, <b>Windows Media Server</b>):</u><br>
750
See <a href="#MEDIASERVER">FAQ-COM110</a>.<br>
752
<u>If your log records are EXACTLY like this (With some providers):</u><br>
753
<i>62.161.78.73 - - [dd/Month/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" "-" 200 1234</i><br>
754
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %other %code %bytesd"</i><br>
755
Note: Browsers, OS's, Keywords and Referers features are not available with a such format.<br>
758
<u>There is a lot of other possible log formats.</u><br>
759
You must use a personalized log format LogFormat ="..." as described in config file to
760
support other various log formats.<br>
643
763
<a name="ROTATE"></a><br>
644
<b><u>FAQ-COM120 : HOW TO ROTATE MY LOGS WITHOUT LOOSING DATA</u></b><br>
764
<b><u>FAQ-COM120 : HOW TO ROTATE MY LOGS WITHOUT LOSING DATA</u></b><br>
645
765
<font class=CProblem>PROBLEM:</font><br>
646
766
I want to archive/rotate my logs using my server system (for example logrotate) options or a third
647
767
software (rotatelog, cronolog) but I don't want to lose any visits information during the rotate
672
793
/usr/bin/killall -HUP httpd<br>
677
798
If using a such solution, this is sequential steps that happens:<br>
678
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="100%" class=CFAQ>
679
<tr><td<b>Step</b></td><td><b>Description</b></td><td><b>Step name</b></td><td><b>Date/Time example</b></td></tr>
680
<tr valign=top><td>A</td><td>logrotate is started (by cron)</td><td>Start of logrotate</td><td>04:02:00</td></tr>
681
<tr valign=top><td>B</td><td><ul>awstats -update is launched by logrotate</td><td>Start of awstats</td><td>04:02:01</td><tr>
682
<tr valign=top><td>C</td><td><ul><ul>awstats start to read the log file <i>file.log</i></td><td> </td><td>04:02:02</td><tr>
683
<tr valign=top><td>D</td><td><ul>awstats has reached the end of log file so now it starts to save its database on disk.</td><td> </td><td>04:05:00</td><tr>
684
<tr valign=top><td>E</td><td><ul>awstats has finished to save its new database, so it stops</td><td>End of awstats</td><td>04:06:00</td><tr>
685
<tr valign=top><td>F</td><td>logrotate moves old log file <i>file.log</i> to a new name <i>file.log.sav</i>. Apache now logs in this file <i>file.log.sav</i> since log file handle has not been changed (only log file name has been renamed).</td><td>Log move</td><td>04:06:01</td><tr>
686
<tr valign=top><td>G</td><td>logrotate sends the -HUP or -USR1 signal to Apache.<br>With -HUP, Apache immediatly kills all its child process/thread, close log file <i>file.log.sav</i>, and reopen file <i>file.log</i>. So now, ALL hits are written to new file.<br>With -USR1, Apache only ask its child process/thread to stop only when HTTP request will be completely served. However it closes immediatly log file <i>file.log.sav</i>, and reopen file <i>file.log</i>. So only NEW hits are written to new log file. HTTP requests that are still running will write in old one.</td><td>Apache restart</td><td>04:06:02</td><tr>
687
<tr valign=top><td>H</td><td>logrotate starts compress the old log file <i>file.log.sav</i> into <i>file.log.gz</i></td><td>Start compress</td><td>04:06:03</td><tr>
688
<tr valign=top><td>I</td><td><ul>If some apache threads/processes are still running (because the kill sent was -USR1, so child process are waiting end of request before to stop), then those threads/processes are still writing to <i>file.log.sav</i>.<br>If kill -HUP was used, all process are already restarted so all writes in new <i>file.log</i>.</td><td> </td><td> </td><tr>
689
<tr valign=top><td>J</td><td>logrotate has finished to compress log file into <i>file.log.gz</i>. File <i>file.log.sav</i> is deleted.</td><td>End of compress<br>End of logrotate</td><td>04:07:03</td><tr>
690
<tr valign=top><td>K</td><td><ul>If signal was -USR1, some old childs can still run (when serving a very long request for example). So the log writing, still done in same file handle are going to a file that has been removed. So log writing are lost nowhere (this is only if -USR1 was used and if request was very long).</td><td> </td><td> </td><tr>
799
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ>
800
<tr class=CFAQ><td class=CFAQ><b>Step</b></td><td class=CFAQ><b>Description</b></td><td class=CFAQ><b>Step name</b></td><td class=CFAQ><b>Date/Time example</b></td></tr>
801
<tr class=CFAQ valign=top><td class=CFAQ>A</td><td class=CFAQ>logrotate is started (by cron)</td><td class=CFAQ>Start of logrotate</td><td class=CFAQ>04:02:00</td></tr>
802
<tr valign=top><td class=CFAQ>B</td><td class=CFAQ><ul>awstats -update is launched by logrotate</td><td class=CFAQ>Start of awstats</td><td class=CFAQ>04:02:01</td><tr>
803
<tr valign=top><td class=CFAQ>C</td><td class=CFAQ><ul><ul>awstats start to read the log file <i>file.log</i></td><td class=CFAQ> </td><td class=CFAQ>04:02:02</td><tr>
804
<tr valign=top><td class=CFAQ>D</td><td class=CFAQ><ul>awstats has reached the end of log file so now it starts to save its database on disk.</td><td class=CFAQ> </td><td class=CFAQ>04:05:00</td><tr>
805
<tr valign=top><td class=CFAQ>E</td><td class=CFAQ><ul>awstats has finished to save its new database, so it stops</td><td class=CFAQ>End of awstats</td><td class=CFAQ>04:06:00</td><tr>
806
<tr valign=top><td class=CFAQ>F</td><td class=CFAQ>logrotate moves old log file <i>file.log</i> to a new name <i>file.log.sav</i>. Apache now logs in this file <i>file.log.sav</i> since log file handle has not been changed (only log file name has been renamed).</td><td class=CFAQ>Log move</td><td class=CFAQ>04:06:01</td><tr>
807
<tr valign=top><td class=CFAQ>G</td><td class=CFAQ>logrotate sends the -HUP or -USR1 signal to Apache.<br>With -HUP, Apache immediatly kills all its child process/thread, close log file <i>file.log.sav</i>, and reopen file <i>file.log</i>. So now, ALL hits are written to new file.<br>With -USR1, Apache only ask its child process/thread to stop only when HTTP request will be completely served. However it closes immediatly log file <i>file.log.sav</i>, and reopen file <i>file.log</i>. So only NEW hits are written to new log file. HTTP requests that are still running will write in old one.</td><td class=CFAQ>Apache restart</td><td class=CFAQ>04:06:02</td><tr>
808
<tr valign=top><td class=CFAQ>H</td><td class=CFAQ>logrotate starts compress the old log file <i>file.log.sav</i> into <i>file.log.gz</i></td><td class=CFAQ>Start compress</td><td class=CFAQ>04:06:03</td><tr>
809
<tr valign=top><td class=CFAQ>I</td><td class=CFAQ><ul>If some apache threads/processes are still running (because the kill sent was -USR1, so child process are waiting end of request before to stop), then those threads/processes are still writing to <i>file.log.sav</i>.<br>If kill -HUP was used, all process are already restarted so all writes in new <i>file.log</i>.</td><td class=CFAQ> </td><td class=CFAQ> </td><tr>
810
<tr valign=top><td class=CFAQ>J</td><td class=CFAQ>logrotate has finished to compress log file into <i>file.log.gz</i>. File <i>file.log.sav</i> is deleted.</td><td class=CFAQ>End of compress<br>End of logrotate</td><td class=CFAQ>04:07:03</td><tr>
811
<tr valign=top><td class=CFAQ>K</td><td class=CFAQ><ul>If signal was -USR1, some old childs can still run (when serving a very long request for example). So the log writing, still done in same file handle are going to a file that has been removed. So log writing are lost nowhere (this is only if -USR1 was used and if request was very long).</td><td class=CFAQ> </td><td class=CFAQ> </td><tr>
693
814
The advantage of this solution is that it is a very common way of working, used by a lot of
755
878
The use of this tool is not an AWStats related problem, so please take a look at your Windows manual.
756
879
Warning, if you use <i>"awstats.pl -config=mysite -update"</i> in your scheduled task, you might
757
880
experience problem of failing task. Try this instead<br>
758
<i>"C:\WINNT\system32\CMD.EXE /C C:\[awstats_path]\awstats.pl -config=mysite -update"</i><br>
881
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
882
"C:\WINNT\system32\CMD.EXE /C C:\[awstats_path]\awstats.pl -config=mysite -update"
760
<i>"C:\[perl_path]\perl.exe C:\[awstats_path]\awstats.pl -config=mysite -update"</i><br>
761
A lot of other scheduler (sharewares/freewares) are very good.<br>
885
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
886
"C:\[perl_path]\perl.exe C:\[awstats_path]\awstats.pl -config=mysite -update"
888
A lot of other open source schedulers are often better (otherwise there is also good sharewares or freewares).<br>
763
890
<u>With unix-like operating systems</u>, you can use the "<b>crontab</b>".<br>
764
891
This is examples of lines you can add in the cron file (see your unix reference manual for cron) :<br>
765
892
To run update every day at 03:50, use :<br>
766
<i>50 3 * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -update >/dev/null</i><br>
893
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
894
50 3 * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -update >/dev/null<br>
767
896
To run update every hour, use :<br>
768
<i>0 * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -update >/dev/null</i><br>
897
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
898
0 * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -update >/dev/null<br>
771
902
<a name="EXCLUDEHOSTS"></a><br>
915
<a name="SCREENSIZE"></a><br>
916
<b><u>FAQ-COM142 : HOW TO GET THE SCREEN SIZE AND BROWSER CAPABILITIES REPORT WORKING ?</u></b><br>
917
<font class=CProblem>PROBLEM:</font><br>
918
I see in the AWStats features list that it can report the screen size used by visitors and also if its browser
919
support Flash, java, etc... How can I do that ?<br>
920
<font class=CSolution>SOLUTION:</font><br>
921
AWStats is a log analyzer, so to report the screen size of your visitor, we need to have information inside the log file.
922
For this, the only way to do that is to add some HTML tags inside some of your pages (the home page is enoough to
923
get screen size use ratios). This tag will add call to a javascript that ask your browser to call of an URL that
924
includes in its parameters, the screen size resolution and other informations about browser capabilities.<br>
926
This is the code you must add (at bottom of your home page for example) :<br>
927
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
928
<script language="javascript" type="text/javascript" src="/js/awstats_misc_tracker.js" ></script><br>
929
<noscript><img src="/js/awstats_misc_tracker.js?nojs=y" height="0" width="0" border="0" style="display: none"></noscript><br>
932
Note that you must also place the <i>awstats_misc_tracker.js</i> script (provided in /js directory with AWStats) inside
933
a js directory stored in your web root.<br>
934
Once this is done, load your home page with your browser and go to check that inside your log file
935
if you can see a line that looks like that:<br>
936
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
937
123.123.123.123 - - [24/Apr/2005:16:09:38 +0200] "GET /js/awstats_misc_tracker.js?screen=800x600&win=724x517&...&sid=awssession_id123 HTTP/1.1" 200 6237 "http://therefererwebsite.com/index.php" "Mozilla/5.0 (Linux) Gecko/20050414 Firefox/1.0.3"
940
If yes, you can then run the AWStats update process. Screen sizes information will be analyzed. All you have to do
941
now is to edit your config file to tell AWStats to add the report on html output. For this, change
942
the <a href="awstats_config.html#Show">ShowMiscStats</a> parameter.<br>
943
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
944
ShowMiscStats=anjdfrqwp
947
Note: If you change directory where <i>awstats_misc_tracker.js</i> is stored (somewhere else than the /js directory),
948
you must modify, according to your change:<br>
949
- the html tags added<br>
950
- the line: <i>var awstatsmisctrackerurl="/js/awstats_misc_tracker.js";</i> inside the awstats_misc_tracker.js script<br>
951
- the parameter <a href="awstats_config.html#MiscTrackerUrl">MiscTrackerUrl</a> inside AWStats configuration file.<br>
784
954
<a name="EXTRA"></a><br>
785
955
<b><u>FAQ-COM145 : HOW TO USE THE EXTRA SECTIONS FEATURES ?</u></b><br>
786
956
<font class=CProblem>PROBLEM:</font><br>
935
1110
<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"
1112
<br>80.8.55.5 - - [01/Jan/2001:12:02:00 +0200] "GET /robots.txt HTTP/1.0" 200 299 "-" "Unknown bot"
937
1113
<br>80.8.55.5 - - [01/Jan/2001:12:02:00 +0200] "GET /robots.txt HTTP/1.0" 200 299 "-" "GoogleBot"
938
<br>80.8.55.5 - - [01/Jan/2001:12:02:05 +0200] "GET / HTTP/1.0" 200 7009 "-" "GoogleBot"
940
<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)"
941
<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)"
943
<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;)"
1114
<br>80.8.55.5 - - [01/Jan/2001:12:02:05 +0200] "GET /page2.cgi HTTP/1.0" 200 7009 "-" "GoogleBot"
1116
<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+�l�ve" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
1117
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /images/image1.gif HTTP/1.0" 200 364 "http://www.google.fr/search?q=cache:dccTQ_Zn4isJ:www.chiensderace.com/cgi-bin/liste_annonces.pl%3FTYPE%3D5%26ORIGINE%3Dchiensderace+labrador+chiensderace&hl=en&lr=lang_en|lang_fr&ie=UTF-8" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
1118
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /images/image2.gif HTTP/1.0" 200 364 "http://www.google.fr/search?q=cache:dccTQ_Zn4isJ:www.chiensderace.com/cgi-bin/liste_annonces.pl%3FTYPE%3D5%26ORIGINE%3Dchiensderace+labrador+chiensderace&hl=en&lr=lang_en|lang_fr&ie=UTF-8" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
1119
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /images/image3.gif HTTP/1.0" 200 364 "http://www.google.fr/search?q=cache:dccTQ_Zn4isJ:www.chiensderace.com/cgi-bin/liste_annonces.pl%3FTYPE%3D5%26ORIGINE%3Dchiensderace+labrador+chiensderace&hl=en&lr=lang_en|lang_fr&ie=UTF-8" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
1120
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /images/image4.gif HTTP/1.0" 200 364 "http://www.google.fr/search?q=cache:dccTQ_Zn4isJ:www.chiensderace.com/cgi-bin/liste_annonces.pl%3FTYPE%3D5%26ORIGINE%3Dchiensderace+labrador+chiensderace&hl=en&lr=lang_en|lang_fr&ie=UTF-8" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
1121
<br>80.8.55.6 - john [01/Jan/2001:13:00:00 +0100] "GET /images/image5.gif HTTP/1.0" 200 364 "http://www.google.fr/search?q=cache:dccTQ_Zn4isJ:www.chiensderace.com/cgi-bin/liste_annonces.pl%3FTYPE%3D5%26ORIGINE%3Dchiensderace+labrador+chiensderace&hl=en&lr=lang_en|lang_fr&ie=UTF-8" "SAGEM-myX-5m/1.0_UP.Browser/6.1.0.6.1.103_(GUI)_MMP/1.0_(Google_WAP_Proxy/1.0)"
1123
<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 "http://www.a9.com/searchkeyfroma9" "Mozilla/3.01 (compatible;)"
1124
<br>80.8.55.7 - John Begood [01/Jan/2001:13:01:00 +0100] "GET /do/Show;jsessionid=6BEF030AB1677BEC333FFCC7BF4DF564?param=1477 HTTP/1.0" 200 7009 "-" "Mozilla/3.01 (compatible;)"
945
1126
<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)"
946
1127
<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)"
948
<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 "-" "-"
950
<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)"
951
<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)"
952
<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)"
1129
<br>80.8.55.9 - - [01/Jan/2001:15:00:00 +0200] "GET /default.ida?XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u0000%u00=a HTTP/1.0" 404 299 "-" "-"
1130
<br>80.8.55.9 - - [01/Jan/2001:15:00:00 +0200] "SEARCH / -" 411 - "-" "-"
1132
<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/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
1133
<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/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
1134
<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/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
1135
<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/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
1137
<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/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
1138
<br>80.8.55.10 - - [01/Jan/2001:16:30:00 -0300] "GET /page1.html HTTP/1.1" 200 70476 "http://www.freeweb.hu/icecat/filmek/film04.html" "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
1139
<br>80.8.55.10 - - [01/Jan/2001:17: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/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
954
1141
</td></tr></table><br>
955
1142
<u>This is what you should find:</u><br>
983
1170
So this means this way of working might never be changed, so another chance is to use the AWStats plugin 'timezone'.
984
1171
Warning, this plugin need the perl module Time::Local and it reduces seriously AWStats speed.<br>
985
1172
To enable the plugin, uncomment the following line in your config file.<br>
986
<i>LoadPlugin="timezone TZ"</i><br>
1173
<table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1174
LoadPlugin="timezone TZ"<br>
987
1176
where TZ is value of your signed timezone (+2 for Paris, -8 for ...)<br>
1179
<a name="GEOIPEU"></a><br>
1180
<b><u>FAQ-COM320 : WHAT DOES MEAN "EU" (EUROPEAN COUNTRY)" IN GEOIP COUNTRY REPORTS ?</u></b><br>
1181
<font class=CProblem>PROBLEM:</font><br>
1182
I use the <a href="awstats_contrib.html#geoip">AWStats GeoIp country plugins</a> to report countries according
1183
to geolocalisation of IP address.
1184
In country report, I have some visitors said to come from "eu (European country)". If this visitor
1185
come from France, does this means it is reported twice ?<br>
1186
<font class=CSolution>SOLUTION:</font><br>
1188
"eu (European country)" means we are sure that visitor come from an european country but we can't tell
1189
wich one. It might be a major country like France, Great Britain, Spain, Germany... like a very small one.<br>
1190
So, in the country report, each visitor is in one and only one group. If reported in "eu (European country)",
1191
it is not counted in another country, and if reported in a particular country, it is not counted in "eu (European country)",
1192
even if this country is in Europe.<br>
990
1195
<a name="OLDLOG"></a><br>
991
1196
<b><u>FAQ-COM350 : HOW CAN I PROCESS AN OLD LOG FILE ?</u></b><br>
992
1197
<font class=CProblem>PROBLEM:</font><br>
1175
1404
one of the best and most popular web browser.<br>
1178
<a name="PERSONALIZEDLOG"></a><br>
1179
<b><u>FAQ-SET250 : LOG FORMAT SETUP OR ERRORS</u></b><br>
1180
<font class=CProblem>PROBLEM:</font><br>
1181
Which value do I have to put in the LogFormat parameter to make AWStats working with my log
1183
<font class=CSolution>SOLUTION:</font><br>
1184
The AWStats config file give you all possible values for LogFormat parameter.
1185
To help you, this is some common cases of log file format, and
1186
the corresponding value for LogFormat you must use in your AWStats config file:<br>
1188
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1189
<u>If your log records are EXACTLY like this (<b>NCSA combined/XLF/ELF</b> log format):</u><br>
1190
<i>62.161.78.73 - - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
1191
You must use : <i>LogFormat=1</i><br>
1192
This is same than: <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"</i><br>
1195
<u>If your log records are EXACTLY like this (<b>NCSA combined with several virtualhostname</b> sharing same log file).</u><br>
1196
<i>virtualserver1 62.161.78.73 - - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
1197
You must use : <i>LogFormat="%virtualname %host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"</i><br>
1199
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1200
<u>If your log records are EXACTLY like this (<b>NCSA combined and mod_gzip format 1</b> with <b>Apache 1.x</b>):</u><br>
1201
<i>62.161.78.73 - - [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)" mod_gzip: 66pct.</i><br>
1202
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %other %gzipratio"</i><br>
1205
<u>If your log records are EXACTLY like this (<b>NCSA combined and mod_gzip format 2</b> with <b>Apache 1.x</b>):</u><br>
1206
<i>62.161.78.73 - - [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)" mod_gzip: DECHUNK:OK In:11393 Out:3904:66pct.</i><br>
1207
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %other %other %gzipin %gzipout"</i><br>
1209
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1210
<u>If your log records are EXACTLY like this (<b>NCSA combined and mod_deflate</b> with <b>Apache 2 </b>):</u><br>
1211
<i>62.161.78.73 - - [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>
1212
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %deflateratio"</i><br>
1215
<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>
1216
<i>62.161.78.73 - - [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>
1217
You must use : <i><br>
1218
LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"<br>
1219
LogSeparator=" *"<br>
1222
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1223
<u>If your log records are EXACTLY like this (<b>NCSA common CLF</b> log format):</u><br>
1224
<i>62.161.78.73 - - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234</i><br>
1225
You must use : <i>LogFormat=4</i><br>
1226
Note: Browsers, OS's, Keywords and Referers features are not available with a such format.<br>
1229
<u>If your log records are EXACTLY like this (With some <b>Squid</b> versions, after setting <i>emulate_http_log</i> to on):</u><br>
1230
<i>200.135.30.181 - - [dd/mmm/yyyy:hh:mm:ss +0x00] "GET http://www.mydomain.com/page.html HTTP/1.0" 200 456 TCP_CLIENT_REFRESH_MISS:DIRECT</i><br>
1231
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %other"</i><br>
1233
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1234
<u>If your log records are EXACTLY like this (Some old <b>IIS</b> W3C log format):</u><br>
1235
<i>yyyy-mm-dd hh:mm:ss 62.161.78.73 - GET /page.html 200 1234 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) http://www.from.com/from.html</i><br>
1236
You must use : <i>LogFormat=2</i><br>
1239
<u>If your log records are EXACTLY like this (Some <b>IIS</b> W3C log format with some <b>.net</b> servers):</u><br>
1240
<i>yyyy-mm-dd hh:mm:ss GET /page.html - 62.161.78.73 - Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) http://www.from.com/from.html 200 1234 HTTP/1.1</i><br>
1241
You must use : <i>LogFormat="%time2 %method %url %logname %host %other %ua %referer %code %bytesd %other"</i><br>
1243
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1244
<u>If your log records are EXACTLY like this (Some <b>IIS 6+</b> W3C log format):</u><br>
1245
<i>yyyy-mm-dd hh:mm:ss GET /page.html - 62.161.78.73 - Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) http://www.from.com/from.html 200 1234</i><br>
1246
You must use : <i>LogFormat="date time cs-method cs-uri-stem cs-username c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-bytes"</i><br>
1249
<u>If your log records are EXACTLY like this (With some <b>WebSite</b> versions):</u><br>
1250
<i>yyyy-mm-dd hh:mm:ss 62.161.78.73 - 192.168.1.1 80 GET /page.html - 200 11205 0 0 HTTP/1.1 mydomain.com Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+98) - http://www.from.com/from.html</i><br>
1251
You must use : <i>LogFormat="%time2 %host %logname %other %other %method %url %other %code %bytesd %other %other %other %other %ua %other %referer"</i><br>
1253
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1254
<u>If your log records are EXACTLY like this (<b>Webstar</b> native log format):</u><br>
1255
<i>05/21/00 00:17:31 OK 200 212.242.30.6 Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) http://www.cover.dk/ "www.cover.dk" :Documentation:graphics:starninelogo.white.gif 1133</i><br>
1256
You must use : <i>LogFormat=3</i><br>
1259
<u>If your log records are EXACTLY like this (With some <b>Lotus Notes/Domino</b> versions):</u><br>
1260
<i>62.161.78.73 - Name Surname Service [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
1261
You must use : <i>LogFormat=6</i><br>
1263
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1264
<u>If your log records are EXACTLY like this (<b>Lotus Notes/Domino 6.x</b> log format):</u><br>
1265
<i>62.161.78.73 - "Name Surname" Service [dd/mmm/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" 200 1234 "http://www.from.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
1266
You must use : <i>LogFormat="%host %other %lognamequot %time1 %methodurl %code %bytesd %refererquot %uaquot"</i><br>
1269
<u>If your log records are EXACTLY like this (With <b>Oracle9iAS</b>):</u><br>
1270
<i>62.161.78.73 - [dd/mmm/yyyy:hh:mm:ss +0x00] GET /page.html HTTP/1.1 200 1234 - "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"</i><br>
1271
Where separators are <tab> chars or several spaces,
1272
You must use : <i>LogFormat="%host %logname %time1 %method %url %other %code %bytesd %referer %uaquot"</i>
1273
and <i>LogSeparator="\s+"</i><br>
1275
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1276
<u>If you use a FTP server like <b>ProFTPd</b>:</u><br>
1277
See <a href="#FTP">FAQ-COM090</a>.<br>
1280
<u>If you want to analyze a mail log file (<b>Postfix</b>, <b>Sendmail</b>, <b>QMail</b>, <b>MDaemon</b>, <b>Exchange</b>):</u><br>
1281
See <a href="#MAIL">FAQ-COM100</a>.<br>
1283
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1284
<u>If you use a Media Server (<b>Realmedia</b>, <b>Windows Media Server</b>):</u><br>
1285
See <a href="#MEDIASERVER">FAQ-COM110</a>.<br>
1288
<u>If your log records are EXACTLY like this (With some providers):</u><br>
1289
<i>62.161.78.73 - - [dd/Month/yyyy:hh:mm:ss +0x00] "GET /page.html HTTP/1.1" "-" 200 1234</i><br>
1290
You must use : <i>LogFormat="%host %other %logname %time1 %methodurl %other %code %bytesd"</i><br>
1291
Note: Browsers, OS's, Keywords and Referers features are not available with a such format.<br>
1293
<table bgcolor=#F4F4F4 width="100%" class=CFAQ><tr class=CFAQ><td class=CFAQ>
1294
<u>There is a lot of other possible log formats.</u><br>
1295
You must use a personalized log format LogFormat ="..." as described in config file to
1296
support other various log formats.<br>
1301
1407
<a name="CORRUPTEDDROPPED"></a><br>
1302
1408
<b><u>FAQ-SET270 : ONLY CORRUPTED OR DROPPED RECORDS</u></b><br>
1303
1409
<font class=CProblem>PROBLEM:</font><br>