User Tools

Site Tools


assignment-2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
assignment-2 [2008/10/01 09:38]
suman
assignment-2 [2008/10/10 19:32] (current)
arulraj more clarity
Line 4: Line 4:
       - Read the “Defining Experiments” section in http://​www.cs.cmu.edu/​~emulator/​doc/​index.html       - Read the “Defining Experiments” section in http://​www.cs.cmu.edu/​~emulator/​doc/​index.html
       - Read about “Path based Channel Mode” and “Loss Model” from http://​www.cs.cmu.edu/​~emulator/​doc/​softwareDoc/​SignalEnvironment.html . Skim through the rest of the page.       - Read about “Path based Channel Mode” and “Loss Model” from http://​www.cs.cmu.edu/​~emulator/​doc/​softwareDoc/​SignalEnvironment.html . Skim through the rest of the page.
-  ​To measure ​the effect ​of distance on data transfer ​rate between ​two wireless nodes in emulated ​physical ​environment ​using CMUEmulab. A sample experiment program has been written out for you. You will have to first run the sample experiment provided and play around with the emalator testbed. Then you will have to build on the sample experiment by writing code in Java to measure the effect of distance between wireless nodes on data transfer rates and present them as a graph.+      ​Read the Javadoc for the Emulator API - http://​www.cs.cmu.edu/​~emulator/​doc/​api/​index.html. 
 +  - Effect ​of physical ​distance on data transfer ​performance:​ In this experiment you will study the impact of physical separation ​between ​a transmitter and a receiver on their data performance. The physical ​distance will be emulated ​using CMUEmulab. A sample experiment program has already ​been written out for you. You will have to first run the sample experiment provided and play around with the emalator testbed. Then you will have to build on the sample experiment by writing code in Java to measure the effect of distance between wireless nodes on data transfer rates and present them as a graph.
  
 __**Pre-requisites for this assignment:​**__ __**Pre-requisites for this assignment:​**__
  
-  - Username , Password ​for your team given in Class+  - Username , Password ​: These will be given to you by the TA during class on Oct 03, 2008
-  - A computer with ssh facility ( you can use putty from a windows machine)+  - A computer with ssh facility ( you can use putty from a windows machine )
  
 __**Part A: Setting up the emulator before you can run the experiment on it**__ __**Part A: Setting up the emulator before you can run the experiment on it**__
Line 15: Line 16:
 __Step 1 : Creating an Account:__ __Step 1 : Creating an Account:__
  
-  - Go to http://​boss.cmcl.cs.cmu.edu and complete the registration form by clicking the Request Account icon on the left. You should ​join the “emulator” ​project. You can upload your ssh key later.+  - Go to http://​boss.cmcl.cs.cmu.edu and complete the registration form by clicking the Request Account icon on the left. In the page that shows up, click on "Join an Existing Project"​. In the next page that shows up, use the team name for username. Create your own password string. (E.g. username for Team 1 will be "​team1"​ and password can be '​T3am1'​). And use the email address of one of the team members. You should ​use “emulator” ​for the '​Project Name' field. You can upload your ssh key later. ​//**Note: From now, whenever you want to login to CMUEmuLab web page at http://​boss.cmcl.cs.cmu.edu , you will use the password you just created. But, to login to emucontrol-1.ece.cmu.edu host ( as you go forward in the assignment) you will be using your team name ( like '​team1'​ ) as password.**//​
   - Check your email for an account message, and click on the verification link to confirm that you requested the account.   - Check your email for an account message, and click on the verification link to confirm that you requested the account.
   - Log in on http://​boss.cmcl.cs.cmu.edu using your account to complete the account request process.   - Log in on http://​boss.cmcl.cs.cmu.edu using your account to complete the account request process.
Line 27: Line 28:
     - “cp ~arulraj/​.bashrc ~/​.bashrc”     - “cp ~arulraj/​.bashrc ~/​.bashrc”
     - “cp -r ~xiaohuiw/​emulab/​run/​examples .” : This folder has more example experiments that try to teach different parts of the emulator.     - “cp -r ~xiaohuiw/​emulab/​run/​examples .” : This folder has more example experiments that try to teach different parts of the emulator.
-    - “cp ~arulraj/example.tgz .” : This is the experiment that we will be running . Read the files in this archive: ​+    - “cp ~arulraj/experiment.tgz .” : This is the experiment that we will be running . Read the files in this archive: ​
       - The experiment.xml file is the script describing our experiment setup. Details on scripts can be found at http://​www.cs.cmu.edu/​~emulator/​doc/​scripts/​Scripts.html.       - The experiment.xml file is the script describing our experiment setup. Details on scripts can be found at http://​www.cs.cmu.edu/​~emulator/​doc/​scripts/​Scripts.html.
       - The experiment.java file is the user code describing what will be done as part of the experiment. The experiment.java file is self explanatory with comments and more details on user code can be found at http://​www.cs.cmu.edu/​~emulator/​doc/​softwareDoc/​UserCode.html. After any change to the experiment.java file , you should compile the .java file by using the command “javac experiment.java” which will produce experiment.class .       - The experiment.java file is the user code describing what will be done as part of the experiment. The experiment.java file is self explanatory with comments and more details on user code can be found at http://​www.cs.cmu.edu/​~emulator/​doc/​softwareDoc/​UserCode.html. After any change to the experiment.java file , you should compile the .java file by using the command “javac experiment.java” which will produce experiment.class .
Line 42: Line 43:
   - As you are performing this section, if you have any doubts or run into trouble , you might want to look at http://​www.cs.cmu.edu/​~prs/​wireless08/​tutorial01.html which gives a more detailed description of how to setup and run an experiment on the emulator testbed. If you still have trouble , then feel free to email CS707 TAs ( cc the class email list if you see fit.)   - As you are performing this section, if you have any doubts or run into trouble , you might want to look at http://​www.cs.cmu.edu/​~prs/​wireless08/​tutorial01.html which gives a more detailed description of how to setup and run an experiment on the emulator testbed. If you still have trouble , then feel free to email CS707 TAs ( cc the class email list if you see fit.)
  
-__Step ​3: Setting up the Experiment:​__+__**Step ​3: Setting up the Experiment:**__
  
   - Check if 2 or more pcd610 nodes are free at https://​boss.cmcl.cs.cmu.edu/​shownodetype.php3?​node_type=pcd610. If so, proceed to Step 3 , otherwise wait and come back later until you see 2 or more nodes free.   - Check if 2 or more pcd610 nodes are free at https://​boss.cmcl.cs.cmu.edu/​shownodetype.php3?​node_type=pcd610. If so, proceed to Step 3 , otherwise wait and come back later until you see 2 or more nodes free.
Line 48: Line 49:
      - Enter  <​username>​-exp001 in username field. Substitue <​username>​ with your real username. For example, I will enter arulraj-exp001      - Enter  <​username>​-exp001 in username field. Substitue <​username>​ with your real username. For example, I will enter arulraj-exp001
      - Enter “assignment 1 - University of Wisconsin Students” in the description field.      - Enter “assignment 1 - University of Wisconsin Students” in the description field.
-     - Download archive experiment.tar.gz or experiment.zip from  <Place holder>. Select the 2node.ns file from the downloaded archive and upload in the field “Your NS file”+     - Download archive experiment.tgz using command "scp <​username>​@emucontrol-1.ece.cmu.edu:​~arulraj/​experiment.tgz". Select the 2node.ns file from the downloaded archive and upload in the field “Your NS file”
      - Change Linktest Option to “Skip Linktest”      - Change Linktest Option to “Skip Linktest”
-     - Enter 1 hours in the “Idle Swap feild” and hours in  “Max Duration” field.+     - Enter 1 hours in the “Idle Swap feild” and hours in  “Max Duration” field.
      - Click Submit      - Click Submit
      - Watch the console that shows up. You will be able to see when the assignment is swapped in. Also, you will get an email confirmation of the same.      - Watch the console that shows up. You will be able to see when the assignment is swapped in. Also, you will get an email confirmation of the same.
  
-__**Step ​3: Running the experiment:​**__+__**Step ​4: Running the experiment:​**__
  
-Once the experiment starts , you will have hours to complete the experiment ( since we specifed 3 hrs in Max Duration field while setting up the experiment Step 3-(ii)-e above. Follow these steps to run the experiment:​ +Once the experiment starts , you will have hours to complete the experiment ( since we specifed 3 hrs in Max Duration field while setting up the experiment Step 3-(ii)-e above. Follow these steps to run the experiment:​
   - Login to emucontrol-1.ece.cmu.edu and type the command "​emulatorDaemon <​username>​ emulator <​experimentname>"​. This command will complete the swap in process. This step is very important.   - Login to emucontrol-1.ece.cmu.edu and type the command "​emulatorDaemon <​username>​ emulator <​experimentname>"​. This command will complete the swap in process. This step is very important.
-  - Login to the nodes allocated in this experiment by “ssh <​username>​@nodew1.leo-exp001.emulator.cmcl.cs.cmu.edu” and “ ssh <​username>​@nodew2.leo-exp001.emulator.cmcl.cs.cmu.edu”. In each of the nodes, run the command : “/​opt/​jdk1.6.0_05/​bin/​rmiregistry &” and “ ~/​emuNode/​nodeDaemon”. You should see some output like  “NodeDaemon bound”. Now each of the wireless nodes has a the NodeDeamon on them bound to the emucontrol-1 which waits for commands to execute on the wireless nodes.+  - Login to the nodes allocated in this experiment ​(Note : You should first login to ops.cmcl.cs.cmu.edu and then login to the wireless nodes from there otherwise the domain names for the wireless nodes won't be resolved) ​by “ssh <​username>​@nodew1.leo-exp001.emulator.cmcl.cs.cmu.edu” and “ ssh <​username>​@nodew2.leo-exp001.emulator.cmcl.cs.cmu.edu”. In each of the nodes, run the command : “/​opt/​jdk1.6.0_05/​bin/​rmiregistry &” and “ ~/​emuNode/​nodeDaemon”. You should see some output like  “NodeDaemon bound”. Now each of the wireless nodes has a the NodeDeamon on them bound to the emucontrol-1 which waits for commands to execute on the wireless nodes.
   - Login to emucontrol-1.ece.cmu.edu and change your current directory to the directory where you expanded the archive experiment.tgz that we downloaded earlier in Step 2-(ii)-(d).   - Login to emucontrol-1.ece.cmu.edu and change your current directory to the directory where you expanded the archive experiment.tgz that we downloaded earlier in Step 2-(ii)-(d).
   - Compile experiment.java into experiment.class using the command “javac experiment.java” ​   - Compile experiment.java into experiment.class using the command “javac experiment.java” ​
-  - Run the command “emuRun experiment.xml” . This will emulate the experiment and write out results into files in the same directory. The output files all have names starting with exp01. Most of the stderr files created will usually be empty and you can delete such empty file using the command “ file -size 0 -delete” so that you can concentrate on the rest of the non-empty files that have the iperf command output with data transfer rates. Take a look at the result files.+  - Run the command “emuRun experiment.xml” . This will emulate the experiment and write out results into files in the same directory. The output files all have names starting with exp01. Most of the stderr files created will usually be empty and you can delete such empty file using the command “ find -size 0 -delete” so that you can concentrate on the rest of the non-empty files that have the iperf command output with data transfer rates. Take a look at the result files.
   - Now change the experiment.java file so that you can gather enough data to present on how distance of separation between wireless nodes affect the data transfer rates.   - Now change the experiment.java file so that you can gather enough data to present on how distance of separation between wireless nodes affect the data transfer rates.
   - Once you have completed executing the experiment, we will have to swap out the experiment so that the physical resources held by this experiment are released for use by others. For this, go to the https://​boss.cmcl.cs.cmu.edu/​ and click on "My Emulab"​ link under "​Experimentation tab". On the page that shows up, click on the EID link and you will be taken to the experiment page. Click on Swap "​Experiment Out" link on the left menu. Once the swap out completes, login to emucontrol-1.ece.cmu.edu and type the command "​emulatorDaemon <​username>​ emulator <​experimentname>"​. This command will complete the swap in process. This step is very important.   - Once you have completed executing the experiment, we will have to swap out the experiment so that the physical resources held by this experiment are released for use by others. For this, go to the https://​boss.cmcl.cs.cmu.edu/​ and click on "My Emulab"​ link under "​Experimentation tab". On the page that shows up, click on the EID link and you will be taken to the experiment page. Click on Swap "​Experiment Out" link on the left menu. Once the swap out completes, login to emucontrol-1.ece.cmu.edu and type the command "​emulatorDaemon <​username>​ emulator <​experimentname>"​. This command will complete the swap in process. This step is very important.
Line 68: Line 69:
 __**Part C: What to hand-in ?**__ __**Part C: What to hand-in ?**__
  
-  - You have to hand in your java experiment ​file built on top of the sample experiment.java ​file provided with an explanation of the approach ​you took to gather ​the needed ​data. +  - You have to hand in your modified ​java file (built on top of the sample experiment.java) which you used to perform the experiment and to collect ​the data presented in the graph with sufficient documentation of your approach
-  - You have to hand the result you gathered in a tabular format / graphical format.+  - You also have to hand in the result you gathered ​through the experiment ​in a tabular format/​graphical format.
  
assignment-2.1222871918.txt.gz · Last modified: 2008/10/01 09:38 by suman