wiki:GENIExperimenter/Tutorials/LabWiki/ModuleE/Execute

Version 2 (modified by rrhain@bbn.com, 9 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 GEC21_flowstatistics.oedl

3.1.1. The "Plan" Window

Now you can use the original MD script and modify it with new information on the flow statistics and the experiment that measures the flow statistics using the Trema controller API

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

3.1.2 The "Prepare" Window

This experiment will do the following:

3.1.2a. Start Trema controllers on the two switch nodes in the topology shown in ModuleC

If you have run Module C before this (recommended), your controllers are already running and there is no need to do this step.

3.1.2b. Start an Iperf server on nodef

defApplication('iperfserv') do |app|
  app.description = "manually run Iperf server"
  app.binary_path = "/usr/bin/iperf -s"
end
defGroup('Receiver', property.theReceiver) do |node|
    node.addApplication("iperfserv") do |app|
    end
  end

3.1.2c. Start Iperf clients on nodea -nodee

defApplication('iperfclient') do |app|
  app.description = "manually run Iperf client"
  app.binary_path = "/usr/bin/iperf -c 192.168.1.15 -t 100 -P 2 -i 2"
end

defGroup('Sender2', property.theSender2) do |node|
    node.addApplication("iperfclient") do |app|
    end
  end

3.1.2d. Start Flow Statistics Measurement Application written in Step 1

3.1.2e. For reference, we show the Flow Statistics script here:

OEDL script

defProperty('source1', "switch1-egtest7", "ID of a resource")
defProperty('theSender1', "nodeb-egtest7", "ID of a resource")
defProperty('theSender2', "nodec-egtest7", "ID of a resource")
defProperty('theSender3', "noded-egtest7", "ID of a resource")
defProperty('theSender4', "nodea-egtest7", "ID of a resource")
defProperty('theSender5', "nodee-egtest7", "ID of a resource")
defProperty('theReceiver', "nodef-egtest7", "ID of a resource")

defProperty('intervalcol',"1", "Interval to Tail")

defProperty('pathfile', "/tmp/flowstats.out", "Path to file")

defApplication('ofstats') do |app|
  app.description = 'Simple Definition for the of-collect application'
  # Define the path to the binary executable for this application
  app.binary_path = '/usr/local/bin/learn_ofcollect.rb'
  app.defProperty('target', 'Address to output file', '-f', {:type => :string})
  app.defProperty("interval","Interval",'-i', {:type => :string})
  app.defMeasurement('wrapper_ofthroughput') do |m|
    m.defMetric(':srcaddr', :string)
    m.defMetric('throughput',:int64)
  end
end

defApplication('iperfserv') do |app|
  app.description = "manually run Iperf server"
  app.binary_path = "/usr/bin/iperf -s"
end
defApplication('iperfclient') do |app|
  app.description = "manually run Iperf client"
  app.binary_path = "/usr/bin/iperf -c 192.168.1.15 -t 200 -P 5 -i 2"
end
defApplication('clean_iperf') do |app|
  app.description = 'Some commands to ensure that we start with a clean slate'
  app.binary_path = 'killall -s9 iperf'
  app.quiet = true
end
defGroup('Source3', property.source1) do |node|
  node.addApplication("ofstats") do |app|
    app.setProperty('target', property.pathfile)
    app.setProperty('interval', property.intervalcol)
    app.measure('wrapper_ofthroughput', :samples => 1)
  end
end
 defGroup('Sender1', property.theSender1) do |node|
    node.addApplication("iperfclient") do |app|
    end
  end
  defGroup('Sender2', property.theSender2) do |node|
    node.addApplication("iperfclient") do |app|
    end
  end
  defGroup('Sender3', property.theSender3) do |node|
    node.addApplication("iperfclient") do |app|
    end
  end
  defGroup('Sender4', property.theSender4) do |node|
    node.addApplication("iperfclient") do |app|
    end
  end
  defGroup('Sender5', property.theSender5) do |node|
    node.addApplication("iperfclient") do |app|
    end
  end
  defGroup('Receiver', property.theReceiver) do |node|
    node.addApplication("iperfserv") do |app|
    end
  end

onEvent(:ALL_UP_AND_INSTALLED) do |event|
  info "Starting the collect"
  info "Starting the collect"
  after 2 do
    group('Receiver').startApplications
  end
  after 10 do
    group('Sender1').startApplications
    group('Source3').startApplications
  end
  after 20 do
    group('Sender2').startApplications 
  end
  after 40 do
    group('Sender3').startApplications
  end
  after 60 do
    group('Sender4').startApplications
  end
  after 80 do
    group('Sender5').startApplications
  end
  after 120 do
    info "Stopping the collect"
    allGroups.stopApplications
    Experiment.done
  end
end

defGraph 'Throughput' do |g|
  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :throughput, :srcaddr) 
  g.caption "Throughput of Flows"
  g.type 'line_chart3'
  g.mapping :x_axis => :oml_ts_client, :y_axis => :throughput, :group_by => :srcaddr
  g.xaxis :legend => 'oml_ts'
  g.yaxis :legend => 'Throughput', :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.

http://groups.geni.net/geni/raw-attachment/wiki/GENIExperimenter/Tutorials/LabWiki/ModuleE/Execute/LW_wiki_flowstats1.png

Explanation of the fields in the Execute window: