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


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

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIFIRE/Labwiki/Part2a/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: ====
     53
     54'''Note''': Create a new script by clicking on the wheel and prepend your username to the name of the script. Copy and paste the contents of firegenipart2.oedl to create a copy of your own. [[BR]]
     55'''Please do not modify the original script.'''
     56
     57OEDL script
     58{{{
     59
     60defProperty('source1', "switch1-exttest7", "ID of a resource")
     61defProperty('theSender1', "nodeb-exttest7", "ID of a resource")
     62defProperty('theSender2', "nodec-exttest7", "ID of a resource")
     63defProperty('theSender3', "noded-exttest7", "ID of a resource")
     64defProperty('theSender4', "nodea-exttest7", "ID of a resource")
     65defProperty('theSender5', "nodee-exttest7", "ID of a resource")
     66defProperty('theReceiver', "nodef-exttest7", "ID of a resource")
     67
     68defProperty('intervalcol',"1", "Interval to Tail")
     69
     70defProperty('pathfile', "/tmp/flowstats.out", "Path to file")
     71
     72defApplication('ofstats') do |app|
     73  app.description = 'Simple Definition for the of-collect application'
     74  # Define the path to the binary executable for this application
     75  app.binary_path = '/usr/local/bin/learn_ofcollect.rb'
     76  app.defProperty('target', 'Address to output file', '-f', {:type => :string})
     77  app.defProperty("interval","Interval",'-i', {:type => :string})
     78  app.defMeasurement('wrapper_ofthroughput') do |m|
     79    m.defMetric(':srcaddr', :string)
     80    m.defMetric('throughput',:int64)
     81  end
     82end
     83
     84defApplication('iperfserv') do |app|
     85  app.description = "manually run Iperf server"
     86  app.binary_path = "/usr/bin/iperf -s"
     87end
     88defApplication('iperfclient') do |app|
     89  app.description = "manually run Iperf client"
     90  app.binary_path = "/usr/bin/iperf -c 192.168.1.15 -t 200 -P 5 -i 2"
     91end
     92defApplication('clean_iperf') do |app|
     93  app.description = 'Some commands to ensure that we start with a clean slate'
     94  app.binary_path = 'killall -s9 iperf'
     95  app.quiet = true
     96end
     97defGroup('Source3', property.source1) do |node|
     98  node.addApplication("ofstats") do |app|
     99    app.setProperty('target', property.pathfile)
     100    app.setProperty('interval', property.intervalcol)
     101    app.measure('wrapper_ofthroughput', :samples => 1)
     102  end
     103end
     104 defGroup('Sender1', property.theSender1) do |node|
     105    node.addApplication("iperfclient") do |app|
     106    end
     107  end
     108  defGroup('Sender2', property.theSender2) do |node|
     109    node.addApplication("iperfclient") do |app|
     110    end
     111  end
     112  defGroup('Sender3', property.theSender3) do |node|
     113    node.addApplication("iperfclient") do |app|
     114    end
     115  end
     116  defGroup('Sender4', property.theSender4) do |node|
     117    node.addApplication("iperfclient") do |app|
     118    end
     119  end
     120  defGroup('Sender5', property.theSender5) do |node|
     121    node.addApplication("iperfclient") do |app|
     122    end
     123  end
     124  defGroup('Receiver', property.theReceiver) do |node|
     125    node.addApplication("iperfserv") do |app|
     126    end
     127  end
     128
     129onEvent(:ALL_UP_AND_INSTALLED) do |event|
     130  info "Starting the collect"
     131  info "Starting the collect"
     132  after 2 do
     133    group('Receiver').startApplications
     134  end
     135  after 10 do
     136    group('Sender1').startApplications
     137    group('Source3').startApplications
     138  end
     139  after 20 do
     140    group('Sender2').startApplications
     141  end
     142  after 40 do
     143    group('Sender3').startApplications
     144  end
     145  after 60 do
     146    group('Sender4').startApplications
     147  end
     148  after 80 do
     149    group('Sender5').startApplications
     150  end
     151  after 120 do
     152    info "Stopping the collect"
     153    allGroups.stopApplications
     154    Experiment.done
     155  end
     156end
     157
     158defGraph 'Throughput' do |g|
     159  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :throughput, :srcaddr)
     160  g.caption "Throughput of Flows"
     161  g.type 'line_chart3'
     162  g.mapping :x_axis => :oml_ts_client, :y_axis => :throughput, :group_by => :srcaddr
     163  g.xaxis :legend => 'oml_ts'
     164  g.yaxis :legend => 'Throughput', :ticks => {:format => 's'}
     165end
     166
     167
     168}}}
     169=== 3.1.3 Start your application from !LabWiki ===
     170
     171To 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.
     172That 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.
     173
     174[[Image(LW_wiki_flowstats1.png, 90%)]]
     175
     176Explanation of the fields in the Execute window:
     177
     178* name: In this field you specify the name of your experiment.
     179
     180* 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.
     181
     182* 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.
     183
     184* slice: This pull down menu lists all slice that have been created under "project". Select the slice you to run your experiment on.
     185
     186=== 3.1.4 During experiment execution ===
     187
     188After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
     189The figure below gives an example for the Execute window during experiment execution.
     190
     191[[Image(LW_wiki_flowstats2.png, 90%)]]
     192
     193Now 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.