Revision be963554

View differences:

examples/linearbandwidth.py
13 13
Note: by default, the reference controller only supports 16
14 14
switches, so this test WILL NOT WORK unless you have recompiled
15 15
your controller to support 100 switches (or more.)
16

  
17
In addition to testing the bandwidth across varying numbers
18
of switches, this example demonstrates:
19

  
20
- creating a custom topology, LinearTestTopo
21
- using the ping() and iperf() tests from Mininet()
22
- testing both the kernel and user switches
23

  
16 24
"""
17 25

  
18 26
import sys
examples/udpbwtest.py
6 6
udp traffic. This should be something of a stress test.
7 7

  
8 8
We should also make a tcp version. :D
9

  
10
In addition to trying to saturate global bandwidth in
11
various Mininet configurations, this example:
12

  
13
- uses a topology, TreeTopo, from mininet.topolib
14
- starts up a custom test program, udpbwtest, on each host
15
- dynamically monitors the output of a set of hosts
16

  
9 17
"""
10 18

  
11 19
import os
......
36 44
def monitor( hosts, seconds ):
37 45
   "Monitor a set of hosts and yield their output."
38 46
   poller = select.poll()
39
   Node = hosts[ 0 ] # so we can call class method
47
   Node = hosts[ 0 ] # so we can call class method fdToNode
40 48
   buffers = {}
41 49
   for host in hosts:
42 50
      poller.register( host.stdout )

Also available in: Unified diff