Changes between Version 5 and Version 6 of GEC20Agenda/LabWiki/ModuleE/DesignSetup


Ignore:
Timestamp:
08/04/14 11:22:29 (10 years ago)
Author:
dbhat@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC20Agenda/LabWiki/ModuleE/DesignSetup

    v5 v6  
    55=== 1.1 Get Flow Statistics you want to measure ===
    66
    7 Define stats_reply in /root/learning-switch-copy.rb as follows
    8 
    9 
    10 {{{
     7Define stats_reply in /root/learning-switch-copy.rb as follows. This file is the Trema controller script which we ran in ModuleC. For the purpose of this tutorial, the modified script has been downloaded into switch1 prior to this tutorial. [[BR]]
     8You can find this file in the node called switch1. If you need help with logging in to your nodes, please refer [http://groups.geni.net/geni/wiki/HowTo/LoginToNodes How To Login]. [[BR]]
     9
     10
     11{{{
     12#!ruby
    1113def stats_reply (dpid, message)
    1214    puts "[flow stats_reply #{@my_switch}]---------------------------------"
     
    4143=== 1.2 Define Flow Statistics measurement points ===
    4244
    43 {{{
     45We now proceed to write the application which collects the measurement points defined in the controller code above. [[BR]]
     46The complete script is already pre-loaded into the node switch1 at /usr/local/bin/learn_ofcollect.rb. The steps provided here are for your reference.
     47
     48{{{
     49#!ruby
    4450class MPThroughput < OML4R::MPBase
    4551   name :ofthroughput
     
    5662
    5763{{{
     64#!ruby
    5865def processOutput(output)
    5966  column = output.split(" ")
     
    6673=== 1.4 Write application Script ===
    6774{{{
    68 
     75#!ruby
    6976!/usr/bin/env ruby
    7077require 'rubygems'
     
    141148== 2. Write OEDL Script to run in !LabWiki ==
    142149
     150This script is used to orchestrate the OML application we just wrote. It is pre-loaded into your !LabWiki directory as GEC20_flowstatistics.oedl. [[BR]]
     151The steps provided here are for your reference.
    143152
    144153=== 2.1 Define Resource name ===
     
    148157
    149158{{{
     159#!ruby
    150160defProperty('source1', "switch1-rspecforMax", "ID of a resource")
    151161defProperty('source2', "switch2-rspecforMax", "ID of a resource")
     
    162172
    163173{{{
     174#!ruby
    164175defProperty('pathfile', "/tmp/flowstats.out", "Path to file")
    165176}}}
     
    169180
    170181{{{
     182#!ruby
    171183defApplication('ofstats') do |app|
    172184  app.description = 'Simple Definition for the of-collect application'
     
    186198
    187199{{{
     200#!ruby
    188201defGroup('Source3', property.source1) do |node|
    189202  node.addApplication("ofstats") do |app|
     
    198211
    199212{{{
     213#!ruby
    200214defGraph 'Throughput' do |g|
    201215  g.ms('wrapper_ofthroughput').select(:oml_ts_client, :throughput, :srcaddr)