- Other minor bugs (814970,823064,823323,831438,836315).
- Fixed bug in counting hits for miscellanous and clusters chart when
a temporary flush was done on disk during a long update.
-- ExtraSections now works on all records whatever is the error code.
+- ExtraSections now works on all records whatever is the status code.
- Click on "Summary" now returns to top of page even with rawlog plugin.
+- Fix in log parsing that should reduce dropped records to only records
+ that match a dropping criteria (SkipFiles, Skip..., Only...).
New features/improvements:
- Increased speed by 10 to 20%.
-- A lot of portion of codes have been rewritten to make code more easy to
- understand and reduce unknown bugs.
+- Added a Worms report.
+- Added report for "not viewed" traffic in Summary report.
+- Monthly history report have been taken out the Summary report.
- Some changes to make AWStats to be XML compliant ready.
Need to set the new parameter BuildReportFormat to 'xml' in config file.
-- Summary report shows also "unviewed" traffic.
+ Added also the BuildHistoryFormat parameter (Even if only 'text' is
+ supported for the moment).
+- A lot of part of codes have been rewritten to make code more easy to
+ understand and reduce unknown bugs.
- A new search engine database to allow several "match id" for same
search engine. Example: All google ip referer id are recognised.
- Can use UA and HOST fields to build personalized ExtraSection reports.
<li><a href="#Show">ShowHostsStats</a>
<li><a href="#Show">ShowAuthenticatedUsers</a>
<li><a href="#Show">ShowRobotsStats</a>
+<li><a href="#Show">ShowWormsStats</a>
<li><a href="#Show">ShowSessionsStats</a>
<li><a href="#Show">ShowPagesStats</a>
<li><a href="#Show">ShowCompressionStats</a>
5.5+ for ShowDaysOfMonthStats<br>
5.6+ for ShowMiscStats,ShowSTMPErrorsStats<br>
5.8+ for ShowClusterStats<br>
+6.0+ for ShowWormsStats<br>
<br># You choose here which reports you want to see in the main page and what you
<br># want to see in those reports.
<br># Possible values:
<br># Show robots chart
<br># Default: HBL, Possible codes: HBL
<br>ShowRobotsStats=HBL
+<br># Show worms chart\r
+<br># Default: HBL, Possible codes: HBL\r
+<br>ShowWormsStats=HBL\r
<br># Show email senders chart (For use when analyzing mail log files)
<br># Default: 0, Possible codes: HBML
<br>ShowEMailSenders=0
<br># List of visible flags with link to other language translations.
<br># See Lang parameter for list of allowed flag/language codes.
<br># If you don't want any flag link, set ShowFlagLinks to "".
-<br># This parameter is used only if ShowHeader parameter is set to 1.
+<br># This parameter is used only if ShowMenu parameter is set to 1.
<br># Possible values: "" or "language_codes_separated_by_space"
<br># Default: "en es fr it nl es"
<br>#
# for web hosting providers that offer AWStats for large sites, on shared
# servers, to non CPU cautious customers.
# For this reason, the 'full year' is only enabled on Command Line by default.
-# You can change this by setting this parameter to 0, 1 (recommanded), 2 or 3.
+# You can change this by setting this parameter to 0, 1, 2 or 3.
# Possible values:
# 0 - Never allowed
# 1 - Allowed on CLI only, -Year- value in combo is not visible
# Frames are only available for report viewed dynamically. When you build
# pages from command line, this option is not used and no frames are built.
# Possible values: 0 or 1
-# Default: 0
+# Default: 1
#
UseFramesWhenCGI=1
# Show robots chart
# Default: HBL, Possible codes: HBL
ShowRobotsStats=HBL
+# Show worms chart\r
+# Default: HBL, Possible codes: HBL\r
+ShowWormsStats=HBL\r
# Show email senders chart (For use when analyzing mail log files)
# Default: 0, Possible codes: HBML
ShowEMailSenders=0
# List of visible flags that links to other language translations.
# See Lang parameter for list of allowed flag/language codes.
# If you don't want any flag link, set ShowFlagLinks to "".
-# This parameter is used only if ShowHeader parameter is set to 1.
+# This parameter is used only if ShowMenu parameter is set to 1.
# Possible values: "" or "language_codes_separated_by_space"
# Example: "en es fr nl es"
# Default: ""
'Not viewed trafic is trafic generated by robots, worms or answers with special HTTP status code',
'Traffic viewed',
'Traffic not viewed',
-'Monthly history'
+'Monthly history',
+'Worms',
+'different worms'
);
if ($ShowHostsStats !~ /[01PHBL]/) { $ShowHostsStats='PHBL'; }
if ($ShowAuthenticatedUsers !~ /[01PHBL]/) { $ShowAuthenticatedUsers=0; }
if ($ShowRobotsStats !~ /[01HBL]/) { $ShowRobotsStats='HBL'; }
- if ($ShowWormsStats !~ /[01HL]/) { $ShowWormsStats='HL'; }
+ if ($ShowWormsStats !~ /[01HBL]/) { $ShowWormsStats='HBL'; }
if ($ShowEMailSenders !~ /[01HBML]/) { $ShowEMailSenders=0; }
if ($ShowEMailReceivers !~ /[01HBML]/) { $ShowEMailReceivers=0; }
if ($ShowSessionsStats !~ /[01]/) { $ShowSessionsStats=1; }
if ($ShowEMailReceivers eq '1') { $ShowEMailReceivers = 'HBML'; }
if ($ShowAuthenticatedUsers eq '1') { $ShowAuthenticatedUsers = 'PHBL'; }
if ($ShowRobotsStats eq '1') { $ShowRobotsStats = 'HBL'; }
- if ($ShowWormsStats eq '1') { $ShowWormsStats = 'HL'; }
+ if ($ShowWormsStats eq '1') { $ShowWormsStats = 'HBL'; }
if ($ShowPagesStats eq '1') { $ShowPagesStats = 'PBEX'; }
if ($ShowFileTypesStats eq '1') { $ShowFileTypesStats = 'HB'; }
if ($ShowOriginStats eq '1') { $ShowOriginStats = 'PH'; }
if (! scalar %SectionsToLoad) { debug(" Stop reading history file. Got all we need."); last; }
next;
}
+ # BEGIN_WORMS
+ if ($field[0] eq 'BEGIN_WORMS') {
+ if ($Debug) { debug(" Begin of WORMS section"); }
+ $field[0]='';
+ my $count=0;my $countloaded=0;
+ do {
+ if ($field[0]) {
+ $count++;
+ if ($SectionsToLoad{'worms'}) {
+ $countloaded++;
+ if ($field[1]) { $_worm_h{$field[0]}+=$field[1]; }
+ $_worm_k{$field[0]}+=$field[2];
+ if (! $_worm_l{$field[0]}) { $_worm_l{$field[0]}=int($field[3]); }
+ }
+ }
+ $_=<HISTORY>;
+ chomp $_; s/\r//;
+ @field=split(/\s+/,$_); $countlines++;
+ }
+ until ($field[0] eq 'END_WORMS' || ! $_);
+ if ($field[0] ne 'END_WORMS') { error("History file \"$filetoread\" is corrupted (End of section WORMS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
+ if ($Debug) { debug(" End of WORMS section ($count entries, $countloaded loaded)"); }
+ delete $SectionsToLoad{'worms'};
+ if ($SectionsToSave{'worms'}) {
+ Save_History('worms',$year,$month); delete $SectionsToSave{'worms'};
+ if ($withpurge) { %_worm_h=(); %_worm_k=(); %_worm_l=(); }
+ }
+ if (! scalar %SectionsToLoad) { debug(" Stop reading history file. Got all we need."); last; }
+ next;
+ }
# BEGIN_EMAILS
if ($field[0] eq 'BEGIN_EMAILSENDER') {
if ($Debug) { debug(" Begin of EMAILSENDER section"); }
if ($ShowRobotsStats) { print ($frame?"<tr><td class=\"awsm\">":""); print "<a href=\"$linkanchor#robots\"$targetpage>$Message[53]</a>"; print ($frame?"</td></tr>\n":" "); }
if ($ShowRobotsStats) { print ($frame?"<tr><td class=\"awsm\"> <img height=\"8\" width=\"9\" src=\"$DirIcons/other/page.png\" alt=\"...\" /> ":""); print "<a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?XMLEncode("$AWScript?${NewLinkParams}output=allrobots"):"$PROG$StaticLinks.allrobots.$StaticExt")."\"$NewLinkTarget>$Message[80]</a>\n"; print ($frame?"</td></tr>\n":" "); }
if ($ShowRobotsStats =~ /L/i) { print ($frame?"<tr><td class=\"awsm\"> <img height=\"8\" width=\"9\" src=\"$DirIcons/other/page.png\" alt=\"...\" /> ":""); print "<a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?XMLEncode("$AWScript?${NewLinkParams}output=lastrobots"):"$PROG$StaticLinks.lastrobots.$StaticExt")."\"$NewLinkTarget>$Message[9]</a>\n"; print ($frame?"</td></tr>\n":" "); }
-# if ($ShowWormsStats) { print ($frame?"<tr><td class=\"awsm\">":""); print "<a href=\"$linkanchor#worms\"$targetpage>$Message[136]</a>"; print ($frame?"</td></tr>\n":" "); }
-# if ($ShowWormsStats) { print ($frame?"<tr><td class=\"awsm\"> <img height=\"8\" width=\"9\" src=\"$DirIcons/other/page.png\" alt=\"...\" /> ":""); print "<a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?XMLEncode("$AWScript?${NewLinkParams}output=allworms"):"$PROG$StaticLinks.allworms.$StaticExt")."\"$NewLinkTarget>$Message[80]</a>\n"; print ($frame?"</td></tr>\n":" "); }
-# if ($ShowWormsStats =~ /L/i) { print ($frame?"<tr><td class=\"awsm\"> <img height=\"8\" width=\"9\" src=\"$DirIcons/other/page.png\" alt=\"...\" /> ":""); print "<a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?XMLEncode("$AWScript?${NewLinkParams}output=lastworms"):"$PROG$StaticLinks.lastworms.$StaticExt")."\"$NewLinkTarget>$Message[9]</a>\n"; print ($frame?"</td></tr>\n":" "); }
+ if ($ShowWormsStats) { print ($frame?"<tr><td class=\"awsm\">":""); print "<a href=\"$linkanchor#worms\"$targetpage>$Message[136]</a>"; print ($frame?"</td></tr>\n":" "); }
+ #if ($ShowWormsStats) { print ($frame?"<tr><td class=\"awsm\"> <img height=\"8\" width=\"9\" src=\"$DirIcons/other/page.png\" alt=\"...\" /> ":""); print "<a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?XMLEncode("$AWScript?${NewLinkParams}output=allworms"):"$PROG$StaticLinks.allworms.$StaticExt")."\"$NewLinkTarget>$Message[80]</a>\n"; print ($frame?"</td></tr>\n":" "); }
+ #if ($ShowWormsStats =~ /L/i) { print ($frame?"<tr><td class=\"awsm\"> <img height=\"8\" width=\"9\" src=\"$DirIcons/other/page.png\" alt=\"...\" /> ":""); print "<a href=\"".($ENV{'GATEWAY_INTERFACE'} || !$StaticLinks?XMLEncode("$AWScript?${NewLinkParams}output=lastworms"):"$PROG$StaticLinks.lastworms.$StaticExt")."\"$NewLinkTarget>$Message[9]</a>\n"; print ($frame?"</td></tr>\n":" "); }
if ($linetitle) { print ($frame?"":"</td></tr>\n"); }
# Navigation
$linetitle=&AtLeastOneNotNull($ShowSessionsStats,$ShowPagesStats,$ShowFileTypesStats,$ShowFileSizesStats,$ShowOSStats,$ShowBrowsersStats,$ShowScreenSizeStats);
}
&tab_end("* $Message[156]".($TotalRRobots?" $Message[157]":""));
}
+
+ # BY WORMS
+ #----------------------------
+ if ($ShowWormsStats) {
+ if ($Debug) { debug("ShowWormsStats",2); }
+ print "$Center<a name=\"worms\"> </a><br />\n";
+ &tab_head("$Message[163] ($Message[77] $MaxNbOf{'WormsShown'})",19,0,'worms');
+ print "<tr bgcolor=\"#$color_TableBGRowTitle\"".($TOOLTIPON?" onmouseover=\"ShowTip(16);\" onmouseout=\"HideTip(16);\"":"")."><th>".(scalar keys %_worm_h)." $Message[164]*</th>";
+ if ($ShowWormsStats =~ /H/i) { print "<th bgcolor=\"#$color_h\" width=\"80\">$Message[57]</th>"; }
+ if ($ShowWormsStats =~ /B/i) { print "<th bgcolor=\"#$color_k\" width=\"80\">$Message[75]</th>"; }
+ if ($ShowWormsStats =~ /L/i) { print "<th width=\"120\">$Message[9]</th>"; }
+ print "</tr>\n";
+ $total_p=$total_h=$total_k=0;
+ my $count=0;
+ &BuildKeyList($MaxNbOf{'WormsShown'},$MinHit{'Worm'},\%_worm_h,\%_worm_h);
+ foreach my $key (@keylist) {
+ print "<tr><td class=\"aws\">".($PageDir eq 'rtl'?"<span dir=\"ltr\">":"").($WormsHashLib{$key}?$WormsHashLib{$key}:$key).($PageDir eq 'rtl'?"</span>":"")."</td>";
+ if ($ShowWormsStats =~ /H/i) { print "<td>".$_worm_h{$key}."</td>"; }
+ if ($ShowWormsStats =~ /B/i) { print "<td>".Format_Bytes($_worm_k{$key})."</td>"; }
+ if ($ShowWormsStats =~ /L/i) { print "<td>".($_worm_l{$key}?Format_Date($_worm_l{$key},1):'-')."</td>"; }
+ print "</tr>\n";
+ #$total_p += $_worm_p{$key};
+ $total_h += $_worm_h{$key};
+ $total_k += $_worm_k{$key}||0;
+ $count++;
+ }
+ # For worms we need to count Totals
+ my $TotalPagesWorms = 0; #foreach (values %_worm_p) { $TotalPagesWorms+=$_; }
+ my $TotalHitsWorms = 0; foreach (values %_worm_h) { $TotalHitsWorms+=$_; }
+ my $TotalBytesWorms = 0; foreach (values %_worm_k) { $TotalBytesWorms+=$_; }
+ $rest_p=0; #$rest_p=$TotalPagesRobots-$total_p;
+ $rest_h=$TotalHitsWorms-$total_h;
+ $rest_k=$TotalBytesWorms-$total_k;
+ if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other worms
+ print "<tr><td class=\"aws\"><span style=\"color: #$color_other\">$Message[2]</span></td>";
+ if ($ShowWormsStats =~ /H/i) { print "<td>".($rest_h)."</td>"; }
+ if ($ShowWormsStats =~ /B/i) { print "<td>".(Format_Bytes($rest_k))."</td>"; }
+ if ($ShowWormsStats =~ /L/i) { print "<td> </td>"; }
+ print "</tr>\n";
+ }
+ &tab_end("* $Message[158]");
+ }
print "\n<a name=\"HOW\"> </a>\n\n";