Changes between Version 28 and Version 29 of GEC17Agenda/AdvancedOpenFlow/Procedure/Execute


Ignore:
Timestamp:
03/07/14 23:36:15 (6 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC17Agenda/AdvancedOpenFlow/Procedure/Execute

    v28 v29  
    3333  {{{
    3434      source  /etc/profile.d/rvm.sh
    35       rvm use 1.8.7
    36       /opt/trema-trema-f995284/trema run /tmp/aggregator/aggregator.rb > /tmp/trema-runlog 2>&1 &
     35      trema run /tmp/aggregator/aggregator.rb >& /tmp/trema.run &
    3736  }}}
    3837
     
    4140
    4241     source  /etc/profile.d/rvm.sh
    43      rvm use 1.8.7
    44     /opt/trema-trema-f995284/trema run /root/load-balancer.rb
     42     trema run /root/load-balancer.rb
    4543
    4644   }}}
     
    6664
    6765{{{
    68 defProperty('theSender', "outside-debloadbalexo", "ID of sender node")
    69 defProperty('theReceiver', "inside-debloadbalexo", "ID of receiver node")
    70 defProperty('theSwitch',"switch-debloadbalexo","ID of switch node")
     66defProperty('theSender', "outside-loadbaltest", "ID of sender node")
     67defProperty('theReceiver', "inside-loadbaltest", "ID of receiver node")
     68defProperty('theSwitch',"switch-loadbaltest","ID of switch node")
    7169defProperty('setinterval','1.0',"Time between iperf")
    7270defProperty('serverip', "10.10.10.2","Server interface IP")
    7371defProperty('clientip', "10.10.10.1","Client interface IP")
    7472defProperty('setbandwidth', "100m", "Throughput of Sender")
     73defApplication('trace') do |app|
     74  app.description = 'Packet capture'
     75  app.binary_path = "/usr/bin/trace-oml2"
     76  app.defProperty('filter', 'Filter expression BPFEXP', '-f', {:type => :string, :mnemonic => 'f'})
     77  app.defProperty('interface', 'Interface to trace', '-i',{:type => :string, :mnemonic => 'i', :default => '"eth0"'})
     78  app.defProperty('config', 'config file to follow', '--oml-config',{:type => :string, :default => '"/tmp/monitor/conf.xml"'})
     79
     80app.defMeasurement("ip") do |m|
     81    m.defMetric('pktid',    :uint64, ' internal packet ID to link MPs')
     82    m.defMetric('ip_tos',   :uint32, ' Type of Service')
     83    m.defMetric('ip_len',   :uint32, ' Total Length')
     84    m.defMetric('ip_id',    :int32,  ' Identification')
     85    m.defMetric('ip_off',   :uint32, ' IP Fragment offset (and flags)')
     86    m.defMetric('ip_ttl',   :uint32, ' Time to Live')
     87    m.defMetric('ip_proto', :uint32, ' Protocol')
     88    m.defMetric('ip_sum',   :uint32, ' Checksum')
     89    m.defMetric('ip_src',   :string, ' Source Address')
     90    m.defMetric('ip_dst',   :string, ' Destination Address')
     91    m.defMetric('ip_sizeofpacket', :uint32, ' Size of the Packet')
     92    m.defMetric('ip_ts',    :double, ' timestamp of the measurement')
     93  end
     94
     95end
    7596defApplication('iperf') do |app|
    7697  app.description = "Iperf is a traffic generator and bandwidth measurement
     
    204225
    205226end
    206 defApplication('nmetrics') do |app|
    207    app.description = 'Measure nmetrics parameters'
    208    app.binary_path = '/usr/bin/nmetrics-oml2'
    209    app.defProperty('interface', 'interface at which to measure', '-i', {:type => :string})
    210    app.defProperty('cpu', 'cpu usage', '-c', {:type => :boolean})
    211    app.defProperty('memory', 'memory usage', '-m', {:type => :boolean})
    212    app.defMeasurement('memory') do |m|
    213     m.defMetric('ram', :uint64)
    214     m.defMetric('total', :uint64)
    215     m.defMetric('used', :uint64)
    216     m.defMetric('free', :uint64)
    217     m.defMetric('actual_used', :uint64)
    218     m.defMetric('actual_free', :uint64)
    219    end 
    220    app.defMeasurement('cpu') do |m|
    221     m.defMetric('user', :uint64)
    222     m.defMetric('sys', :uint64)
    223     m.defMetric('nice', :uint64)
    224     m.defMetric('idle', :uint64)
    225     m.defMetric('wait', :uint64)
    226     m.defMetric('irq', :uint64)
    227     m.defMetric('soft_irq', :uint64)
    228     m.defMetric('stolen', :uint64)
    229     m.defMetric('total', :uint64)       
    230    end
    231    app.defMeasurement('network') do |m|
    232     m.defMetric('name', :string)
    233     m.defMetric('rx_packets', :uint64)
    234     m.defMetric('rx_bytes', :uint64)
    235     m.defMetric('rx_errors', :uint64)
    236     m.defMetric('rx_dropped', :uint64)
    237     m.defMetric('rx_overruns', :uint64)
    238     m.defMetric('rx_frame', :uint64)
    239     m.defMetric('tx_packets', :uint64)
    240     m.defMetric('tx_bytes', :uint64)
    241     m.defMetric('tx_errors', :uint64)
    242     m.defMetric('tx_dropped', :uint64)
    243     m.defMetric('tx_overruns', :uint64)
    244     m.defMetric('tx_collisions', :uint64)
    245     m.defMetric('tx_carrier', :uint64)
    246     m.defMetric('speed', :uint64)
    247   end
    248 end
    249 defGroup('Servers', "outside-debloadbalexo", "outside-debloadbalexo") do |node|
     227
     228defGroup('Servers', property.theReceiver) do |node|
    250229  node.addApplication("iperf") do |app|
    251230        #app.setProperty('interval', property.setinterval)
     
    255234    end
    256235end
    257 defGroup('Receiver',property.theReceiver) do |node|
    258     node.addApplication("iperf") do |app|
    259         #app.setProperty('interval',property.setinterval)
    260       app.setProperty('client',property.clientip)
    261         app.setProperty('tradeoff',true)
    262         app.setProperty('parallel', 5)
    263         app.setProperty('time',30)
    264         app.setProperty('port',6001)
    265         #app.setProperty('bandwidth',property.setbandwidth)
    266         app.measure('transfer', :samples => 1)
    267         app.measure('jitter', :samples => 1)
    268         app.measure('losses', :samples => 1)
    269     end
    270 end
     236
    271237
    272238defGroup('Sender',property.theSender) do |node|
     
    283249   
    284250end
     251defGroup('Monitor1', property.theSwitch) do |node|
     252  node.addApplication("trace") do |app|
     253    app.setProperty("interface", 'eth1')
     254    app.setProperty("filter", 'tcp')
     255     app.setProperty("config", "/tmp/monitor/conf.xml")
     256    app.measure("tcp", :samples => 1)
     257  end
     258end
     259defGroup('Monitor', property.theSwitch) do |node|
     260  node.addApplication("trace") do |app|
     261    app.setProperty("interface", 'eth3')
     262    app.setProperty("filter", 'tcp')
     263     app.setProperty("config", "/tmp/monitor/conf.xml")
     264    app.measure("tcp", :samples => 1)
     265  end
     266end
     267
    285268
    286269
     
    288271    info "starting"
    289272  group('Servers').startApplications
    290       info "Server application started..."
    291      wait 2
    292      group('Sender').startApplications
    293       info "Client application started..."
    294   group('Receiver').startApplications
    295     wait 100
    296      group('Sender').stopApplications
    297      group('Receiver').stopApplications
    298   wait 2
    299   group('Servers').stopApplications
     273     after 2 do
     274       group('Monitor1').startApplications
     275       group('Monitor').startApplications
     276       group('Sender').startApplications
     277     end
     278    after 100 do
     279      group ('Sender').stopApplications
     280    group ('Monitor1').stopApplications
     281      group('Servers').stopApplications
    300282     info "All applications stopped."
    301   wait 2
    302283     Experiment.done
    303 end
    304 defGraph 'Received bytes' do |g|
    305   g.ms('transfer').select {[ oml_ts_client.as(:ts), :size , :oml_sender_id]}
    306   g.caption "Packet length measurement."
     284     end
     285end
     286##define the graphs that we want to display##
     287#defGraph 'Cumulated number of Bytes' do |g|
     288#  g.ms('network').select(:oml_ts_server, :tx_bytes, :oml_sender_id)
     289#  g.caption "Total Bytes"
     290#  g.type 'line_chart3'
     291#  g.mapping :x_axis => :oml_ts_server, :y_axis => :tx_bytes, :group_by => :oml_sender_id
     292#  g.xaxis :legend => 'time', :ticks => {:format => 's'}
     293#  g.yaxis :legend => '', :ticks => {:format => 'Byte'}
     294#end
     295
     296defGraph 'TCP Throughput Bytes-per-Second' do |g|
     297  g.ms('tcp').select(:oml_ts_server, :tcp_packet_size, :oml_sender_id)
     298  g.caption "TCP throughput"
    307299  g.type 'line_chart3'
    308   g.mapping :x_axis => :ts, :y_axis => :size, :group_by => :oml_sender_id
    309   g.xaxis :legend => 'time [s]'
    310   g.yaxis :legend => 'Throughput[bps]', :ticks => {:format => 's'}
    311 end
     300  g.mapping :x_axis => :oml_ts_server, :y_axis => :tcp_packet_size, :group_by => :oml_sender_id
     301  g.xaxis :legend => 'time', :ticks => {:format => 's'}
     302  g.yaxis :legend => '', :ticks => {:format => 'Bytes/s'}
     303end 
     304
    312305
    313306}}}