[LON-CAPA-cvs] cvs: modules /gerd/usagestats active_domains.pl domain_kinds.tab eval_domains.pl

www lon-capa-cvs-allow@mail.lon-capa.org
Tue, 11 Nov 2008 23:54:08 -0000


This is a MIME encoded message

--www1226447648
Content-Type: text/plain

www		Tue Nov 11 23:54:08 2008 EDT

  Added files:                 
    /modules/gerd/usagestats	active_domains.pl 

  Modified files:              
    /modules/gerd/usagestats	domain_kinds.tab eval_domains.pl 
  Log:
  Better domain counting
  
  
--www1226447648
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20081111235408.txt"

Index: modules/gerd/usagestats/domain_kinds.tab
diff -u modules/gerd/usagestats/domain_kinds.tab:1.5 modules/gerd/usagestats/domain_kinds.tab:1.6
--- modules/gerd/usagestats/domain_kinds.tab:1.5	Mon Mar  3 16:40:58 2008
+++ modules/gerd/usagestats/domain_kinds.tab	Tue Nov 11 23:54:08 2008
@@ -1,205 +1,148 @@
-#Universities
-msul1:msu:library:s10.lite.msu.edu:U
-msua1:msu:access:s1.lite.msu.edu
-msua2:msu:access:s2.lite.msu.edu
-msua3:msu:access:s3.lite.msu.edu
-msua4:msu:access:s4.lite.msu.edu
-msua5:msu:access:s5.lite.msu.edu
-msua6:msu:access:s6.lite.msu.edu
-msua7:msu:access:s7.lite.msu.edu
-msua8:msu:access:s8.lite.msu.edu
-msua9:msu:access:s9.lite.msu.edu
-pnetl1:physnet:library:s12.lite.msu.edu:PR
-sunysb1:sunysb:library:lon-capa.chem.sunysb.edu
-sfulc:sfu:library:dalton.chem.sfu.ca:U
-sfua1:sfu:access:lewis.chem.sfu.ca
-sfua2:sfu:access:nernst.chem.sfu.ca
-sfua3:sfu:access:newton.science.sfu.ca
-sntl1:showandtell:library:capa2.phy.ohiou.edu:U
-oucapa2:ohiou:library:capa2.phy.ohiou.edu
-ohioua1:ohiou:access:capa5.phy.ohiou.edu
-ohioua2:ohiou:access:capa6.phy.ohiou.edu
-ohioua3:ohiou:access:capa7.phy.ohiou.edu
-ohioua4:ohiou:access:capa8.phy.ohiou.edu
-ohioua6:ohiou:access:capa10.phy.ohiou.edu
-fsua0:fsu:access:loncapa.fsu.edu:U
-fsua1:fsu:access:loncapa1.fsu.edu
-fsua2:fsu:access:loncapa2.fsu.edu
-fsua3:fsu:access:loncapa3.fsu.edu
-fsua4:fsu:access:loncapa4.fsu.edu
-fsua5:fsu:access:loncapa5.fsu.edu
-fsul1:fsu:library:loncapa10.fsu.edu
-scl1:sc:library:loncapa3.physics.sc.edu:U
-sca1:sc:access:loncapa2.physics.sc.edu
-sca2:sc:access:loncapa4.physics.sc.edu
-udel1:udel:library:zappa.ags.udel.edu:U
-gwl1:gwu:library:loncapa.gwu.edu:U
-ndsul1:ndsu:library:neptune.physics.ndsu.nodak.edu:U
-ndsua1:ndsu:access:proteus.physics.ndsu.nodak.edu
-ndsua2:ndsu:access:triton.physics.ndsu.nodak.edu
-capa1:uwsp:library:capa1.uwsp.edu:U
-csml1:csm:library:loncapa.Mines.EDU:U
-csma1:csm:access:lc1.Mines.EDU
-csma2:csm:access:lc2.Mines.EDU
-naul0:nau:library:loncapa.chm.nau.edu:U
-naua0:nau:access:naua0.chm.nau.edu
-naua1:nau:access:naua1.chm.nau.edu
-cmichl1:cmich:library:lon-capa.phy.cmich.edu:U
-bsul1:bsu:library:lon-capa.bsu.edu:U
-hujil1:huji:library:capa1.cc.huji.ac.il:U
-hujia1:huji:access:capa2.cc.huji.ac.il
-ucscl1:ucsc:library:lon-capa.ucsc.edu
-ifuspl1:ifusp:library:liria.if.usp.br:U
-UNICAMPl1:UNICAMP:library:lyra.mc21.fee.unicamp.br
-nagoyal1:nagoya:library:lon-capa.media.nagoya-u.ac.jp
-psueriel2:psuerie:library:psblnx03.bd.psu.edu:U
-acadiaul8:acadiau:library:lon-capa.acadiau.ca:U
-cuphysics:colorado:library:lon-capa.colorado.edu
-#sharif14:sharif:library:vu.ce.sharif.edu
-uiuclibrary1:uiuc:library:library1.lon-capa.uiuc.edu:U
-uiucaccess1:uiuc:access:access1.lon-capa.uiuc.edu
-uiucaccess2:uiuc:access:access2.lon-capa.uiuc.edu
-vcul1:vcu:library:loncapa.vcu.edu:U
-vcua1:vcu:access:loncapa2.vcu.edu
-jce1:jce:library:loncapa.jce.ac.il:U
-kanazawal1:kanazawa:library:iedulib.ipc.kanazawa-u.ac.jp
-harvardl1:harvard:library:harvard.lon-capa.org
-uga01:uga:library:surak.physast.uga.edu:U
-uga02:uga:access:spock.physast.uga.edu
-hopel1:hope:library:meitner.physics.hope.edu:U
-pittphyast1:pitt:library:nplq1.phyast.pitt.edu:U
-uwinnipegl1:uwinnipeg:library:theoryx2.uwinnipeg.ca
-letul1:letu:library:nicodemus.letu.edu:U
-upl1:up:library:physlon.up.ac.za:U
-umassl1:umass:library:vygotsky.bio.umass.edu
-umassa1:umass:access:lilo.bio.umass.edu
-hgul1:hgu:library:josiah.handong.edu:U
-hgua1:hgu:access:yeshua.handong.edu
-fhwfl1:fhwf:library:vita.fh-wolfenbuettel.de:U
-ndsl1:nds:library:vita.sonia.de:PR
-nyul1:nyu:library:nyul1.physics.nyu.edu
-georgetownl1:georgetown:library:eureka.physics.georgetown.edu:U
-uahl1:uah:library:lonfisica.uah.es
-uaha1:uah:access:lonarqui.uah.es
-mcgilll1:mcgill:library:capa.mcgill.ca:U
-mcgillldev:mcgill:library:loncapa.physics.mcgill.ca
-unisal7:unisa:library:delta6.dmi.unisa.it:U
-usaskl1:usask:library:ganita.usask.ca:U
-jmul1:jmu:library:lc.cit.jmu.edu:U
-upmEtsitL1:upm:library:cbm.mat.upm.es
-umassdl1:umassd:library:maxixe.phy.umassd.edu:U
-omi-fhoow1:omi-fhoow:library:capa.et-inf.fho-emden.de:U
-cosl1:oregonstate:library:lon-capa.science.oregonstate.edu:U
-ufml1:ufm:library:lon-capa-base1.server.uni-frankfurt.de:U
-binghamtonl1:binghamton:library:loncapa.chem.binghamton.edu:U
-itul1:itu:library:www.fizikodev.itu.edu.tr:U
-uprml1:uprm:library:loncapa.hep.uprm.edu:U
- 
-#Community Colleges
-tmcc1:tmcc:library:schubert.tmcc.edu:CC
-wsccl1:wscc:library:newscience.westshore.edu:CC
-nfccl1:nfcc:library:loncapa.nfcc.edu:CC
-tccfll1:tccfl:library:loncapa.tcc.fl.edu:CC
-fgcul1:fgcu:library:orion.cas.fgcu.edu:U
-
-#High Scools
-osidel1:oside:library:webwork.oside.k12.ca.us:HS
-BCHSLib:BCHS:library:BCHS-CAPA.jeffco.k12.co.us
-fsuk12a1:fsuK12:access:k12.fsu.edu
-fsuk12l1:fsuK12:library:k12-1.fsu.edu
-brsl2:brs:library:loncapa.brs.cgresd.net:HS
-lccscil1:lcc:library:lon-capa.lcc.ca:HS
-sarasotal1:sarasota:library:shs-dunk-lin.shs.sarasota.k12.fl.us
-
-#ohio u hosted
-athensl1:athens:library:capa4.phy.ohiou.edu:HS
-vintonl1:vinton:library:capa4.phy.ohiou.edu:HS
-trimblel1:trimble:library:capa4.phy.ohiou.edu:HS
-pickeringtonl1:pickerington:library:capa4.phy.ohiou.edu:HS
-morganl1:morgan:library:capa4.phy.ohiou.edu:HS
-arcadial1:arcadia:library:capa4.phy.ohiou.edu:HS
-ohiouk12l1:ohiouk12:library:capa4.phy.ohiou.edu:HS
-
-#Hosted - educogs library server
-elkrapidsl1:elkrapids:library:educog.com
-mcneesel1:mcneese:library:educog.com:HS
-southfieldl1:southfield:library:educog.com:HS
-longwoodl1:longwood:library:educog.com:HS
-bcccl1:bccc:library:educog.com:HS
-casel1:case:library:educog.com:U
-oul1:ou:library:educog.com:U
-ZISl1:ZIS:library:educog.com:HS
-purduel1:purdue:library:educog.com:U
-fremdhsl1:fremdhs:library:educog.com:HS
-stockbridgel1:stockbridge:library:educog.com:HS
-johnabbottl1:johnabbott:library:educog.com:HS
-pwhsl1:pwhs:library:educog.com:HS
-palomarl1:palomar:library:educog.com:CC
-bellairel1:bellaire:library:educog.com:HS
-rutgersl1:rutgers:library:educog.com
-spokanefallsl1:spokanefalls:library:educog.com
-coastall1:coastal:library:educog.com:CC
-cpsl1:cps:library:educog.com:HS
-miol1:mio:library:educog.com:HS
-templecityl1:templecity:library:educog.com:HS
-henricol1:henrico:library:educog.com:HS
-fvll1:fvl:library:educog.com:HS
-mineolal1:mineola:library:educog.com:HS
-okemosl1:okemos:library:educog.com:HS
-colemanl1:coleman:library:educog.com:HS
-monroel1:monroe:library:educog.com:HS
-asdk12l1:asdk12:library:educog.com:HS
-koinonial1:koinonia:library:educog.com
-dolomitenl1:dolomiten:library:educog.com
-jmsl1:jms:library:educog.com
-wileyl1:wiley:library:educog.com:PU
-kamscl1:kamsc:library:educog.com:HS
-webbervilleschoolsl1:webbervilleschools:library:educog.com:HS
-lakefentonl1:lakefenton:library:educog.com:HS
-grandblancl1:grandblanc:library:educog.com:HS
-judsonl1:judson:library:educog.com:HS
-lesliel1:leslie:library:educog.com:HS
-novil1:novi:library:educog.com:HS
-ithacal1:ithaca:library:educog.com:HS
-ateecl1:ateec:library:educog.com:PR
-montanal1:montana:library:educog.com:U
-brsl1:brs:library:educog.com
-redfordl1:redford:library:educog.com:HS
-portlandl1:portland:library:educog.com:HS
-waverlyl1:waverly:library:educog.com:HS
-wmstonl1:wmston:library:educog.com:HS
-brookscolel1:brookscole:library:educog.com:PU
-whfreemanl1:whfreeman:library:educog.com:PU
-prenhalll1:prenhall:library:educog.com:PU
-mcgrawhilll1:mcgrawhill:library:educog.com:PU
-wadsworthl1:wadsworth:library:educog.com:PU
-westwolfl1:westwolf:library:educog.com
-glpsl2:glps:library:educog.com:HS
-russ01:Selwyn:library:educog.com:HS
-haslettl1:haslett:library:educog.com:HS
-portagel1:portage:library:educog.com:HS
-carmanl1:carman:library:educog.com:HS
-farmingtonl1:farmington:library:educog.com:HS
-motthsl1:motths:library:educog.com:HS
-birminghaml1:birmingham:library:educog.com:HS
-swartzcreekl1:swartzcreek:library:educog.com:HS
-rhsl1:rhs:library:educog.com:HS
-elpsl1:elps:library:educog.com:HS
-jpsl1:jps:library:educog.com:HS
-covenantchristianhsl1:covenantchristianhs:library:educog.com:HS
-lsdl1:lsd:library:educog.com:HS
-tamul1:tamu:library:educog.com:U
-erpsl1:erps:library:educog.com:HS
-iastatel1:iastate:library:educog.com:U
-glenlakel1:glenlake:library:educog.com:HS
-mcmasterl1:mcmaster:library:educog.com:U
-uwindsorl1:uwindsor:library:educog.com:U
-oel1:oe:library:educog.com:HS
-authorl1:author:library:educog.com
-
-# educogs access server
-authora1:author:access:a1.educog.com
-
-#Gateways 
-nsdll1:nsdl:library:nsdl.lon-capa.org
-msudemol1:msudemo:library:s14.lite.msu.edu
+birmingham:Birmingham Public Schools:HS
+ufm:Johann Wolfgang Goethe Universitaet Frankfurt am Main:U
+vinton:Vinton County Public Schools:HS
+hgu:Handong Global University:U
+carman:Carman-Ainsworth Community Schools:HS
+portage:Portage Public Schools:HS
+tamu:Texas A&M:U
+mcgrawhill:McGraw-Hill Publishers:PU
+glps:Grand Ledge Public Schools:HS
+uwrf:University of Wisconsin at River Falls:U
+fhwf:University of Applied Sciences Braunschweig Wolfenbuettel:U
+mcneese:McNeese State University:U
+uwindsor:University of Windsor:U
+omi-fhoow:Medieninformatik University of Applied Sciences Oldenburg Ostfriesland Wilhelmshaven:U
+spokanefalls:Spokane Falls Community College:CC
+gwu:George Washington University:U
+westwolf:Westwolf:PU
+monroe:Monroe County BOCES:HS
+elte:Eötvös University:U
+csusm:Cal State University San Marcos:U
+nwcc:Northwest Community College:CC
+montana:Montana State University:U
+hartland:Hartland Consolidated Schools:HS
+vcu:Virginia Commonwealth University:U
+trimble:Trimble Public Schools:HS
+fsuK12:Florida State University - K12:PR
+whfreeman:W H Freeman Publisher:PU
+author:Hosted Authors:PR
+hope:Hope College:U
+dewitt:Dewitt Public Schools:HS
+palomar:Palomar College:CC
+udel:University of Delaware:U
+oe:Ovid-Elsie Area Schools:HS
+mun:Memorial University:U
+letu:LeTourneau University:U
+binghamton:Binghamton University:U
+csm:Colorado School Of Mines:U
+pwhs:Pewamo-Westphalia High School:HS
+uiuc:University of Illinois Urbana-Champaign:U
+pitt:University of Pittsburgh:U
+purdue:Purdue University:U
+sfu:Simon Fraser University:U
+farmington:Farmington Public Schools:HS
+fremdhs:William Fremd High School:HS
+ohiou:Ohio University:U
+edison:Edison State College:U
+fsu:Florida State University:U
+harvard:Harvard University:
+wiley:Wiley Publisher:PU
+luhs:Liberty Union High School:HS
+usask:University of Saskatchewan:U
+kamsc:Kalamazoo Area Math and Science Center:PR
+tmcc:Truckee Meadows Community College:CC
+mcgill:McGill University:U
+brs:Beaverton Rural Schools:HS
+cgabc:Certified General Accountants Association of BC:PR
+asdk12:West Anchorage High School:HS
+ifusp:Universidade de Sao Paulo:U
+qvhs:Quaker Valley High School:HS
+mineola:Mineola Public Schools:HS
+alexander:Alexander School District:HS
+bellaire:Bellaire Public Schools:HS
+covenantchristianhs:Covenant Christian High School:HS
+uah:Universidad de Alcala de Henares:U
+wscc:Westshore Community College:CC
+portland:Portland Public Schools:HS
+mcmaster:McMaster University:U
+waverly:Waverly Community Schools:HS
+elkrapids:Elk Rapids Schools:HS
+nfcc:North Florida Community College:CC
+ohiouk12:Ohio University - K12:PR
+uga:University of Georgia:U
+ndsu:North Dakota State University:U
+ZIS:Zurich International School:HS
+redford:Redford Union Schools:HS
+elps:East Lansing Public Schools:HS
+bsu:Ball State University:U
+cmich:Central Michigan University:U
+haslett:Haslett Public Schools:HS
+sc:University of South Carolina:U
+fvl:Fowlerville High School:HS
+douglas:Douglas College:U
+coleman:Coleman School District:HS
+lsd:Lansing School District:HS
+swartzcreek:Swartz Creek Community Schools:HS
+leslie:Leslie High School:HS
+ateec:Eastern Iowa Community College ATEEC:PR
+vcc:Vancouver Community College:CC
+grandblanc:Grand Blanc Community Schools:HS
+fgcu:Florida Gulf Coast University:U
+wadsworth:Wadsworth Publishers:PU
+msudemo:Demo Machine:
+tabor:Tabor College:U
+brookscole:Brooks Cole Publisher:PU
+msu:Michigan State University:U
+psuerie:Penn State Erie:U
+rhs:Roosevelt High School Wyandotte:HS
+unisa:Universita degli Studi di Salerno:U
+uwsp:University of Wisconsin - Stevens Point:U
+bccc:Beaufort County Community College:CC
+newlex:New Lexington High School:HS
+case:Case Western Reserve University:U
+mio:Mio Schools:HS
+wmston:Williamston Community Schools:HS
+tccfl:Tallahassee Community College:CC
+dolomiten:Wirtschaftsakademie:PR
+henrico:Henrico County Public Schools:HS
+prenhall:Prentice Hall Publisher:PU
+Selwyn:Selwyn House School:HS
+showandtell:Problem Examples:
+lakefenton:Lake Fenton Community Schools:HS
+ryerson:Ryerson University:U
+templecity:Temple City High School:HS
+morgan:Morgan County Schools:HS
+stockbridge:Stockbridge Community Schools:HS
+nds:Lower Saxony Universities:PR
+glenlake:Glen Lake Community Schools:HS
+southfield:Southfield High School:HS
+coastal:Coastal Carolina Community College:CC
+ccpsnet:Chesterfield County Public Schools:HS
+ithaca:Ithaca High School:HS
+pickerington:Pickerington Public Schools:HS
+rutgers:Rutgers:
+huji:Hebrew University of Jerusalem:U
+webbervilleschools:Webberville Community Schools:HS
+georgetown:Georgetown University:U
+iastate:Iowa State University:U
+physnet:Physnet MSU:PR
+jps:Jackson Public Schools:HS
+jmu:James Madison University:U
+jce:Jerusalem College of Engineering:U
+johnabbott:John Abbott College:U
+novi:Novi High School:HS
+motths:Waterford Mott High School:HS
+up:University of Pretoria:U
+erps:Eaton Rapids Public Schools:HS
+judson:Judson High School:HS
+okemos:Okemos Public Schools:HS
+nau:Northern Arizona University:U
+jms:Junior Management School:PR
+ou:The University of Oklahoma:U
+longwood:Longwood University:U
+athens:Athens Public Schools:HS
+dal:Dalhousie University:U
+cps:Chicago Public Schools:HS
+koinonia:KoinoniaGroup:
+acadiau:Acadia University:U
+arcadia:Arcadia High School:HS
Index: modules/gerd/usagestats/eval_domains.pl
diff -u modules/gerd/usagestats/eval_domains.pl:1.2 modules/gerd/usagestats/eval_domains.pl:1.3
--- modules/gerd/usagestats/eval_domains.pl:1.2	Sun Oct 14 04:31:04 2007
+++ modules/gerd/usagestats/eval_domains.pl	Tue Nov 11 23:54:08 2008
@@ -1,26 +1,23 @@
 open(IN,'domain_kinds.tab');
 while ($line=<IN>) {
     chomp($line);
-    my (undef,$domain,undef,undef,$type)=split(/\:/,$line);
+    my ($domain,$name,$type)=split(/\:/,$line);
     if ($type) { $domaintype{$domain}=$type; }
-}
-close(IN);
-open(IN,'/home/www/loncapa/loncom/production_dns_domain.tab');
-while ($line=<IN>) {
-    if ($line=~/^\s*\#/) { next; }
-    my ($domain,$name)=split(/\:/,$line);
-    if ($domaintype{$domain}=~/^U/) {
+    if ($type=~/^U/) {
 	push @u,$name;
-    } elsif ($domaintype{$domain}=~/^CC/) {
+    } elsif ($type=~/^CC/) {
 	push @cc,$name;
-    } elsif ($domaintype{$domain}=~/^HS/) {
+    } elsif ($type=~/^HS/) {
 	push @hs,$name;
-    } elsif ($domaintype{$domain}=~/^MS/) {
+    } elsif ($type=~/^MS/) {
 	push @ms,$name;
-    } elsif ($domaintype{$domain}=~/^PR/) {
+    } elsif ($type=~/^PR/) {
 	push @pr,$name;
-    } elsif ($domaintype{$domain}=~/^PU/) {
+    } elsif ($type=~/^PU/) {
 	push @pu,$name;
+    } elsif ($type=~/\w/) {
+        print "Wrong domain type: $type\n";
+        exit;
     }
 }
 close(IN);

Index: modules/gerd/usagestats/active_domains.pl
+++ modules/gerd/usagestats/active_domains.pl
use strict;
use LWP::UserAgent;
my %domserv=();
my %domname=();
my %hostdom=();
my %hostfunc=();
my %hostip=();

# Read the tables

open(IN,"../../../loncom/production_dns_domain.tab");
while (my $line=<IN>) {
   if ($line=~/^\s*\#/) { next; }
   chomp($line);
   unless ($line=~/\S/) { next; }
   my ($domain,$name,$auth,$authparm,$lang,$city,$coord1,$coord2,$lib)=split(/\:/,$line);
   if ($domserv{$domain}) {
      print "Domain $domain defined more than once in domain.tab\n";
   }
   $domserv{$domain}=$lib;
   $domname{$domain}=$name;
}
close(IN);
open(IN,"../../../loncom/production_dns_hosts.tab");
while (my $line=<IN>) {
   if ($line=~/^\s*\#/) { next; }
   chomp($line);
   unless ($line=~/\S/) { next; }
   my ($server,$domain,$function,$ip)=split(/\:/,$line);
   if ($hostdom{$server}) {
      print "$server defined more than once in hosts.tab\n";
   }
   $hostdom{$server}=$domain;
   $hostfunc{$server}=$function;
   $hostip{$server}=$ip;
}
close(IN);

# Contact every domain server

foreach my $dom (keys %domserv) {
   my $ua=new LWP::UserAgent(timeout => 10);
   my $request=new HTTP::Request('GET',"http://".$hostip{$domserv{$dom}});
   my $response=$ua->request($request);
   if ($response->is_success) { 
      print "$dom:$domname{$dom}:\n";
   }
}

--www1226447648--