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


Ignore:
Timestamp:
06/19/14 18:47:52 (7 years ago)
Author:
dbhat@bbn.com
Comment:

--

Legend:

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

    v1 v1  
     1= Module E Flow Statistics Experiment in !LabWiki (on extended topology) =
     2
     3== 3. Instrument your Application using !LabWiki ==
     4
     5In this part we will run the OEDL script that we wrote in the previous step. The OEDL script called step3_learnswitch.oedl
     6
     7=== 3.1.1. The "Plan" Window ===
     8Now you can use the original MD script and modify it with new information on the extended topology and the
     9experiment you are executing on the extended topology.
     10
     11
     12Look [wiki:GEC20Agenda/LabWiki/ModuleA/Execute here] if you have to refresh your memory on how to use the prepare window.
     13
     14TIP: To add images to your markdown script, please add a line similar to below into your .md file at the place where you want the image to appear:
     15<img src="http://emmy9.casa.umass.edu/GEC-20/threenoderoute.png">.
     16The image has to be hosted on a webserver.
     17
     18=== 3.1.2 The "Prepare" Window ===
     19
     20For reference, we show the extended experiment script here:
     21{{{
     22defProperty('source1', "nodea-dbhatpostboot", "ID of a resource")
     23defProperty('source2', "switch1-dbhatpostboot", "ID of a resource")
     24defProperty('source3', "switch2-dbhatpostboot", "ID of a resource")
     25
     26
     27defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
     28defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")
     29
     30defProperty('sinkaddr21', '192.168.1.13', "Ping destination address")
     31defProperty('sinkaddr23', '192.168.1.14', "Ping destination address")
     32defProperty('sinkaddr24', '192.168.1.15', "Ping destination address")
     33
     34
     35defApplication('ping') do |app|
     36  app.description = 'Simple Definition for the ping-oml2 application'
     37  # Define the path to the binary executable for this application
     38  app.binary_path = '/usr/local/bin/ping-oml2'
     39  # Define the configurable parameters for this application
     40  # For example if target is set to foo.com and count is set to 2, then the
     41  # application will be started with the command line:
     42  # /usr/bin/ping-oml2 -a foo.com -c 2
     43  app.defProperty('target', 'Address to ping', '-a', {:type => :string})
     44  app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
     45  # Define the OML2 measurement point that this application provides.
     46  # Here we have only one measurement point (MP) named 'ping'. Each measurement
     47  # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
     48  app.defMeasurement('ping') do |m|
     49    m.defMetric('dest_addr',:string)
     50    m.defMetric('ttl',:uint32)
     51    m.defMetric('rtt',:double)
     52    m.defMetric('rtt_unit',:string)
     53  end
     54end
     55
     56defApplication('trema') do |app|
     57  app.description = 'This app runs trema from command line'
     58  app.binary_path = '/usr/bin/trema run /root/learning-switch.rb'
     59end
     60defGroup('Source2', property.source2, property.source3) do |node|
     61  node.addApplication("trema")
     62end
     63defGroup('Source1', property.source1) do |node|
     64  node.addApplication("ping") do |app|
     65    app.setProperty('target', property.sinkaddr12)
     66    app.setProperty('count', 30)
     67    #app.setProperty('interval', 1)
     68    app.measure('ping', :samples => 1)
     69  end
     70  node.addApplication("ping") do |app|
     71    app.setProperty('target', property.sinkaddr13)
     72    app.setProperty('count', 30)
     73    #app.setProperty('interval', 1)
     74    app.measure('ping', :samples => 1)
     75  end
     76   node.addApplication("ping") do |app|
     77    app.setProperty('target', property.sinkaddr21)
     78    app.setProperty('count', 30)
     79    #app.setProperty('interval', 1)
     80    app.measure('ping', :samples => 1)
     81  end
     82   node.addApplication("ping") do |app|
     83    app.setProperty('target', property.sinkaddr23)
     84    app.setProperty('count', 30)
     85    #app.setProperty('interval', 1)
     86    app.measure('ping', :samples => 1)
     87  end
     88  node.addApplication("ping") do |app|
     89    app.setProperty('target', property.sinkaddr24)
     90    app.setProperty('count', 30)
     91    #app.setProperty('interval', 1)
     92    app.measure('ping', :samples => 1)
     93  end
     94end
     95
     96
     97
     98
     99
     100#defGroup('Sink1', property.sink1) do |node|
     101#end
     102
     103#defGroup('Sink2', property.sink2) do |node|
     104#end
     105
     106#defGroup('Sink3', property.sink3) do |node|
     107#end
     108
     109#defGroup('Sink4', property.sink4) do |node|
     110#end
     111
     112#defGroup('Sink5', property.sink5) do |node|
     113#end
     114
     115onEvent(:ALL_UP_AND_INSTALLED) do |event|
     116  info "Starting the ping"
     117  after 2 do
     118    group('Source2').startApplications
     119  end
     120  after 10 do
     121    group('Source1').startApplications
     122  end
     123  after 80 do
     124    info "Stopping the ping"
     125    allGroups.stopApplications
     126    Experiment.done
     127  end
     128end
     129
     130defGraph 'RTT' do |g|
     131  g.ms('ping').select(:oml_seq, :dest_addr, :rtt)
     132  g.caption "RTT of received packets."
     133  g.type 'line_chart3'
     134  g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
     135  g.xaxis :legend => 'oml_seq'
     136  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
     137end
     138}}}
     139
     140=== 3.1.3 Start your application from !LabWiki ===
     141
     142To 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.
     143That 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.
     144
     145[[Image(LW-execute-extended.png, 80%)]]
     146
     147Explanation of the fields in the Execute window:
     148
     149* name: In this field you specify the name of your experiment.
     150
     151* 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.
     152
     153* 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.
     154
     155* slice: This pull down menu lists all slice that have been created under "project". Select the slice you to run your experiment on.
     156
     157=== 3.1.4 During experiment execution ===
     158
     159After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
     160The figure below gives an example for the Execute window during experiment execution.
     161
     162[[Image(LW-executing.png, 80%)]]
     163
     164Now 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.