Changes between Version 1 and Version 2 of GEC20Agenda/LabWiki/ModuleE/Execute


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

--

Legend:

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

    v1 v2  
    1616The image has to be hosted on a webserver.
    1717
    18 === 3.1.2 The "Prepare" Window ===
     18=== 2.5 The complete OEDL script is given Below ===
    1919
    20 For reference, we show the extended experiment script here:
     20OEDL script
    2121{{{
    22 defProperty('source1', "nodea-dbhatpostboot", "ID of a resource")
    23 defProperty('source2', "switch1-dbhatpostboot", "ID of a resource")
    24 defProperty('source3', "switch2-dbhatpostboot", "ID of a resource")
    2522
     23defProperty('source1', "switch1-rspecforMax", "ID of a resource")
     24defProperty('source2', "switch2-rspecforMax", "ID of a resource")
     25defProperty('source3', "switch1-rspecforMax", "ID of a resource")
     26defProperty('theSender1', "nodeb-rspecforMax", "ID of a resource")
     27defProperty('theSender2', "nodec-rspecforMax", "ID of a resource")
     28defProperty('theSender3', "noded-rspecforMax", "ID of a resource")
     29defProperty('theSender4', "nodec-rspecforMax", "ID of a resource")
     30defProperty('theSender5', "nodee-rspecforMax", "ID of a resource")
     31defProperty('theReceiver', "nodef-rspecforMax", "ID of a resource")
    2632
    27 defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
    28 defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")
     33defProperty('intervalcol',"1", "Interval to Tail")
    2934
    30 defProperty('sinkaddr21', '192.168.1.13', "Ping destination address")
    31 defProperty('sinkaddr23', '192.168.1.14', "Ping destination address")
    32 defProperty('sinkaddr24', '192.168.1.15', "Ping destination address")
     35defProperty('pathfile', "/tmp/flowstats.out", "Path to file")
    3336
    34 
    35 defApplication('ping') do |app|
    36   app.description = 'Simple Definition for the ping-oml2 application'
     37defApplication('ofstats') do |app|
     38  app.description = 'Simple Definition for the of-collect application'
    3739  # Define the path to the binary executable for this application
    38   app.binary_path = '/usr/local/bin/ping-oml2'
    39   # Define the configurable parameters for this application
    40   # For example if target is set to foo.com and count is set to 2, then the
    41   # application will be started with the command line:
    42   # /usr/bin/ping-oml2 -a foo.com -c 2
    43   app.defProperty('target', 'Address to ping', '-a', {:type => :string})
    44   app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
    45   # Define the OML2 measurement point that this application provides.
    46   # Here we have only one measurement point (MP) named 'ping'. Each measurement
    47   # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit)
    48   app.defMeasurement('ping') do |m|
    49     m.defMetric('dest_addr',:string)
    50     m.defMetric('ttl',:uint32)
    51     m.defMetric('rtt',:double)
    52     m.defMetric('rtt_unit',:string)
     40  app.binary_path = '/usr/local/bin/learn_ofcollect.rb'
     41  app.defProperty('target', 'Address to output file', '-f', {:type => :string})
     42  app.defProperty("interval","Interval",'-i', {:type => :string})
     43  app.defMeasurement('wrapper_ofthroughput') do |m|
     44    m.defMetric(':srcaddr', :string)
     45    m.defMetric('throughput',:int64)
    5346  end
    5447end
    55 
    5648defApplication('trema') do |app|
    5749  app.description = 'This app runs trema from command line'
    5850  app.binary_path = '/usr/bin/trema run /root/learning-switch.rb'
    5951end
    60 defGroup('Source2', property.source2, property.source3) do |node|
     52
     53defApplication('iperfserv') do |app|
     54  app.description = "manually run Iperf server"
     55  app.binary_path = "/usr/bin/iperf -s"
     56end
     57defApplication('iperfclient') do |app|
     58  app.description = "manually run Iperf client"
     59  app.binary_path = "/usr/bin/iperf -c 192.168.1.15 -t 800 -P 2 -i 2"
     60end
     61defApplication('clean_iperf') do |app|
     62  app.description = 'Some commands to ensure that we start with a clean slate'
     63  app.binary_path = 'killall -s9 iperf'
     64  app.quiet = true
     65end
     66defGroup('Source2', property.source1,property.source2) do |node|
    6167  node.addApplication("trema")
    6268end
    63 defGroup('Source1', property.source1) do |node|
    64   node.addApplication("ping") do |app|
    65     app.setProperty('target', property.sinkaddr12)
    66     app.setProperty('count', 30)
    67     #app.setProperty('interval', 1)
    68     app.measure('ping', :samples => 1)
    69   end
    70   node.addApplication("ping") do |app|
    71     app.setProperty('target', property.sinkaddr13)
    72     app.setProperty('count', 30)
    73     #app.setProperty('interval', 1)
    74     app.measure('ping', :samples => 1)
    75   end
    76    node.addApplication("ping") do |app|
    77     app.setProperty('target', property.sinkaddr21)
    78     app.setProperty('count', 30)
    79     #app.setProperty('interval', 1)
    80     app.measure('ping', :samples => 1)
    81   end
    82    node.addApplication("ping") do |app|
    83     app.setProperty('target', property.sinkaddr23)
    84     app.setProperty('count', 30)
    85     #app.setProperty('interval', 1)
    86     app.measure('ping', :samples => 1)
    87   end
    88   node.addApplication("ping") do |app|
    89     app.setProperty('target', property.sinkaddr24)
    90     app.setProperty('count', 30)
    91     #app.setProperty('interval', 1)
    92     app.measure('ping', :samples => 1)
     69defGroup('Source3', property.source1) do |node|
     70  node.addApplication("ofstats") do |app|
     71    app.setProperty('target', property.pathfile)
     72    app.setProperty('interval', property.intervalcol)
     73    app.measure('wrapper_ofthroughput', :samples => 1)
    9374  end
    9475end
    95 
    96 
    97 
    98 
    99 
    100 #defGroup('Sink1', property.sink1) do |node|
    101 #end
    102 
    103 #defGroup('Sink2', property.sink2) do |node|
    104 #end
    105 
    106 #defGroup('Sink3', property.sink3) do |node|
    107 #end
    108 
    109 #defGroup('Sink4', property.sink4) do |node|
    110 #end
    111 
    112 #defGroup('Sink5', property.sink5) do |node|
    113 #end
     76 defGroup('Sender1', property.theSender1) do |node|
     77    node.addApplication("iperfclient") do |app|
     78    end
     79  end
     80  defGroup('Sender2', property.theSender2) do |node|
     81    node.addApplication("iperfclient") do |app|
     82    end
     83  end
     84  defGroup('Sender3', property.theSender3) do |node|
     85    node.addApplication("iperfclient") do |app|
     86    end
     87  end
     88  defGroup('Sender4', property.theSender4) do |node|
     89    node.addApplication("iperfclient") do |app|
     90    end
     91  end
     92  defGroup('Sender5', property.theSender5) do |node|
     93    node.addApplication("iperfclient") do |app|
     94    end
     95  end
     96  defGroup('Receiver', property.theReceiver) do |node|
     97    node.addApplication("iperfserv") do |app|
     98    end
     99  end
    114100
    115101onEvent(:ALL_UP_AND_INSTALLED) do |event|
    116   info "Starting the ping"
     102  info "Starting the collect"
     103  info "Starting the collect"
    117104  after 2 do
    118105    group('Source2').startApplications
     106    group('Receiver').startApplications
    119107  end
    120108  after 10 do
    121     group('Source1').startApplications
     109    group('Sender1').startApplications
     110  end
     111  after 20 do
     112    group('Sender2').startApplications
     113    group('Source3').startApplications
     114  end
     115  after 40 do
     116    group('Sender3').startApplications
     117  end
     118  after 60 do
     119    group('Sender4').startApplications
    122120  end
    123121  after 80 do
    124     info "Stopping the ping"
     122    group('Sender5').startApplications
     123  end
     124  after 120 do
     125    info "Stopping the collect"
    125126    allGroups.stopApplications
    126127    Experiment.done
     
    128129end
    129130
    130 defGraph 'RTT' do |g|
    131   g.ms('ping').select(:oml_seq, :dest_addr, :rtt)
    132   g.caption "RTT of received packets."
     131defGraph 'Throughput' do |g|
     132  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :throughput, :srcaddr)
     133  g.caption "Throughput of Flows"
    133134  g.type 'line_chart3'
    134   g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :dest_addr
    135   g.xaxis :legend => 'oml_seq'
    136   g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
     135  g.mapping :x_axis => :oml_ts_client, :y_axis => :throughput, :group_by => :srcaddr
     136  g.xaxis :legend => 'oml_ts'
     137  g.yaxis :legend => 'Throughput', :ticks => {:format => 's'}
    137138end
     139
    138140}}}
    139 
    140141=== 3.1.3 Start your application from !LabWiki ===
    141142