fixed default iperf formatting behavior
This commit is contained in:
+3
-3
@@ -617,7 +617,7 @@ class Mininet( object ):
|
|||||||
|
|
||||||
# XXX This should be cleaned up
|
# XXX This should be cleaned up
|
||||||
|
|
||||||
def iperf( self, hosts=None, l4Type='TCP', udpBw='10M', format='M' ):
|
def iperf( self, hosts=None, l4Type='TCP', udpBw='10M', format=None ):
|
||||||
"""Run iperf between two hosts.
|
"""Run iperf between two hosts.
|
||||||
hosts: list of hosts; if None, uses opposite hosts
|
hosts: list of hosts; if None, uses opposite hosts
|
||||||
l4Type: string, one of [ TCP, UDP ]
|
l4Type: string, one of [ TCP, UDP ]
|
||||||
@@ -640,8 +640,8 @@ class Mininet( object ):
|
|||||||
bwArgs = '-b ' + udpBw + ' '
|
bwArgs = '-b ' + udpBw + ' '
|
||||||
elif l4Type != 'TCP':
|
elif l4Type != 'TCP':
|
||||||
raise Exception( 'Unexpected l4 type: %s' % l4Type )
|
raise Exception( 'Unexpected l4 type: %s' % l4Type )
|
||||||
if not format == 'M':
|
if format:
|
||||||
iperfArgs += '-f %s ' %format
|
iperfArgs += '-f %s ' % format
|
||||||
server.sendCmd( iperfArgs + '-s', printPid=True )
|
server.sendCmd( iperfArgs + '-s', printPid=True )
|
||||||
servout = ''
|
servout = ''
|
||||||
while server.lastPid is None:
|
while server.lastPid is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user