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") |
| 66 | defProperty('theSender', "outside-loadbaltest", "ID of sender node") |
| 67 | defProperty('theReceiver', "inside-loadbaltest", "ID of receiver node") |
| 68 | defProperty('theSwitch',"switch-loadbaltest","ID of switch node") |
| 73 | defApplication('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 | |
| 80 | app.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 | |
| 95 | end |
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 | |
| 228 | defGroup('Servers', property.theReceiver) do |node| |
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 | |
| 251 | defGroup('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 |
| 258 | end |
| 259 | defGroup('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 |
| 266 | end |
| 267 | |
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 |
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 |
| 285 | end |
| 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 | |
| 296 | defGraph '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" |