Archive for Januar, 2010
Aufbau – Demoumgebung – Windows Server

Eine sehr schöne Serie zum Aufbau einer Demoumgebung kann man zur Zeit über den German Virtualization Blog verfolgen. Alexander Ortha (Technischer Berater Microsoft Server Virtualisierung) beschreibt hier Schritt für Schritt das Vorgehen. Ich wünsche viel Spaß bei der Lektüre!

-> http://blogs.technet.com/germanvirtualizationblog/archive/2010/01/11/aufbau-demoumgebung-1.aspx
-> http://blogs.technet.com/germanvirtualizationblog/archive/2010/01/21/aufbau-demoumgebung-2.aspx
-> http://blogs.technet.com/germanvirtualizationblog/archive/2010/01/27/aufbau-demoumgebung-3.aspx

In den nächsten Tagen und Wochen wird es, laut dem letzten Blogeintrag von ihm, noch weitere Einträge dazu geben. ;)

MSP Workshop: Grundlagen der Windows Server Administration

Wie versprochen gibt es hier die Folien zu dem Workshop der heute an der Uni Bonn statt gefunden hat.

-> Workshop_Bonn

DreamSpark-Team sagt: Kommt vorbei – CeBIT 2010

Mehr Informationen dazu findet ihr unter: http://social.msdn.microsoft.com/Forums/de-DE/dreamsparkeventsde/thread/917ae942-bc55-4b6f-857c-99e582aad8fd

Aufgabe 8 – Algorithmik Praktikum

In diesem Teil des Praktikums war es Aufgabe das Dreieckszahlen-Hashing mit der Sondierungsfolge 0, 1, 3, 6, 10,… zu implementieren. Dazu sollte das Programm eine Ausgabe mit dem momentanen Füllgrad und der Anzahl an Clustern enthalten, sowie einen Performancetest.

Die Ausgabe auf der Konsole sieht mit dem fertigem Programm folgendermaßen aus:

Hier der Programmcode dazu:

import java.util.Random;

public class Three_hashing{
 
 public static int hash(int zahl, int groesse){
  int temp;
  temp = zahl%groesse;
  return temp;
 }
 
 public static int hash2(int zahl, int cnt, int groesse){
  int temp;
  temp = (int) ((zahl+0.5*cnt+0.5*(cnt*cnt))%groesse);
  return temp;
 }
 
 public static void hashInsert(int groesse, int array[], int arrayZuf[], int fillState, int fillStatePrev){
  Random r = new Random();
  int z=groesse*4;
  
  for(int i=fillStatePrev; i<fillState; i++){
   int zahl=0;
   boolean tempend = true;
   
   //Generierung von Zufallszahlen und Überprüfung, dass keine doppelt vorkommt
   while(tempend){
    zahl = r.nextInt(z);
    if(zahl!=0 ){
     for(int x=0; x<arrayZuf.length; x++){
      if(arrayZuf[x]!=zahl){
       arrayZuf[x]=zahl;
       tempend=false;
       x=arrayZuf.length;
      }
     }
    }
   }
   
   //Berechnung der Speicherstelle im Array => Hashing
   boolean end = true;
   int cnt=0;
   int hashKey = hash(zahl, groesse);
   
   if(array[hashKey]==0){
    array[hashKey]=zahl;
   }
   else{
    while(end){
     cnt++;
     int hashKey2=hash2(hashKey, cnt, groesse);
     if(array[hashKey2]==0){
      array[hashKey2]=zahl;
      end = false;
     }
    }
   }
  }
 }
 
 public static int hashSearch(int groesse, int array[], int fillState){
  Random r = new Random();
  int zaehler=0;
  int temparray[] = new int[fillState];
  int z=groesse*4;
  
  for(int i=0; i<fillState; i++){
   int zahl=0;
   boolean tempend = true;
   
   //Generierung von Zufallszahlen und Überprüfung, dass keine doppelt vorkommt
   while(tempend){
    zahl = r.nextInt(z);
    if(zahl!=0 ){
     for(int x=0; x<temparray.length; x++){
      if(temparray[x]!=zahl){
       temparray[x]=zahl;
       tempend=false;
      }
     }
    }
   }
   
   //Berechnung der Speicherstelle im Array => Hashing
   boolean end = true;
   int cnt=0;
   int cnt2=0;
   int hashKey = hash(zahl, groesse);
   
   if(array[hashKey]==0 || array[hashKey]==zahl){
    zaehler++;
   }
   else{
    while(end){
     if(cnt2>groesse){
      end = false;
     }
     cnt++;
     int hashKey2=hash2(hashKey, cnt, groesse);
     if(array[hashKey2]==0 || array[hashKey2]==zahl){
      zaehler++;
      end = false;
     }
     else{
      zaehler++;
     }
     cnt2++;
    }
   }   
  }
  return zaehler;
 }
 
 public static void main(String[] args){
  double groesse=128;
  int counter=10;
  int counterC=0;
  double Cn=0;
  double Cn1=0;
  double a=0;
  int Hash_array[] = new int[(int) groesse];
  int Zuf_array[] = new int[(int) groesse];
  int fillStatePrevTemp=0;
  
  while(counter<=99){
   int counter2=0;
   
   int fillStateTemp=(int) Math.round((groesse/100)*counter);
   hashInsert((int) groesse, Hash_array, Zuf_array, fillStateTemp, fillStatePrevTemp);
   fillStatePrevTemp=fillStateTemp;
   
   //Performancetest
   counterC=hashSearch((int) groesse, Hash_array, 64);
   counterC=(counterC/64);
   
   //Anzeige Konsole
   System.out.print(counter+”% “);
   
   //Anzeige von befüllten Arrayfeldern!
   for(int j=0; j<Hash_array.length; j++){
    if(Hash_array[j]!=0){
     System.out.print(“|”);
    }
    else{
     System.out.print(” “);
    }
   }
   
   //Zählen der vorhandenen Cluster
   int j=0;
   while(j<Hash_array.length){
    if(Hash_array[j]!=0){
     while(j<Hash_array.length && Hash_array[j]!=0){
      j++;
     }
     counter2++;
    }
    else{
     while(j<Hash_array.length && Hash_array[j]==0){
      j++;
     }
    }
   }
   
   if(Hash_array[0]!=0 && Hash_array[(int) (groesse-1)]!=0){
    counter2- -;
   }
   
   //Cn und Cn’ Berechnung
   a=counter/100.00;
   Cn=1+Math.log(1/(1-a))-(a/2);
   Cn1=(1/(1-a))-a+Math.log(1/(1-a));
   
   System.out.print(” “+counter2);
   System.out.print(” — C=”+counterC);
   System.out.print(” Cn: “+Cn);
   System.out.print(” Cn’: “+Cn1);
   System.out.println(” “);
   if(counter!=90){
    counter=counter+10;
   }
   else{
    counter=counter+9;
   }
  } 
 }
}

AWStats: Statistik des Vorjahres archivieren

Ich hatte leider vergessen am 31.12.09 die fertig erstellte Statistik von AWStats zu sichern. Demzufolge wurde sie beim nächsten Update mit der Neuen von 2010 überschrieben. :-( Dies stellte allerdings kein Problem dar, da die XML-Dateien mit den nötigen Daten nicht überschrieben werden. Kurz um die XML-Dateien auf einen anderen Rechner kopiert und AWStats samt Perl installiert. Jetzt wurde noch das Datum auf 2009 zurückgestellt und mittels der folgenden Befehle aus den XML-Dateien die neue Statistik erstellt:

perl awstats.pl -config=mysite -output -staticlinks -month=all -year=all > index.html
perl awstats.pl -config=mysite -output=alldomains -staticlinks -month=all -year=all > awstats.keil.eu.alldomains.html
perl awstats.pl -config=mysite -output=allhosts -staticlinks -month=all -year=all > awstats.keil.eu.allhosts.html
perl awstats.pl -config=mysite -output=lasthosts -staticlinks -month=all -year=all > awstats.keil.eu.lasthosts.html
perl awstats.pl -config=mysite -output=unknownip -staticlinks -month=all -year=all > awstats.keil.eu.unknownip.html
perl awstats.pl -config=mysite -output=alllogins -staticlinks -month=all -year=all > awstats.keil.eu.alllogins.html
perl awstats.pl -config=mysite -output=lastlogins -staticlinks -month=all -year=all > awstats.keil.eu.lastlogins.html
perl awstats.pl -config=mysite -output=allrobots -staticlinks -month=all -year=all > awstats.keil.eu.allrobots.html
perl awstats.pl -config=mysite -output=lastrobots -staticlinks -month=all -year=all > awstats.keil.eu.lastrobots.html
perl awstats.pl -config=mysite -output=urldetail -staticlinks -month=all -year=all > awstats.keil.eu.urldetail.html
perl awstats.pl -config=mysite -output=urlentry -staticlinks -month=all -year=all > awstats.keil.eu.urlentry.html
perl awstats.pl -config=mysite -output=urlexit -staticlinks -month=all -year=all > awstats.keil.eu.urlexit.html
perl awstats.pl -config=mysite -output=browserdetail -staticlinks -month=all -year=all > awstats.keil.eu.browserdetail.html
perl awstats.pl -config=mysite -output=osdetail -staticlinks -month=all -year=all > awstats.keil.eu.osdetail.html
perl awstats.pl -config=mysite -output=unknownbrowser -staticlinks -month=all -year=all > awstats.keil.eu.unknownbrowser.html
perl awstats.pl -config=mysite -output=unknownos -staticlinks -month=all -year=all > awstats.keil.eu.unknownos.html
perl awstats.pl -config=mysite -output=refererse -staticlinks -month=all -year=all > awstats.keil.eu.refererse.html
perl awstats.pl -config=mysite -output=refererpages -staticlinks -month=all -year=all > awstats.keil.eu.refererpages.html
perl awstats.pl -config=mysite -output=keyphrases -staticlinks -month=all -year=all > awstats.keil.eu.keyphrases.html
perl awstats.pl -config=mysite -output=keywords -staticlinks -month=all -year=all > awstats.keil.eu.keywords.html
perl awstats.pl -config=mysite -output=errors404 -staticlinks -month=all -year=all > awstats.keil.eu.errors404.html

Semesterendspurt

Das 3. Semester nähert sich seinem Ende und daher gibt es wieder viel zu tun. Die letzten Aufgaben für die Praktika müssen fertig gestellt werden. Die Klausuren rücken näher, daher wird auch hierfür gelernt. Dann steht noch die 5. Jahreszeit ins Haus! Denn bei uns im Rheinland herrscht wieder Prinz Karneval. :D
Neben diesen Aufgaben und dem Vergnügen Karneval, habe ich noch 2 Workshops vorbereitet. Der erste Workshop findet am 19.01.2010 am Campus Gummersbach statt und befasst sich mit dem Thema “Booten von VHD mit Windows 7 und Windows Server 2008 R2”. Der zweite Workshop dagegen findet aller Voraussicht nach am 22.01.2010 an der Uni Bonn statt und behandelt das Thema “Grundlagen der Windows Server Administration”.

Außerdem steht wie jedes Jahr im März die CeBIT auf dem Programm, hier dürft ihr auch wieder Einträge zu den neusten vorgestellten Technologien und Produkten erwarten.