| 109 | |
| 110 | OEDL script |
| 111 | {{{ |
| 112 | |
| 113 | defProperty('source1', "nowcastbox-sdxdemo", "ID of a resource") |
| 114 | defProperty('intervalcol',"1", "Interval to Tail") |
| 115 | |
| 116 | defProperty('pathfile', "/tmp/flowstats.out", "Path to file") |
| 117 | |
| 118 | |
| 119 | |
| 120 | defApplication('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 |
| 131 | end |
| 132 | defGroup('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 |
| 138 | end |
| 139 | |
| 140 | |
| 141 | onEvent(: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 |
| 151 | end |
| 152 | |
| 153 | defGraph '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'} |
| 160 | end |
| 161 | defGraph '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'} |
| 168 | end |
| 169 | |
| 170 | }}} |