def UDPBWGraphs(ctr_udp=1): mts = MyTestSuite() print "Connected to all hosts" mts.startAllPings() print "start pings" time_sleep = 10.0 for k in range(ctr_udp): print "ROUND ", k for remoteclient in [mts.A, mts.B, mts.C, mts.R, mts.S]: for remoteserver in [mts.A, mts.B, mts.C, mts.R, mts.S]: if remoteserver != remoteclient: print (remoteclient.name + ' to ' + remoteserver.name) #mts.R.tcpDump('R_'+remoteclient.name+remoteserver.name+'.pcap') print 'start udpprobe test' bwlim = remoteclient.UDPProbeTest(remoteserver) print 'done udpprobe test; start iperf udp with bw '+bwlim #remoteclient.UDPIperfTest(remoteserver, bwlim) #print 'done iperf udp test' #mts.R.remoteCommand('killall tcpdump') # transfer logs #mts.transferLogs('traffic_'+remoteclient.name+remoteserver.name) mts.stopAllPings() #mts.transferLogs('udpbwtest') return mts
def bandwidthTest(ctr_tcp, ctr_udp): mts = MyTestSuite() print "Connected to all hosts" mts.startAllPings() print "start pings" TCPTest(mts, ctr_tcp) print "iperf TCP x "+str(ctr_tcp) UDPTest(mts, ctr_udp) print "iperf UDP x "+str(ctr_udp) mts.stopAllPings() print "stop pings" print time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()), " DONE" return mts
def UDPBWTests(ctr_udp): mts = MyTestSuite() mts.startAllPings() for remoteclient in [mts.A, mts.B, mts.C, mts.R, mts.S]: for remotesrcdirteserver in [mts.A, mts.B, mts.C, mts.R, mts.S]: if remoteserver != remoteclient: print (remoteclient.name + ' to ' + remoteserver.name) for k in range(ctr_udp): remoteclient.UDPProbeTest(remoteserver) time.sleep(time_sleep) # take a tcpdump at router between round 2 and 4 mts.routerSmallTCPDump(remoteclient, remoteserver, k, 2, 4) mts.stopAllPings() return mts
def UDPProbeTests(ctr_udp=1): mts = MyTestSuite() time_sleep = 10.0 for k in range(ctr_udp): print "ROUND ", k for remoteclient in [mts.A, mts.B, mts.C, mts.R, mts.S]: for remoteserver in [mts.A, mts.B, mts.C, mts.R, mts.S]: if remoteserver != remoteclient: print (remoteclient.name + ' to ' + remoteserver.name) mts.R.tcpDump('R_'+remoteclient.name+remoteserver.name+'.pcap') mts.startAllPings() print 'start test' remoteclient.UDPProbeTest(remoteserver) print 'done test' print 'no traffic for 10 secs' time.sleep(time_sleep) print 'done: stop all process and transfer logs' mts.stopAllPings() mts.R.remoteCommand('killall tcpdump') # transfer logs mts.transferLogs('traffic_'+remoteclient.name+remoteserver.name) return mts