wiki:GEC20Agenda/LabWiki/ModuleE/Execute

Version 1 (modified by dbhat@bbn.com, 5 years ago) (diff)

--

Module E Flow Statistics Experiment in LabWiki (on extended topology)

3. Instrument your Application using LabWiki

In this part we will run the OEDL script that we wrote in the previous step. The OEDL script called step3_learnswitch.oedl

3.1.1. The "Plan" Window

Now you can use the original MD script and modify it with new information on the extended topology and the experiment you are executing on the extended topology.

Look here if you have to refresh your memory on how to use the prepare window.

TIP: 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: <img src="http://emmy9.casa.umass.edu/GEC-20/threenoderoute.png">. The image has to be hosted on a webserver.

3.1.2 The "Prepare" Window

For reference, we show the extended experiment script here:

defProperty('source1', "nodea-dbhatpostboot", "ID of a resource")
defProperty('source2', "switch1-dbhatpostboot", "ID of a resource")
defProperty('source3', "switch2-dbhatpostboot", "ID of a resource")


defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")

defProperty('sinkaddr21', '192.168.1.13', "Ping destination address")
defProperty('sinkaddr23', '192.168.1.14', "Ping destination address")
defProperty('sinkaddr24', '192.168.1.15', "Ping destination address")


defApplication('ping') do |app|
  app.description = 'Simple Definition for the ping-oml2 application'
  # Define the path to the binary executable for this application
  app.binary_path = '/usr/local/bin/ping-oml2'
  # Define the configurable parameters for this application
  # For example if target is set to foo.com and count is set to 2, then the 
  # application will be started with the command line:
  # /usr/bin/ping-oml2 -a foo.com -c 2
  app.defProperty('target', 'Address to ping', '-a', {:type => :string})
  app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
  # Define the OML2 measurement point that this application provides.
  # Here we have only one measurement point (MP) named 'ping'. Each measurement
  # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
  app.defMeasurement('ping') do |m|
    m.defMetric('dest_addr',:string)
    m.defMetric('ttl',:uint32)
    m.defMetric('rtt',:double)
    m.defMetric('rtt_unit',:string)
  end
end

defApplication('trema') do |app|
  app.description = 'This app runs trema from command line'
  app.binary_path = '/usr/bin/trema run /root/learning-switch.rb'
end
defGroup('Source2', property.source2, property.source3) do |node|
  node.addApplication("trema")
end
defGroup('Source1', property.source1) do |node|
  node.addApplication("ping") do |app|
    app.setProperty('target', property.sinkaddr12)
    app.setProperty('count', 30)
    #app.setProperty('interval', 1)
    app.measure('ping', :samples => 1)
  end
  node.addApplication("ping") do |app|
    app.setProperty('target', property.sinkaddr13)
    app.setProperty('count', 30)
    #app.setProperty('interval', 1)
    app.measure('ping', :samples => 1)
  end
   node.addApplication("ping") do |app|
    app.setProperty('target', property.sinkaddr21)
    app.setProperty('count', 30)
    #app.setProperty('interval', 1)
    app.measure('ping', :samples => 1)
  end
   node.addApplication("ping") do |app|
    app.setProperty('target', property.sinkaddr23)
    app.setProperty('count', 30)
    #app.setProperty('interval', 1)
    app.measure('ping', :samples => 1)
  end
  node.addApplication("ping") do |app|
    app.setProperty('target', property.sinkaddr24)
    app.setProperty('count', 30)
    #app.setProperty('interval', 1)
    app.measure('ping', :samples => 1)
  end
end





#defGroup('Sink1', property.sink1) do |node|
#end

#defGroup('Sink2', property.sink2) do |node|
#end

#defGroup('Sink3', property.sink3) do |node|
#end

#defGroup('Sink4', property.sink4) do |node|
#end

#defGroup('Sink5', property.sink5) do |node|
#end

onEvent(:ALL_UP_AND_INSTALLED) do |event|
  info "Starting the ping"
  after 2 do
    group('Source2').startApplications
  end
  after 10 do
    group('Source1').startApplications
  end
  after 80 do
    info "Stopping the ping"
    allGroups.stopApplications
    Experiment.done
  end
end

defGraph 'RTT' do |g|
  g.ms('ping').select(:oml_seq, :dest_addr, :rtt) 
  g.caption "RTT of received packets."
  g.type 'line_chart3'
  g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
  g.xaxis :legend => 'oml_seq'
  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
end

3.1.3 Start your application from LabWiki

To 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. That 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.

No image "LW-execute-extended.png" attached to GEC20Agenda/LabWiki/ModuleE/Execute

Explanation of the fields in the Execute window:

  • name: In this field you specify the name of your experiment.
  • 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.
  • 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.
  • slice: This pull down menu lists all slice that have been created under "project". Select the slice you to run your experiment on.

3.1.4 During experiment execution

After pressing the "Start" button, the Execute window will change and start showing status information about your experiment. The figure below gives an example for the Execute window during experiment execution.

No image "LW-executing.png" attached to GEC20Agenda/LabWiki/ModuleE/Execute

Now 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.

Attachments (2)

Download all attachments as: .zip