Changes between Version 5 and Version 6 of Tutorials/oMF/tut2


Ignore:
Timestamp:
Oct 15, 2014, 6:54:26 PM (10 years ago)
Author:
parishad
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/oMF/tut2

    v5 v6  
    190190[[CollapsibleEnd]]
    191191
    192 We will assume the network described and initialized in Exercise 1 is up and functional. Instead of the mfping application that was run manually, we will extend the OMF script to add the mfperf application that will drive the performance measurement of the router.
     192We will assume the network described and initialized in Exercise 1 is up and functional. Here also we will use mfping to send packets between the hosts. In addition to the deployment specified in exercise 1, we install OML-enabled statistics monitor for MobilityFirst routers.
    193193
    194194The entire script is available as part of the tutorial package as orbit/tutorial/scripts/exercise2.rb
     
    196196The key extensions over previous script are briefly discussed below:
    197197
    198 ==== Setting up the 'mfperf Application' ====
    199 
    200 The following snippet from the script shows the code added to set up the mfperf application and its arguments:
     198==== Setting up the 'OML enabled Monitor on Routers Application' ====
     199
     200The following snippet from the script shows the code added to set up the OML enabled Monitor on Routers Application and its arguments:
    201201
    202202{{{
    203203#!ruby
    204 defApplication('test:app:mf:mfperf', 'mfperf') do |a|
    205 
    206   a.path = "/usr/local/bin/mfperf"
    207   app.appPackage = "http://mobilityfirst.winlab.rutgers.edu/mf-orbit-tutorial.tar"
    208   a.version(0, 9, 1)
    209   a.shortDescription = "MF protocol performance benchmark tool"
    210   a.description = "This is targeted to be similar to the iperf benchmarking tool available for IP protocol. It generates MobilityFirst block packet traffic via the MF socket API and can be used to benchmark performance of MF routers and protocol stack implementations."
    211 
    212   # Define the properties that can be configured for this application
    213   #
    214   # syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {})
    215   #
    216   a.defProperty('generator', 'Type of packet generator to use (cbr)', '-g', {:type => :string, :dynamic => false})
    217   a.defProperty('dst_GUID', 'GUID of the Destination', '--dst_GUID', {:type => :string, :dynamic => false})
    218   a.defProperty('my_GUID', 'GUID of this Source application', '--my_GUID', {:type => :string, :dynamic => false})
    219   a.defProperty("cbr:size", "Size of data block [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
    220   a.defProperty("cbr:rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
    221 
    222   # Define the Measurement Points and associated metrics that are available for this application
    223   #
    224   a.defMeasurement('msg_out') do |m|
    225     m.defMetric('ts',:float)
    226     m.defMetric('msg_no',:long)
    227     m.defMetric('msg_length',:long)
    228     m.defMetric('dst_GUID',:string)
    229   end
     204defApplication("mf_click_monitor", "mf_click_monitor") do |app|
     205        app.shortDescription = "OML enabld statistics monitor for MobilityFirst Routers"
     206        app.path = "/usr/local/bin/mf_click_mon"
     207        app.defProperty('ctrl_port', 'Port for Click control socket', nil,{:type => :string, :mandatory => true, :order => 1})
     208        app.defProperty('self-id', 'OML ID', nil,{:type => :string, :mandatory => true, :order => 2})
     209        app.defProperty('oml-config-file', 'OML configuration file', "--oml-config",{:type => :string,:mandatory=> true})
     210        app.defProperty('oml-domain', 'OML domain name', "--oml-domain",{:type => :string,:mandatory=> true})
    230211end
     212
     213self_id = "MonitorID"
     214oml_config_file = "/usr/local/src/mobilityfirst/eval/orbit/tutorial/conf/click-oml-config.xml"
     215oml_domain = "#{Experiment.ID}"
     216
     217defGroup("router_monitors", "router_universe") {|node|
     218  node.addApplication('mf_click_monitor') {|app|
     219    app.setProperty('ctrl_port', router_control_port)
     220    app.setProperty('self-id', self_id)
     221    app.setProperty('oml-config-file', oml_config_file)
     222    app.setProperty('oml-domain', oml_domain)
     223  }
    231224}
    232225}}}