Changes between Version 4 and Version 5 of GEC20Agenda/LabWiki/ModuleE/DesignSetup


Ignore:
Timestamp:
06/19/14 18:48:14 (5 years ago)
Author:
dbhat@bbn.com
Comment:

--

Legend:

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

    v4 v5  
    209209}}}
    210210
    211 === 2.5 The complete OEDL script is given Below ===
    212 
    213 OEDL script
    214 {{{
    215 
    216 defProperty('source1', "switch1-rspecforMax", "ID of a resource")
    217 defProperty('source2', "switch2-rspecforMax", "ID of a resource")
    218 defProperty('source3', "switch1-rspecforMax", "ID of a resource")
    219 defProperty('theSender1', "nodeb-rspecforMax", "ID of a resource")
    220 defProperty('theSender2', "nodec-rspecforMax", "ID of a resource")
    221 defProperty('theSender3', "noded-rspecforMax", "ID of a resource")
    222 defProperty('theSender4', "nodec-rspecforMax", "ID of a resource")
    223 defProperty('theSender5', "nodee-rspecforMax", "ID of a resource")
    224 defProperty('theReceiver', "nodef-rspecforMax", "ID of a resource")
    225 
    226 defProperty('intervalcol',"1", "Interval to Tail")
    227 
    228 defProperty('pathfile', "/tmp/flowstats.out", "Path to file")
    229 
    230 defApplication('ofstats') do |app|
    231   app.description = 'Simple Definition for the of-collect application'
    232   # Define the path to the binary executable for this application
    233   app.binary_path = '/usr/local/bin/learn_ofcollect.rb'
    234   app.defProperty('target', 'Address to output file', '-f', {:type => :string})
    235   app.defProperty("interval","Interval",'-i', {:type => :string})
    236   app.defMeasurement('wrapper_ofthroughput') do |m|
    237     m.defMetric(':srcaddr', :string)
    238     m.defMetric('throughput',:int64)
    239   end
    240 end
    241 defApplication('trema') do |app|
    242   app.description = 'This app runs trema from command line'
    243   app.binary_path = '/usr/bin/trema run /root/learning-switch.rb'
    244 end
    245 
    246 defApplication('iperfserv') do |app|
    247   app.description = "manually run Iperf server"
    248   app.binary_path = "/usr/bin/iperf -s"
    249 end
    250 defApplication('iperfclient') do |app|
    251   app.description = "manually run Iperf client"
    252   app.binary_path = "/usr/bin/iperf -c 192.168.1.15 -t 800 -P 2 -i 2"
    253 end
    254 defApplication('clean_iperf') do |app|
    255   app.description = 'Some commands to ensure that we start with a clean slate'
    256   app.binary_path = 'killall -s9 iperf'
    257   app.quiet = true
    258 end
    259 defGroup('Source2', property.source1,property.source2) do |node|
    260   node.addApplication("trema")
    261 end
    262 defGroup('Source3', property.source1) do |node|
    263   node.addApplication("ofstats") do |app|
    264     app.setProperty('target', property.pathfile)
    265     app.setProperty('interval', property.intervalcol)
    266     app.measure('wrapper_ofthroughput', :samples => 1)
    267   end
    268 end
    269  defGroup('Sender1', property.theSender1) do |node|
    270     node.addApplication("iperfclient") do |app|
    271     end
    272   end
    273   defGroup('Sender2', property.theSender2) do |node|
    274     node.addApplication("iperfclient") do |app|
    275     end
    276   end
    277   defGroup('Sender3', property.theSender3) do |node|
    278     node.addApplication("iperfclient") do |app|
    279     end
    280   end
    281   defGroup('Sender4', property.theSender4) do |node|
    282     node.addApplication("iperfclient") do |app|
    283     end
    284   end
    285   defGroup('Sender5', property.theSender5) do |node|
    286     node.addApplication("iperfclient") do |app|
    287     end
    288   end
    289   defGroup('Receiver', property.theReceiver) do |node|
    290     node.addApplication("iperfserv") do |app|
    291     end
    292   end
    293 
    294 onEvent(:ALL_UP_AND_INSTALLED) do |event|
    295   info "Starting the collect"
    296   info "Starting the collect"
    297   after 2 do
    298     group('Source2').startApplications
    299     group('Receiver').startApplications
    300   end
    301   after 10 do
    302     group('Sender1').startApplications
    303   end
    304   after 20 do
    305     group('Sender2').startApplications
    306     group('Source3').startApplications
    307   end
    308   after 40 do
    309     group('Sender3').startApplications
    310   end
    311   after 60 do
    312     group('Sender4').startApplications
    313   end
    314   after 80 do
    315     group('Sender5').startApplications
    316   end
    317   after 120 do
    318     info "Stopping the collect"
    319     allGroups.stopApplications
    320     Experiment.done
    321   end
    322 end
    323 
    324 defGraph 'Throughput' do |g|
    325   g.ms('wrapper_ofthroughput').select(:oml_ts_client, :throughput, :srcaddr)
    326   g.caption "Throughput of Flows"
    327   g.type 'line_chart3'
    328   g.mapping :x_axis => :oml_ts_client, :y_axis => :throughput, :group_by => :srcaddr
    329   g.xaxis :legend => 'oml_ts'
    330   g.yaxis :legend => 'Throughput', :ticks => {:format => 's'}
    331 end
    332 
    333 }}}
     211
    334212
    335213= [wiki:GEC20Agenda/LabWiki/ModuleE/Execute Next: Run Experiment] =