Changes between Version 2 and Version 3 of GEC19Agenda/GIMI/Procedure/Finish


Ignore:
Timestamp:
03/18/14 13:09:44 (10 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC19Agenda/GIMI/Procedure/Finish

    v2 v3  
    2727[https://github.com/mytestbed/oml4r/tree/master/examples How to use OML4r]
    2828
    29 == 2.1 OpenFlow Statistics Measurement ===
     29== 2.1 !OpenFlow Statistics Measurement ===
    3030
    3131ofcollect.rb
     
    107107# vim: ft=ruby:sw=2
    108108}}}
     109
     110OEDL script
     111{{{
     112
     113defProperty('source1', "nowcastbox-sdxdemo", "ID of a resource")
     114defProperty('intervalcol',"1", "Interval to Tail")
     115
     116defProperty('pathfile', "/tmp/flowstats.out", "Path to file")
     117
     118
     119
     120defApplication('ofstats') do |app|
     121  app.description = 'Simple Definition for the of-collect application'
     122  # Define the path to the binary executable for this application
     123  app.binary_path = '/usr/local/bin/ofcollect.rb'
     124  app.defProperty('target', 'Address to output file', '-f', {:type => :string})
     125  app.defProperty("interval","Interval",'-i', {:type => :string})
     126  app.defMeasurement('wrapper_ofthroughput') do |m|
     127    m.defMetric(':pathtype', :string)
     128    m.defMetric('throughput',:int64)
     129    m.defMetric('instput',:int64)
     130  end
     131end
     132defGroup('Source1', property.source1) do |node|
     133  node.addApplication("ofstats") do |app|
     134    app.setProperty('target', property.pathfile)
     135    app.setProperty('interval', property.intervalcol)
     136    app.measure('wrapper_ofthroughput', :samples => 1)
     137  end
     138end
     139
     140
     141onEvent(:ALL_UP_AND_INSTALLED) do |event|
     142  info "Starting the collect"
     143  after 2 do
     144    group('Source1').startApplications
     145  end
     146  after 800 do
     147    info "Stopping the collect"
     148    allGroups.stopApplications
     149    Experiment.done
     150  end
     151end
     152
     153defGraph 'Throughput' do |g|
     154  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :throughput, :pathtype)
     155  g.caption "Throughput of Flows"
     156  g.type 'line_chart3'
     157  g.mapping :x_axis => :oml_ts_client, :y_axis => :throughput, :group_by => :pathtype
     158  g.xaxis :legend => 'oml_ts'
     159  g.yaxis :legend => 'Throughput', :ticks => {:format => 's'}
     160end
     161defGraph 'InstantaneousThroughput' do |g|
     162  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :instput, :pathtype)
     163  g.caption "Throughput of Flows"
     164  g.type 'line_chart3'
     165  g.mapping :x_axis => :oml_ts_client, :y_axis => :instput, :group_by => :pathtype
     166  g.xaxis :legend => 'oml_ts'
     167  g.yaxis :legend => 'Instantaneous Throughput', :ticks => {:format => 's'}
     168end
     169
     170}}}