Usage of the PhysNet Mirror Servers

#!/usr/bin/perl # # Copyright Thomas Severiens 2002 # require "timelocal.pl"; $now = time; $hist = $now - 8640000; $td = "/www/PhysNet/cgi-bin"; $th = $ENV{'REMOTE_HOST'}; if ($th =~ /sioux.*uni\-oldenburg\.de/ || $th =~ /salish.*uni\-oldenburg\.de/ ||$th =~ /chinook.*uni\-oldenburg\.de/ ||$th =~ /squaw.*uni\-oldenburg\.de/) { $homeview=1; } print ("Content-Type: text/html\n\n"); $m=0; open (OUT,">$td/temp/mirror.puffer"); opendir(DIR,$td); while ($file = readdir(DIR)) { if ($file =~ /^access_log_physnet_/ && $file !~ /all$/) { open (FILE,"$td/$file"); $n=0; $q=0; while () { chomp; $n++; $m++; / - - \[(\d+)\/(.*)\/(\d+):/; $day=$1; $month=$2; $year=$3; if($month="Jan"){$month=0;} elsif($month="Feb"){$month=1;} elsif($month="Mar"){$month=2;} elsif($month="Apr"){$month=3;} elsif($month="May"){$month=4;} elsif($month="Jun"){$month=5;} elsif($month="Jul"){$month=6;} elsif($month="Aug"){$month=7;} elsif($month="Sep"){$month=8;} elsif($month="Oct"){$month=9;} elsif($month="Nov"){$month=10;} elsif($month="Dec"){$month=11;} $tmes = timelocal(0,0,0,$day,$month,$year); if ($tmes >= $hist) {$q++;} } close (FILE); print OUT "$n $q $file\n"; $n=0; } } closedir(DIR); close (OUT); system ("/usr/bin/sort -nr $td/temp/mirror.puffer > $td/temp/mirror.puffer2"); unlink ("$td/temp/mirror.puffer"); open (IN,"<$td/temp/mirror.puffer2"); $nod = int(($now-1037172357)/86400); if ($homeview==1) { print "\n";} else { print "
\n";} print "\n"; if ($homeview==1) { print "\n";} else { print "\n";} while () { chomp; if (/^(\d+)\s*(\d+)\s*(.*)$/) { $poi = $1; $mid= $2/100; $poi = int($poi/(($now-1037172357)/864000))/10; $poh = (int($1/$m*100)+1)*2; $pop = (int($1/$m*1000))/10; $pog = 250-$poh; $file = $3; $file =~ /access_log_physnet_(.*)$/; print "\n"; if ($homeview==1) { print "\n";} print "\n"; } } print "
Mirror   % Avg hits per day
in the last $nod days
Avg hits per day
in the last 100 days
webalizer
$1 $pop% $poi $middetails
"; close (IN); unlink ("$td/temp/mirror.puffer2");

This table is updated automatically every night.

For a more detailed statistics, view our monthly statistics (please be patient, it may take some time, so build this page...)

top