Changes between Version 1 and Version 2 of GEC21Agenda/LabWiki/ModuleD
- Timestamp:
- 10/15/14 20:00:17 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GEC21Agenda/LabWiki/ModuleD
v1 v2 7 7 {{{ 8 8 #!ruby 9 defProperty('source1', "nodea-testGIMI", "ID of a resource") 10 defProperty('source2', "switch1-testGIMI", "ID of a resource") 11 defProperty('source3', "switch2-testGIMI", "ID of a resource") #NEW 9 10 defProperty('resource1', "nodea", "ID of a resource") 11 defProperty('resource2', "switch1", "ID of a resource") 12 defProperty('resource3', "switch2", "ID of a resource") 13 12 14 13 15 defProperty('sinkaddr12', '192.168.1.7', "Ping destination address") 14 16 defProperty('sinkaddr13', '192.168.1.8', "Ping destination address") 15 17 16 defProperty('sinkaddr21', '192.168.1.13', "Ping destination address") #NEW17 defProperty('sinkaddr23', '192.168.1.14', "Ping destination address") #NEW18 defProperty('sinkaddr24', '192.168.1.15', "Ping destination address") #NEW18 defProperty('sinkaddr21', '192.168.1.13', "Ping destination address") 19 defProperty('sinkaddr23', '192.168.1.14', "Ping destination address") 20 defProperty('sinkaddr24', '192.168.1.15', "Ping destination address") 19 21 20 22 … … 33 35 # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit) 34 36 app.defMeasurement('ping') do |m| 35 m.defMetric(' dest_addr',:string)37 m.defMetric('remote',:string) 36 38 m.defMetric('ttl',:uint32) 37 39 m.defMetric('rtt',:double) … … 42 44 defApplication('trema') do |app| 43 45 app.description = 'This app runs trema from command line' 44 app.binary_path = '/ usr/local/bin/rubydir/bin/trema run /root/learning-switch.rb'46 app.binary_path = '/bin/sh /root/ovs-setup2.sh' 45 47 end 46 47 defGroup('Source2', property.source2, property.source3) do |node| #MODIFIED 48 defGroup('Source2', property.resource2, property.resource3) do |node| 48 49 node.addApplication("trema") 49 50 end 50 51 defGroup('Source1', property.source1) do |node| 51 defGroup('Source1', property.resource1) do |node| 52 52 node.addApplication("ping") do |app| 53 53 app.setProperty('target', property.sinkaddr12) … … 62 62 app.measure('ping', :samples => 1) 63 63 end 64 node.addApplication("ping") do |app| #NEW64 node.addApplication("ping") do |app| 65 65 app.setProperty('target', property.sinkaddr21) 66 66 app.setProperty('count', 30) … … 68 68 app.measure('ping', :samples => 1) 69 69 end 70 node.addApplication("ping") do |app| #NEW70 node.addApplication("ping") do |app| 71 71 app.setProperty('target', property.sinkaddr23) 72 72 app.setProperty('count', 30) … … 74 74 app.measure('ping', :samples => 1) 75 75 end 76 node.addApplication("ping") do |app| #NEW76 node.addApplication("ping") do |app| 77 77 app.setProperty('target', property.sinkaddr24) 78 78 app.setProperty('count', 30) … … 82 82 end 83 83 84 84 85 onEvent(:ALL_UP_AND_INSTALLED) do |event| 85 86 info "Starting the ping" … … 87 88 group('Source2').startApplications 88 89 end 89 after 10 do90 after 20 do 90 91 group('Source1').startApplications 91 92 end … … 98 99 99 100 defGraph 'RTT' do |g| 100 g.ms('ping').select(:oml_seq, : dest_addr, :rtt)101 g.ms('ping').select(:oml_seq, :remote, :rtt) 101 102 g.caption "RTT of received packets." 102 103 g.type 'line_chart3' 103 g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => : dest_addr104 g.mapping :x_axis => :oml_seq, :y_axis => :rtt, :group_by => :remote 104 105 g.xaxis :legend => 'oml_seq' 105 106 g.yaxis :legend => 'rtt', :ticks => {:format => 's'} 106 107 end 108 107 109 }}} 108 110