Pass code check.

This commit is contained in:
Bob Lantz committed 2012-04-10 00:12:37 +00:00
1 parent 92b601aba9
commit 7cb340b7c9
3 files changed
+3 -14

No files matched your search

-8
View File
@@ -30,7 +30,6 @@ def startpings( host, targetips ):
# BL: Not sure why loopback intf isn't up! # BL: Not sure why loopback intf isn't up!
host.cmd( 'ifconfig lo up' ) host.cmd( 'ifconfig lo up' )
# Simple ping loop # Simple ping loop
cmd = ( 'while true; do ' cmd = ( 'while true; do '
' for ip in %s; do ' % targetips + ' for ip in %s; do ' % targetips +
@@ -85,10 +84,3 @@ def multiping( netsize, chunksize, seconds):
if __name__ == '__main__': if __name__ == '__main__':
setLogLevel( 'info' ) setLogLevel( 'info' )
multiping( netsize=20, chunksize=4, seconds=10 ) multiping( netsize=20, chunksize=4, seconds=10 )
+2 -4
View File
@@ -8,13 +8,13 @@ monitoring them
from mininet.topo import SingleSwitchTopo from mininet.topo import SingleSwitchTopo
from mininet.net import Mininet from mininet.net import Mininet
from mininet.log import setLogLevel from mininet.log import setLogLevel
from mininet.util import quietRun
from time import time, sleep from time import time
from select import poll, POLLIN from select import poll, POLLIN
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
def monitorFiles( outfiles, seconds, timeoutms ): def monitorFiles( outfiles, seconds, timeoutms ):
"Monitor set of files and return [(host, line)...]"
devnull = open( '/dev/null', 'w' ) devnull = open( '/dev/null', 'w' )
tails, fdToFile, fdToHost = {}, {}, {} tails, fdToFile, fdToHost = {}, {}, {}
for h, outfile in outfiles.iteritems(): for h, outfile in outfiles.iteritems():
@@ -79,5 +79,3 @@ def monitorTest( N=3, seconds=3 ):
if __name__ == '__main__': if __name__ == '__main__':
setLogLevel('info') setLogLevel('info')
monitorTest() monitorTest()
+1 -2
View File
@@ -35,8 +35,7 @@ def perfTest():
print "Testing network connectivity" print "Testing network connectivity"
net.pingAll() net.pingAll()
print "Testing bandwidth between h1 and h4" print "Testing bandwidth between h1 and h4"
h1 = net.getNodeByName('h1') h1, h4 = net.getNodeByName('h1', 'h4')
h4 = net.getNodeByName('h4')
net.iperf((h1, h4)) net.iperf((h1, h4))
net.stop() net.stop()