defProperty('source1', "switch1-rspecforMax", "ID of a resource")
defProperty('source2', "switch2-rspecforMax", "ID of a resource")
defProperty('source3', "switch1-rspecforMax", "ID of a resource")
defProperty('theSender1', "nodeb-rspecforMax", "ID of a resource")
defProperty('theSender2', "nodec-rspecforMax", "ID of a resource")
defProperty('theSender3', "noded-rspecforMax", "ID of a resource")
defProperty('theSender4', "nodec-rspecforMax", "ID of a resource")
defProperty('theSender5', "nodee-rspecforMax", "ID of a resource")
defProperty('theReceiver', "nodef-rspecforMax", "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('trema') do |app|
app.description = 'This app runs trema from command line'
app.binary_path = '/usr/bin/trema run /root/learning-switch.rb'
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 800 -P 2 -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('Source2', property.source1,property.source2) do |node|
node.addApplication("trema")
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('Source2').startApplications
group('Receiver').startApplications
end
after 10 do
group('Sender1').startApplications
end
after 20 do
group('Sender2').startApplications
group('Source3').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.

Explanation of the fields in the Execute window:

name: In this field you specify the name of your experiment.

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.

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.

slice: This pull down menu lists all slice that have been created under "project". Select the slice you to run your experiment on.

3.1.4 During experiment execution

After pressing the "Start" button, the Execute window will change and start showing status information about your experiment.
The figure below gives an example for the Execute window during experiment execution.

Now 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.