Changes between Initial Version and Version 1 of GEC20Agenda/LabWiki/ModuleC/Execute


Ignore:
Timestamp:
06/18/14 15:35:52 (5 years ago)
Author:
zink@cs.umass.edu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC20Agenda/LabWiki/ModuleC/Execute

    v1 v1  
     1= Module A Execute Experiment =
     2
     3== 3. Instrument your Application using !LabWiki ==
     4
     5In this part of Module A you will learn how you can use !LabWiki to execute an experiment on the slice you
     6reserved in the [wiki:GEC20Agenda/LabWiki/ModuleA/DesignSetup previous step].
     7
     8=== 3.1 Design and Execute measurement in !LabWiki ===
     9
     10
     11=== 3.1.1. The "Plan" Window ===
     12To get started point your browser to [http://labwiki.casa.umass.edu:4000/]. Labwiki has three major windows. We will focus on the leftmost window first. This is the "Planning" window in which you document your experiment. (This is somewhat the equivalent of an electronic lab journal.) Documents are written in [http://daringfireball.net/projects/markdown/ Markdown].
     13
     14At the top of that window is a text field which you can use to search for existing MD scripts. Type "learningswitch" in the field and then select "learningswitch.md" from the list of files that are offered. This document has some information on the experiment that will be performed in Module A of the tutorial.
     15
     16=== 3.1.2 The "Prepare" Window ===
     17
     18The "Prepare" (middle) window allows you to define your experiment through and [http://mytestbed.net/projects/omf/wiki/OMF_Main_Page OMF]  experiment script specified in [http://mytestbed.net/projects/omf6/wiki/OEDLOMF6 OMF Experiment Description Language] (OEDL).
     19
     20At the top of that window is a text field which you can use to search for existing OEDL scripts. Type "GEC20" in the field and then select "GEC20-learningswitch.oedl" from the list of files that are offered. This list the experiment script in the field below.
     21
     22For reference, we show the experiment script here:
     23{{{
     24defProperty('source1', "nodea-gimitest1", "ID of a resource")
     25defProperty('source2', "switch-gimitest1", "ID of a resource")
     26
     27
     28defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
     29defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")
     30
     31defProperty('sinkaddr21', '192.168.1.9', "Ping destination address")
     32defProperty('sinkaddr23', '192.168.1.10', "Ping destination address")
     33
     34defApplication('ping') do |app|
     35  app.description = 'Simple Definition for the ping-oml2 application'
     36  # Define the path to the binary executable for this application
     37  app.binary_path = '/usr/local/bin/ping-oml2'
     38  # Define the configurable parameters for this application
     39  # For example if target is set to foo.com and count is set to 2, then the
     40  # application will be started with the command line:
     41  # /usr/bin/ping-oml2 -a foo.com -c 2
     42  app.defProperty('target', 'Address to ping', '-a', {:type => :string})
     43  app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
     44  # Define the OML2 measurement point that this application provides.
     45  # Here we have only one measurement point (MP) named 'ping'. Each measurement
     46  # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
     47  app.defMeasurement('ping') do |m|
     48    m.defMetric('dest_addr',:string)
     49    m.defMetric('ttl',:uint32)
     50    m.defMetric('rtt',:double)
     51    m.defMetric('rtt_unit',:string)
     52  end
     53end
     54
     55defApplication('trema') do |app|
     56  app.description = 'This app runs trema from command line'
     57  app.binary_path = '/usr/bin/trema run /root/learning-switch.rb'
     58end
     59
     60defGroup('Source2', property.source2) do |node|
     61  node.addApplication("trema")
     62end
     63
     64defGroup('Source1', property.source1) do |node|
     65  node.addApplication("ping") do |app|
     66    app.setProperty('target', property.sinkaddr12)
     67    app.setProperty('count', 30)
     68    #app.setProperty('interval', 1)
     69    app.measure('ping', :samples => 1)
     70  end
     71  node.addApplication("ping") do |app|
     72    app.setProperty('target', property.sinkaddr13)
     73    app.setProperty('count', 30)
     74    #app.setProperty('interval', 1)
     75    app.measure('ping', :samples => 1)
     76  end
     77   node.addApplication("ping") do |app|
     78    app.setProperty('target', property.sinkaddr21)
     79    app.setProperty('count', 30)
     80    #app.setProperty('interval', 1)
     81    app.measure('ping', :samples => 1)
     82  end
     83   node.addApplication("ping") do |app|
     84    app.setProperty('target', property.sinkaddr23)
     85    app.setProperty('count', 30)
     86    #app.setProperty('interval', 1)
     87    app.measure('ping', :samples => 1)
     88  end
     89end
     90
     91onEvent(:ALL_UP_AND_INSTALLED) do |event|
     92  info "Starting the ping"
     93  after 2 do
     94    group('Source2').startApplications
     95  end
     96  after 10 do
     97    group('Source1').startApplications
     98  end
     99  after 80 do
     100    info "Stopping the ping"
     101    allGroups.stopApplications
     102    Experiment.done
     103  end
     104end
     105
     106defGraph 'RTT' do |g|
     107  g.ms('ping').select(:oml_seq, :dest_addr, :rtt)
     108  g.caption "RTT of received packets."
     109  g.type 'line_chart3'
     110  g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
     111  g.xaxis :legend => 'oml_seq'
     112  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
     113end
     114}}}
     115
     116=== 3.1.3 Start your application from !LabWiki ===
     117
     118To start your experiment, simply drag the icon that is to the left of the file name (see figure below) from the middle (Prepare) to the right (Execute) window.
     119That will automatically fill out the experiment relevant information in this window and allow you to start the actual experiment by clicking on the "Start Experiment" button.
     120
     121[[Image(LW-execute.png, 80%)]]
     122
     123Explanation of the fields in the Execute window:
     124
     125* name: In this field you specify the name of your experiment.
     126
     127* project: This pull-down menu list all the projects you are currently a member of. Select the project that contains the slice you want to run your experiment on.
     128
     129* experiment context: With the context you can specify a certain set of experiments. E.g., a series of experiments you run under a certain set of startup parameters.
     130
     131* slice: This pull down menu lists all slice that have been created under "project". Select the slice you to run your experiment on.
     132
     133=== 3.1.4 During experiment execution ===
     134
     135After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
     136The figure below gives an example for the Execute window during experiment execution.
     137
     138[[Image(LW-executing.png, 80%)]]
     139
     140Now the window lists experiment properties, one or several live graphs (if they have been specified in the OEDL script), and logging information. The latter would be a good starting point for trouble shooting, should your experiment not run as expected.
     141
     142= [wiki:GEC20Agenda/LabWiki/ModuleC/DesignSetup Design] =
     143= [wiki:GEC20Agenda/LabWiki/ModuleC/Finish Next: Finish] =