Skip to content
Snippets Groups Projects
Commit 891d8071 authored by Brian O'Connor's avatar Brian O'Connor
Browse files

fixed multiping example

parent ecddbcf2
No related branches found
No related tags found
No related merge requests found
......@@ -23,13 +23,8 @@ def chunks( l, n ):
def startpings( host, targetips ):
"Tell host to repeatedly ping targets"
targetips.append( '10.0.0.200' )
targetips = ' '.join( targetips )
# BL: Not sure why loopback intf isn't up!
host.cmd( 'ifconfig lo up' )
# Simple ping loop
cmd = ( 'while true; do '
' for ip in %s; do ' % targetips +
......@@ -63,6 +58,8 @@ def multiping( netsize, chunksize, seconds):
# Start pings
for subnet in subnets:
ips = [ host.IP() for host in subnet ]
#adding bogus to generate packet loss
ips.append( '10.0.0.200' )
for host in subnet:
startpings( host, ips )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment