fixed multiping example
This commit is contained in:
@@ -23,13 +23,8 @@ def chunks( l, n ):
|
|||||||
def startpings( host, targetips ):
|
def startpings( host, targetips ):
|
||||||
"Tell host to repeatedly ping targets"
|
"Tell host to repeatedly ping targets"
|
||||||
|
|
||||||
targetips.append( '10.0.0.200' )
|
|
||||||
|
|
||||||
targetips = ' '.join( targetips )
|
targetips = ' '.join( targetips )
|
||||||
|
|
||||||
# BL: Not sure why loopback intf isn't 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 +
|
||||||
@@ -63,6 +58,8 @@ def multiping( netsize, chunksize, seconds):
|
|||||||
# Start pings
|
# Start pings
|
||||||
for subnet in subnets:
|
for subnet in subnets:
|
||||||
ips = [ host.IP() for host in subnet ]
|
ips = [ host.IP() for host in subnet ]
|
||||||
|
#adding bogus to generate packet loss
|
||||||
|
ips.append( '10.0.0.200' )
|
||||||
for host in subnet:
|
for host in subnet:
|
||||||
startpings( host, ips )
|
startpings( host, ips )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user