Changes between Initial Version and Version 1 of GENIFIRE/Labwiki/Execute


Ignore:
Timestamp:
07/07/14 03:38:12 (10 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIFIRE/Labwiki/Execute

    v1 v1  
     1= Part 2 Flow Statistics Experiment in !LabWiki =
     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 firegenipart2.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 flow statistics and the
     9experiment that measures the flow statistics using the Trema controller API
     10
     11
     12Look [wiki:GENIFIRE/Labwiki/Part1/Execute here] if you have to refresh your memory on how to use the prepare window.
     13=== 3.1.2 The "Prepare" Window ===
     14
     15This experiment will do the following: [[BR]]
     16
     17==== 3.1.2a. Start Trema controllers on the two switch nodes in the topology shown in [http://groups.geni.net/geni/wiki/GEC20Agenda/LabWiki/ModuleC/DesignSetup ModuleC] ====
     18
     19Show in [http://groups.geni.net/geni/wiki/GENIFIRE/Labwiki/Part1/DesignSetup Part1]
     20
     21==== 3.1.2b. Start an Iperf server on nodef ====
     22
     23{{{
     24defApplication('iperfserv') do |app|
     25  app.description = "manually run Iperf server"
     26  app.binary_path = "/usr/bin/iperf -s"
     27end
     28defGroup('Receiver', property.theReceiver) do |node|
     29    node.addApplication("iperfserv") do |app|
     30    end
     31  end
     32}}}
     33
     34
     35==== 3.1.2c. Start Iperf clients on nodea -nodee ====
     36
     37
     38{{{
     39defApplication('iperfclient') do |app|
     40  app.description = "manually run Iperf client"
     41  app.binary_path = "/usr/bin/iperf -c 192.168.1.15 -t 100 -P 2 -i 2"
     42end
     43
     44defGroup('Sender2', property.theSender2) do |node|
     45    node.addApplication("iperfclient") do |app|
     46    end
     47  end
     48}}}
     49
     50==== 3.1.2d. Start Flow Statistics Measurement Application written in Step 1 ====
     51
     52==== 3.1.2e. For reference, we show the Flow Statistics script here: ====
     53OEDL script
     54{{{
     55
     56defProperty('source1', "switch1-exttest7", "ID of a resource")
     57defProperty('theSender1', "nodeb-exttest7", "ID of a resource")
     58defProperty('theSender2', "nodec-exttest7", "ID of a resource")
     59defProperty('theSender3', "noded-exttest7", "ID of a resource")
     60defProperty('theSender4', "nodea-exttest7", "ID of a resource")
     61defProperty('theSender5', "nodee-exttest7", "ID of a resource")
     62defProperty('theReceiver', "nodef-exttest7", "ID of a resource")
     63
     64defProperty('intervalcol',"1", "Interval to Tail")
     65
     66defProperty('pathfile', "/tmp/flowstats.out", "Path to file")
     67
     68defApplication('ofstats') do |app|
     69  app.description = 'Simple Definition for the of-collect application'
     70  # Define the path to the binary executable for this application
     71  app.binary_path = '/usr/local/bin/learn_ofcollect.rb'
     72  app.defProperty('target', 'Address to output file', '-f', {:type => :string})
     73  app.defProperty("interval","Interval",'-i', {:type => :string})
     74  app.defMeasurement('wrapper_ofthroughput') do |m|
     75    m.defMetric(':srcaddr', :string)
     76    m.defMetric('throughput',:int64)
     77  end
     78end
     79
     80defApplication('iperfserv') do |app|
     81  app.description = "manually run Iperf server"
     82  app.binary_path = "/usr/bin/iperf -s"
     83end
     84defApplication('iperfclient') do |app|
     85  app.description = "manually run Iperf client"
     86  app.binary_path = "/usr/bin/iperf -c 192.168.1.15 -t 200 -P 5 -i 2"
     87end
     88defApplication('clean_iperf') do |app|
     89  app.description = 'Some commands to ensure that we start with a clean slate'
     90  app.binary_path = 'killall -s9 iperf'
     91  app.quiet = true
     92end
     93defGroup('Source3', property.source1) do |node|
     94  node.addApplication("ofstats") do |app|
     95    app.setProperty('target', property.pathfile)
     96    app.setProperty('interval', property.intervalcol)
     97    app.measure('wrapper_ofthroughput', :samples => 1)
     98  end
     99end
     100 defGroup('Sender1', property.theSender1) do |node|
     101    node.addApplication("iperfclient") do |app|
     102    end
     103  end
     104  defGroup('Sender2', property.theSender2) do |node|
     105    node.addApplication("iperfclient") do |app|
     106    end
     107  end
     108  defGroup('Sender3', property.theSender3) do |node|
     109    node.addApplication("iperfclient") do |app|
     110    end
     111  end
     112  defGroup('Sender4', property.theSender4) do |node|
     113    node.addApplication("iperfclient") do |app|
     114    end
     115  end
     116  defGroup('Sender5', property.theSender5) do |node|
     117    node.addApplication("iperfclient") do |app|
     118    end
     119  end
     120  defGroup('Receiver', property.theReceiver) do |node|
     121    node.addApplication("iperfserv") do |app|
     122    end
     123  end
     124
     125onEvent(:ALL_UP_AND_INSTALLED) do |event|
     126  info "Starting the collect"
     127  info "Starting the collect"
     128  after 2 do
     129    group('Receiver').startApplications
     130  end
     131  after 10 do
     132    group('Sender1').startApplications
     133    group('Source3').startApplications
     134  end
     135  after 20 do
     136    group('Sender2').startApplications
     137  end
     138  after 40 do
     139    group('Sender3').startApplications
     140  end
     141  after 60 do
     142    group('Sender4').startApplications
     143  end
     144  after 80 do
     145    group('Sender5').startApplications
     146  end
     147  after 120 do
     148    info "Stopping the collect"
     149    allGroups.stopApplications
     150    Experiment.done
     151  end
     152end
     153
     154defGraph 'Throughput' do |g|
     155  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :throughput, :srcaddr)
     156  g.caption "Throughput of Flows"
     157  g.type 'line_chart3'
     158  g.mapping :x_axis => :oml_ts_client, :y_axis => :throughput, :group_by => :srcaddr
     159  g.xaxis :legend => 'oml_ts'
     160  g.yaxis :legend => 'Throughput', :ticks => {:format => 's'}
     161end
     162
     163
     164}}}
     165=== 3.1.3 Start your application from !LabWiki ===
     166
     167To 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.
     168That 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.
     169
     170[[Image(LW_wiki_flowstats1.png, 90%)]]
     171
     172Explanation of the fields in the Execute window:
     173
     174* name: In this field you specify the name of your experiment.
     175
     176* 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.
     177
     178* 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.
     179
     180* slice: This pull down menu lists all slice that have been created under "project". Select the slice you to run your experiment on.
     181
     182=== 3.1.4 During experiment execution ===
     183
     184After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
     185The figure below gives an example for the Execute window during experiment execution.
     186
     187[[Image(LW_wiki_flowstats2.png, 90%)]]
     188
     189Now 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.