From a3f0cd45026521a254842e4e984bceebecb41e68 Mon Sep 17 00:00:00 2001
From: eldy <>
Date: Wed, 11 Sep 2002 16:17:10 +0000
Subject: [PATCH] Added all robots and last robots full list report.
---
wwwroot/cgi-bin/awstats.model.conf | 2 +-
wwwroot/cgi-bin/awstats.pl | 359 +++++++++++++++++++++++++++--
2 files changed, 344 insertions(+), 17 deletions(-)
diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf
index beb76cad..ad6759b4 100644
--- a/wwwroot/cgi-bin/awstats.model.conf
+++ b/wwwroot/cgi-bin/awstats.model.conf
@@ -562,7 +562,7 @@ MinHitHost = 1
MaxNbOfLoginShown = 10
MinHitLogin = 1
# Stats by robots
-MaxNbOfRobotShown = 20
+MaxNbOfRobotShown = 10
MinHitRobot = 1
# Stats by pages
MaxNbOfPageShown = 20
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index 4b5e3d51..757c9f18 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -1226,20 +1226,20 @@ sub Check_Config {
if ($ShowKeywordsStats !~ /[0-1]/) { $ShowKeywordsStats=1; }
if ($ShowCompressionStats !~ /[0-1]/) { $ShowCompressionStats=1; }
if ($ShowHTTPErrorsStats !~ /[0-1]/) { $ShowHTTPErrorsStats=1; }
- if ($MaxNbOfDomain !~ /^\d+/ || $MaxNbOfDomain<1) { $MaxNbOfDomain=25; }
- if ($MaxNbOfHostsShown !~ /^\d+/ || $MaxNbOfHostsShown<1) { $MaxNbOfHostsShown=25; }
+ if ($MaxNbOfDomain !~ /^\d+/ || $MaxNbOfDomain<1) { $MaxNbOfDomain=20; }
+ if ($MaxNbOfHostsShown !~ /^\d+/ || $MaxNbOfHostsShown<1) { $MaxNbOfHostsShown=20; }
if ($MinHitHost !~ /^\d+/ || $MinHitHost<1) { $MinHitHost=1; }
if ($MaxNbOfLoginShown !~ /^\d+/ || $MaxNbOfLoginShown<1) { $MaxNbOfLoginShown=10; }
if ($MinHitLogin !~ /^\d+/ || $MinHitLogin<1) { $MinHitLogin=1; }
- if ($MaxNbOfRobotShown !~ /^\d+/ || $MaxNbOfRobotShown<1) { $MaxNbOfRobotShown=25; }
+ if ($MaxNbOfRobotShown !~ /^\d+/ || $MaxNbOfRobotShown<1) { $MaxNbOfRobotShown=10; }
if ($MinHitRobot !~ /^\d+/ || $MinHitRobot<1) { $MinHitRobot=1; }
- if ($MaxNbOfPageShown !~ /^\d+/ || $MaxNbOfPageShown<1) { $MaxNbOfPageShown=25; }
+ if ($MaxNbOfPageShown !~ /^\d+/ || $MaxNbOfPageShown<1) { $MaxNbOfPageShown=20; }
if ($MinHitFile !~ /^\d+/ || $MinHitFile<1) { $MinHitFile=1; }
- if ($MaxNbOfRefererShown !~ /^\d+/ || $MaxNbOfRefererShown<1) { $MaxNbOfRefererShown=25; }
+ if ($MaxNbOfRefererShown !~ /^\d+/ || $MaxNbOfRefererShown<1) { $MaxNbOfRefererShown=20; }
if ($MinHitRefer !~ /^\d+/ || $MinHitRefer<1) { $MinHitRefer=1; }
- if ($MaxNbOfKeyphrasesShown !~ /^\d+/ || $MaxNbOfKeyphrasesShown<1) { $MaxNbOfKeyphrasesShown=25; }
+ if ($MaxNbOfKeyphrasesShown !~ /^\d+/ || $MaxNbOfKeyphrasesShown<1) { $MaxNbOfKeyphrasesShown=20; }
if ($MinHitKeyphrase !~ /^\d+/ || $MinHitKeyphrase<1) { $MinHitKeyphrase=1; }
- if ($MaxNbOfKeywordsShown !~ /^\d+/ || $MaxNbOfKeywordsShown<1) { $MaxNbOfKeywordsShown=25; }
+ if ($MaxNbOfKeywordsShown !~ /^\d+/ || $MaxNbOfKeywordsShown<1) { $MaxNbOfKeywordsShown=20; }
if ($MinHitKeyword !~ /^\d+/ || $MinHitKeyword<1) { $MinHitKeyword=1; }
if ($FirstDayOfWeek !~ /[0-1]/) { $FirstDayOfWeek=1; }
if ($UseFramesWhenCGI !~ /[0-1]/) { $UseFramesWhenCGI=0; }
@@ -1324,7 +1324,7 @@ sub Check_Config {
if (! $Message[48]) { $Message[48]="IP Address"; }
if (! $Message[49]) { $Message[49]="Error Hits"; }
if (! $Message[50]) { $Message[50]="Unknown browsers (Referer field)"; }
- if (! $Message[51]) { $Message[51]="Visiting robots"; }
+ if (! $Message[51]) { $Message[51]="different robots"; }
if (! $Message[52]) { $Message[52]="visits/visitor"; }
if (! $Message[53]) { $Message[53]="Robots/Spiders visitors"; }
if (! $Message[54]) { $Message[54]="Free realtime logfile analyzer for advanced web statistics"; }
@@ -1519,7 +1519,7 @@ sub Read_History_With_Update {
if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "os") { $SectionsToLoad{"os"}=11; }
if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "unknownos") { $SectionsToLoad{"unknownreferer"}=12; }
if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "unknownbrowser") { $SectionsToLoad{"unknownrefererbrowser"}=13; }
- if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "robots") { $SectionsToLoad{"robot"}=14; }
+ if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "allrobots" || $HTMLOutput eq "lastrobots") { $SectionsToLoad{"robot"}=14; }
if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "urldetail" || $HTMLOutput eq "urlentry" || $HTMLOutput eq "urlexit") { $SectionsToLoad{"sider"}=15; }
if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "filetypes") { $SectionsToLoad{"filetypes"}=16; }
if ($UpdateStats || $HTMLOutput eq "main" || $HTMLOutput eq "origin") { $SectionsToLoad{"origin"}=17; }
@@ -3526,10 +3526,12 @@ if ((! $ENV{"GATEWAY_INTERFACE"}) && (! $SiteConfig)) {
print " -output to output main HTML report (no update made except with -update)\n";
print " -output=x to output other report pages where x is:\n";
print " allhosts to build page of all hosts\n";
- print " lasthosts to build page of last connections for hosts\n";
+ print " lasthosts to build page of last hits for hosts\n";
print " unknownip to build page of all unresolved IP\n";
print " alllogins to build page of all logins used\n";
- print " lastlogins to build page of last connections for logins\n";
+ print " lastlogins to build page of last hits for logins\n";
+ print " allrobots to build page of all robots/spider visits\n";
+ print " lastrobots to build page of last hits for robots\n";
print " urldetail to list most often viewed pages \n";
print " urldetail:filter to list most often viewed pages matching filter\n";
print " urlentry to list entry pages\n";
@@ -4977,6 +4979,8 @@ EOF
if ($ShowAuthenticatedUsers) { print ($frame?"
":""); print "$Message[80]\n"; print ($frame?" |
\n":" "); }
if ($ShowAuthenticatedUsers) { print ($frame?" ":""); print "$Message[9]\n"; print ($frame?" |
\n":" "); }
if ($ShowRobotsStats) { print ($frame?"| ":""); print "$Message[53]"; print ($frame?" |
\n":" "); }
+ if ($ShowRobotsStats) { print ($frame?" ":""); print "$Message[80]\n"; print ($frame?" |
\n":" "); }
+ if ($ShowRobotsStats) { print ($frame?" ":""); print "$Message[9]\n"; print ($frame?" |
\n":" "); }
print ($frame?"":"\n");
# Navigation
print "| $Message[72] : | \n";
@@ -5106,6 +5110,243 @@ EOF
}
+ if ($HTMLOutput eq "monthdayvalues") {
+ if ($Debug) { debug("ShowMonthDayStats",2); }
+ print "$Center
\n";
+ &tab_head("$Message[7] $SiteDomain",0);
+ print "
|---|
| $Message[8] | ";
+ if ($MonthRequired eq "year") { print "$Message[6] $YearRequired "; }
+ else { print " | $Message[5] $monthlib{$MonthRequired} $YearRequired "; }
+ # Show links for possible years
+ my $NewLinkParams=${QueryString};
+ $NewLinkParams =~ s/update(=\w*|$|[ &]+)//i;
+ $NewLinkParams =~ s/staticlinks(=\w*|$|[ &]+)//i;
+ $NewLinkParams =~ s/year=[^ &]*//i;
+ $NewLinkParams =~ s/month=[^ &]*//i;
+ $NewLinkParams =~ s/framename=[^ &]*//i;
+ $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/^&//; $NewLinkParams =~ s/&$//;
+ if ($NewLinkParams) { $NewLinkParams="${NewLinkParams}&"; }
+ my $NewLinkTarget="";
+ if ($FrameName eq "mainright") { $NewLinkTarget=" target=_parent"; }
+
+ foreach my $key (sort keys %ListOfYears) {
+ if ($ENV{"GATEWAY_INTERFACE"} || !$StaticLinks) {
+ print "$Message[6] $key ";
+ }
+ }
+ print " | ";
+ print "$Message[9] |
\n";
+
+ # Ratio
+ my $RatioVisits=0; my $RatioPages=0; my $RatioHits=0; my $RatioBytes=0;
+ if ($TotalUnique > 0) { $RatioVisits=int($TotalVisits/$TotalUnique*100)/100; }
+ if ($TotalVisits > 0) { $RatioPages=int($TotalPages/$TotalVisits*100)/100; }
+ if ($TotalVisits > 0) { $RatioHits=int($TotalHits/$TotalVisits*100)/100; }
+ if ($TotalVisits > 0) { $RatioBytes=int(($TotalBytes/1024)*100/$TotalVisits)/100; }
+
+ if ($FirstTime) { print "| ".Format_Date($FirstTime,0)." | "; }
+ else { print "
| NA | "; }
+ if ($LastTime) { print "".Format_Date($LastTime,0)." |
\n"; }
+ else { print "NA | \n"; }
+ print "";
+ print "| $Message[11] | ";
+ print "$Message[10] | ";
+ print "$Message[56] | ";
+ print "$Message[57] | ";
+ print "$Message[75] | ";
+ print "
\n";
+ print "";
+ print "".($MonthRequired eq "year"?"<= $TotalUnique $Message[129]":"$TotalUnique ")." | ";
+ print "$TotalVisits ($RatioVisits $Message[52]) | ";
+ print "$TotalPages ($RatioPages ".lc($Message[56]."/".$Message[12]).") | ";
+ print "$TotalHits ($RatioHits ".lc($Message[57]."/".$Message[12]).") | ";
+ print "".Format_Bytes(int($TotalBytes))." ($RatioBytes $Message[108]/".lc($Message[12]).") | ";
+ print "
\n";
+ print "";
+
+ # Show monthly stats
+ print "";
+ print "";
+ print " | ";
+ $max_v=$max_p=$max_h=$max_k=1;
+ for (my $ix=1; $ix<=12; $ix++) {
+ my $monthix=sprintf("%02s",$ix);
+ #if ($MonthUnique{$YearRequired.$monthix} > $max_v) { $max_v=$MonthUnique{$YearRequired.$monthix}; }
+ if ($MonthVisits{$YearRequired.$monthix} > $max_v) { $max_v=$MonthVisits{$YearRequired.$monthix}; }
+ #if ($MonthPages{$YearRequired.$monthix} > $max_p) { $max_p=$MonthPages{$YearRequired.$monthix}; }
+ if ($MonthHits{$YearRequired.$monthix} > $max_h) { $max_h=$MonthHits{$YearRequired.$monthix}; }
+ if ($MonthBytes{$YearRequired.$monthix} > $max_k) { $max_k=$MonthBytes{$YearRequired.$monthix}; }
+ }
+ for (my $ix=1; $ix<=12; $ix++) {
+ my $monthix=sprintf("%02s",$ix);
+ my $bredde_u=0; my $bredde_v=0;my $bredde_p=0;my $bredde_h=0;my $bredde_k=0;
+ if ($max_v > 0) { $bredde_u=int($MonthUnique{$YearRequired.$monthix}/$max_v*$BarHeight/2)+1; }
+ if ($max_v > 0) { $bredde_v=int($MonthVisits{$YearRequired.$monthix}/$max_v*$BarHeight/2)+1; }
+ if ($max_h > 0) { $bredde_p=int($MonthPages{$YearRequired.$monthix}/$max_h*$BarHeight/2)+1; }
+ if ($max_h > 0) { $bredde_h=int($MonthHits{$YearRequired.$monthix}/$max_h*$BarHeight/2)+1; }
+ if ($max_k > 0) { $bredde_k=int($MonthBytes{$YearRequired.$monthix}/$max_k*$BarHeight/2)+1; }
+ print "";
+ print " ";
+ print " ";
+ print " ";
+ print " ";
+ print " ";
+ print " ";
+ print " | \n";
+ }
+ print " \n";
+ print " | ";
+ for (my $ix=1; $ix<=12; $ix++) {
+ my $monthix=($ix<10?"0$ix":"$ix");
+ print "";
+ if ($ENV{"GATEWAY_INTERFACE"} || !$StaticLinks) { print ""; }
+ print "$monthlib{$monthix}";
+ if ($ENV{"GATEWAY_INTERFACE"} || !$StaticLinks) { print ""; }
+ print " | \n";
+ }
+ print " \n";
+ # Array of values
+# print "\n";
+# print "\n";
+# print "\n";
+# print "\n";
+# print "| $Message[11] | ";
+# for (my $ix=1; $ix<=12; $ix++) { my $monthix=($ix<10?"0$ix":"$ix"); print "$MonthUnique{$YearRequired.$monthix} | \n"; }
+# print " \n";
+# print "| $Message[10] | ";
+# for (my $ix=1; $ix<=12; $ix++) { my $monthix=($ix<10?"0$ix":"$ix"); print "$MonthVisits{$YearRequired.$monthix} | \n"; }
+# print " \n";
+# print "| $Message[56] | ";
+# for (my $ix=1; $ix<=12; $ix++) { my $monthix=($ix<10?"0$ix":"$ix"); print "$MonthPages{$YearRequired.$monthix} | \n"; }
+# print " \n";
+# print "| $Message[57] | ";
+# for (my $ix=1; $ix<=12; $ix++) { my $monthix=($ix<10?"0$ix":"$ix"); print "$MonthHits{$YearRequired.$monthix} | \n"; }
+# print " \n";
+# print "| $Message[57] | ";
+# for (my $ix=1; $ix<=12; $ix++) { my $monthix=($ix<10?"0$ix":"$ix"); print "$MonthBytes{$YearRequired.$monthix} | \n"; }
+# print " \n";
+ print " \n \n";
+
+ print "";
+ # Get max_v, max_h and max_k values
+ $max_v=$max_h=$max_k=0; # Start from 0 because can be lower than 1
+ foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) {
+ $daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/;
+ my $year=$1; my $month=$2; my $day=$3;
+ if (! DateIsValid($day,$month,$year)) { next; } # If not an existing day, go to next
+ if (($DayVisits{$year.$month.$day}||0) > $max_v) { $max_v=$DayVisits{$year.$month.$day}; }
+ #if (($DayPages{$year.$month.$day}||0) > $max_p) { $max_p=$DayPages{$year.$month.$day}; }
+ if (($DayHits{$year.$month.$day}||0) > $max_h) { $max_h=$DayHits{$year.$month.$day}; }
+ if (($DayBytes{$year.$month.$day}||0) > $max_k) { $max_k=$DayBytes{$year.$month.$day}; }
+ }
+ # Calculate average values
+ my $avg_day_nb=0; my $avg_day_v=0; my $avg_day_p=0; my $avg_day_h=0; my $avg_day_k=0;
+ foreach my $daycursor ($firstdaytocountaverage..$lastdaytocountaverage) {
+ $daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/;
+ my $year=$1; my $month=$2; my $day=$3;
+ if (! DateIsValid($day,$month,$year)) { next; } # If not an existing day, go to next
+ $avg_day_nb++; # Increase number of day used to count
+ $avg_day_v+=($DayVisits{$daycursor}||0);
+ $avg_day_p+=($DayPages{$daycursor}||0);
+ $avg_day_h+=($DayHits{$daycursor}||0);
+ $avg_day_k+=($DayBytes{$daycursor}||0);
+ }
+ if ($avg_day_nb) {
+ $avg_day_v=$avg_day_v/$avg_day_nb;
+ $avg_day_p=$avg_day_p/$avg_day_nb;
+ $avg_day_h=$avg_day_h/$avg_day_nb;
+ $avg_day_k=$avg_day_k/$avg_day_nb;
+ if ($avg_day_v > $max_v) { $max_v=$avg_day_v; }
+ #if ($avg_day_p > $max_p) { $max_p=$avg_day_p; }
+ if ($avg_day_h > $max_h) { $max_h=$avg_day_h; }
+ if ($avg_day_k > $max_k) { $max_k=$avg_day_k; }
+ }
+ else {
+ $avg_day_v="?";
+ $avg_day_p="?";
+ $avg_day_h="?";
+ $avg_day_k="?";
+ }
+ foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) {
+ $daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/;
+ my $year=$1; my $month=$2; my $day=$3;
+ if (! DateIsValid($day,$month,$year)) { next; } # If not an existing day, go to next
+ my $bredde_v=0; my $bredde_p=0; my $bredde_h=0; my $bredde_k=0;
+ if ($max_v > 0) { $bredde_v=int(($DayVisits{$year.$month.$day}||0)/$max_v*$BarHeight/2)+1; }
+ if ($max_h > 0) { $bredde_p=int(($DayPages{$year.$month.$day}||0)/$max_h*$BarHeight/2)+1; }
+ if ($max_h > 0) { $bredde_h=int(($DayHits{$year.$month.$day}||0)/$max_h*$BarHeight/2)+1; }
+ if ($max_k > 0) { $bredde_k=int(($DayBytes{$year.$month.$day}||0)/$max_k*$BarHeight/2)+1; }
+ print "";
+ print " ";
+ print " ";
+ print " ";
+ print " ";
+ print " | \n";
+ }
+ print " | ";
+ # Show average values
+ print "";
+ my $bredde_v=0; my $bredde_p=0; my $bredde_h=0; my $bredde_k=0;
+ if ($max_v > 0) { $bredde_v=int($avg_day_v/$max_v*$BarHeight/2)+1; }
+ if ($max_h > 0) { $bredde_p=int($avg_day_p/$max_h*$BarHeight/2)+1; }
+ if ($max_h > 0) { $bredde_h=int($avg_day_h/$max_h*$BarHeight/2)+1; }
+ if ($max_k > 0) { $bredde_k=int($avg_day_k/$max_k*$BarHeight/2)+1; }
+ $avg_day_v=sprintf("%.2f",$avg_day_v);
+ $avg_day_p=sprintf("%.2f",$avg_day_p);
+ $avg_day_h=sprintf("%.2f",$avg_day_h);
+ $avg_day_k=sprintf("%.2f",$avg_day_k);
+ print " ";
+ print " ";
+ print " ";
+ print " ";
+ print " | \n";
+ print " \n";
+
+ print "";
+ foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) {
+ $daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/;
+ my $year=$1; my $month=$2; my $day=$3;
+ if (! DateIsValid($day,$month,$year)) { next; } # If not an existing day, go to next
+ my $dayofweekcursor=DayOfWeek($day,$month,$year);
+ print "";
+ print ($day==$nowday && $month==$nowmonth && $year==$nowyear?"":"");
+ print "$day ".$monthlib{$month}."";
+ print ($day==$nowday && $month==$nowmonth && $year==$nowyear?"":"");
+ print " | \n";
+ }
+ print " | ";
+ print "$Message[96] | \n";
+ print " \n";
+ print "\n \n";
+
+ print "\n";
+ print "| $Message[4] | ";
+ print "$Message[10] | ";
+ print "$Message[56] | ";
+ print "$Message[57] | ";
+ print "$Message[75] | ";
+ foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) {
+ $daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/;
+ my $year=$1; my $month=$2; my $day=$3;
+ if ( $DayVisits{$year.$month.$day} > 0 ) {
+ print "";
+ if (! DateIsValid($day,$month,$year)) { next; } # If not an existing day, go to next
+ print "| ",$year,"/",$month,"/",$day," | ";
+ print "",$DayVisits{$year.$month.$day}," | ";
+ print "",$DayPages{$year.$month.$day}," | ";
+ print "",$DayHits{$year.$month.$day}," | ";
+ print "",Format_Bytes(int($DayBytes{$year.$month.$day}))," | ";
+ print " \n";
+ }
+ }
+ print " ";
+
+ print "\n";
+ print " |
\n";
+ &tab_end;
+ &html_end;
+ exit(0);
+ }
if ($HTMLOutput eq "allhosts") {
print "$Center
\n";
&tab_head($Message[81],19);
@@ -5275,6 +5516,74 @@ EOF
&html_end;
exit(0);
}
+ if ($HTMLOutput eq "allrobots") {
+ print "$Center
\n";
+ &tab_head($Message[53],19);
+ print "| ".(scalar keys %_robot_h)." $Message[51] | ";
+ print "$Message[57] | $Message[9] |
\n";
+ $total_p=$total_h=$total_k=0;
+ my $count=0;
+ &BuildKeyList($MaxRowsInHTMLOutput,$MinHitRobot,\%_robot_h,\%_robot_h);
+ foreach my $key (@keylist) {
+ print "| ".($RobotsHashIDLib{$key}?$RobotsHashIDLib{$key}:$key)." | ";
+ print "$_robot_h{$key} | ";
+ if ($_robot_l{$key}) { print "".Format_Date($_robot_l{$key},1)." | "; }
+ else { print "- | "; }
+ print "
\n";
+ #$total_p += $_robot_p{$key}||0;
+ $total_h += $_robot_h{$key};
+ #$total_k += $_robot_k{$key}||0;
+ $count++;
+ }
+ # For bots we need to count Totals
+ my $TotalPagesRobots = 0; #foreach my $val (values %_robot_p) { $TotalPagesRobots+=$val; }
+ my $TotalHitsRobots = 0; foreach my $val (values %_robot_h) { $TotalHitsRobots+=$val; }
+ my $TotalBytesRobots = 0; #foreach my $val (values %_robot_k) { $TotalBytesRobots+=$val; }
+ #$rest_p=$TotalPagesRobots-$total_p;
+ $rest_h=$TotalHitsRobots-$total_h;
+ #$rest_k=$TotalBytesrobots-$total_k;
+ if ($Debug) { debug("Total real / shown : $TotalPagesRobots / $total_p - $TotalHitsRobots / $total_h - $TotalBytesRobots / $total_h",2); }
+ if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other login
+ print "| $Message[2] | $rest_h | |
\n";
+ }
+ &tab_end;
+ &html_end;
+ exit(0);
+ }
+ if ($HTMLOutput eq "lastrobots") {
+ print "$Center
\n";
+ &tab_head($Message[9],19);
+ print "| ".(scalar keys %_robot_h)." $Message[51] | ";
+ print "$Message[57] | $Message[9] |
\n";
+ $total_p=$total_h=$total_k=0;
+ my $count=0;
+ &BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_robot_h,\%_robot_l);
+ foreach my $key (@keylist) {
+ print "| ".($RobotsHashIDLib{$key}?$RobotsHashIDLib{$key}:$key)." | ";
+ print "$_robot_h{$key} | ";
+ if ($_robot_l{$key}) { print "".Format_Date($_robot_l{$key},1)." | "; }
+ else { print "- | "; }
+ print "
\n";
+ #$total_p += $_robot_p{$key}||0;
+ $total_h += $_robot_h{$key};
+ #$total_k += $_robot_k{$key}||0;
+ $count++;
+ }
+ # For bots we need to count Totals
+ my $TotalPagesRobots = 0; #foreach my $val (values %_robot_p) { $TotalPagesRobots+=$val; }
+ my $TotalHitsRobots = 0; foreach my $val (values %_robot_h) { $TotalHitsRobots+=$val; }
+ my $TotalBytesRobots = 0; #foreach my $val (values %_robot_k) { $TotalBytesRobots+=$val; }
+ #$rest_p=$TotalPagesRobots-$total_p;
+ $rest_h=$TotalHitsRobots-$total_h;
+ #$rest_k=$TotalBytesrobots-$total_k;
+ if ($Debug) { debug("Total real / shown : $TotalPagesRobots / $total_p - $TotalHitsRobots / $total_h - $TotalBytesRobots / $total_h",2); }
+ if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other login
+ print "| $Message[2] | $rest_h | |
\n";
+ }
+ &tab_end;
+ &html_end;
+ exit(0);
+ }
if ($HTMLOutput eq "urldetail" || $HTMLOutput eq "urlentry" || $HTMLOutput eq "urlexit") {
if ($Plugin_etf1) { AddOn_Filter(); }
print "$Center
\n";
@@ -5785,6 +6094,7 @@ EOF
print "
";
print "\n";
print "\n";
+
print "";
foreach my $daycursor ($firstdaytoshowtime..$lastdaytoshowtime) {
$daycursor =~ /^(\d\d\d\d)(\d\d)(\d\d)/;
@@ -5801,8 +6111,10 @@ EOF
print "| $Message[96] | \n";
print "
\n";
print "\n
\n";
- print "\n";
+# print "$Message[130]";
+
+ print "\n";
print "\n";
&tab_end;
}
@@ -6048,13 +6360,28 @@ EOF
if ($ShowRobotsStats) {
if ($Debug) { debug("ShowRobotStats",2); }
print "$Center
\n";
- &tab_head($Message[53],19);
- print "| $Message[83] : ".(scalar keys %_robot_h)." | $Message[57] | $Message[9] |
\n";
+ &tab_head("$Message[53] ($Message[77] $MaxNbOfRobotShown) - $Message[80] - $Message[9]",19);
+ print "| ".(scalar keys %_robot_h)." $Message[51] | $Message[57] | $Message[9] |
\n";
+ $total_p=$total_h=$total_k=0;
my $count=0;
- foreach my $key (sort { $_robot_h{$b} <=> $_robot_h{$a} } keys (%_robot_h)) {
- print "| ".($RobotsHashIDLib{$key}?$RobotsHashIDLib{$key}:$Message[0])." | $_robot_h{$key} | ".Format_Date($_robot_l{$key},1)." |
\n";
+ &BuildKeyList($MaxNbOfRobotShown,$MinHitRobot,\%_robot_h,\%_robot_h);
+ foreach my $key (@keylist) {
+ print "| ".($RobotsHashIDLib{$key}?$RobotsHashIDLib{$key}:$key)." | $_robot_h{$key} | ".Format_Date($_robot_l{$key},1)." |
\n";
+ #$total_p += $_robot_p{$key};
+ $total_h += $_robot_h{$key};
+ #$total_k += $_robot_k{$key};
$count++;
}
+ # For bots we need to count Totals
+ my $TotalPagesRobots = 0; #foreach my $val (values %_robot_p) { $TotalPagesRobots+=$val; }
+ my $TotalHitsRobots = 0; foreach my $val (values %_robot_h) { $TotalHitsRobots+=$val; }
+ my $TotalBytesRobots = 0; #foreach my $val (values %_robot_k) { $TotalBytesRobots+=$val; }
+ #$rest_p=$TotalPagesRobots-$total_p;
+ $rest_h=$TotalHitsRobots-$total_h;
+ #$rest_k=$TotalBytesrobots-$total_k;
+ if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other login
+ print "| $Message[2] | $rest_h | |
\n";
+ }
&tab_end;
}
--
2.47.3