Server_cmd, client_cmd = setCommand( totalHost, hostID, serverID, workload, bandwidth) Print "Run scripts in the background on hosts." append( map( float, host_bandwidth_lines. Print "Read server setup for communication workload and bandwidth." addController( name = 'c0', controller = Controller, protocol = 'tcp', port = 6633) If float( communication_loadsize) > 0.0 and float( communication_bandwidth) > 0.0: OutputFile_s = ' -logfile ' + host + '-' + server + cmdTail_sĪddress_target = address_head + str( sid)Ĭommunication_loadsize = ( float( loadsize_array)) / 1024Ĭommunication_bandwidth = float( bandwidth_array) * 8.0 / 1024Ĭmd_c = cmdHead_c + address_target + ' -p ' + str( port_head + int( host_id)) + ' -n ' + str( communication_loadsize) + 'k' + ' -b ' + str( communication_bandwidth) + 'k' + outputFile_cĬommunication_loadsize = ( float( loadsize_array))Ĭommunication_bandwidth = float( bandwidth_array) * 8.0Ĭmd_c = cmdHead_c + address_target + ' -p ' + str( port_head + int( host_id)) + ' -n ' + str( communication_loadsize) + '' + ' -b ' + str( communication_bandwidth) + '' + outputFile_c write( str( bandwidth_array) + ' \n')ĬmdHead_s = 'sudo stdbuf -i0 -o0 -e0 iperf3 -s -i 0 -p 'ĬmdHead_c = 'sudo stdbuf -i0 -o0 -e0 iperf3 -c ' Para_number = int( host_number) * int( host_number)īandwidth_array = bandwidth_array + bw node import OVSKernelSwitch, UserSwitchįrom mininet. node import CPULimitedHost, Host, Nodeįrom mininet.
node import Controller, RemoteController, OVSKernelSwitch, IVSSwitch, UserSwitch, OVSControllerįrom mininet. util import dumpNodeConnectionsįrom mininet.