Commit ca317f54 authored by Deathcrow's avatar Deathcrow
Browse files

small fixes

parent 44feaf16
......@@ -17,6 +17,7 @@ import tempfile
import time
def parse_senders( sender_args, sender ):
#Set user or global settings for each sender. Adjust settings when needed for different utilities
for sender_string in sender_args:
sender_args = sender_string.split('#')
......@@ -174,7 +175,11 @@ def clean_up():
if args.cpunetlog != "":
cpunetlog.terminate()
for i in sender:
subprocess.Popen(["kill", "-9", str(i['utility_data'][0])])
try:
subprocess.Popen(["kill", "-9", str(i['utility_data'][0])])
except KeyError:
subprocess.Popen(["killall", "-s", "9", args.utility])
break
# if i['utility'].returncode == None:
# try:
# i['utility'].kill()
......@@ -203,8 +208,8 @@ parser.add_argument('-u', '--utility', default="netperf", \
help="For iperf3 support run multiple iperf3 servers and specify ports per sender") ## XXX Note: iperf3 support is not tested extensively!!
parser.add_argument('-t', '--time', default="60")
parser.add_argument('-s', '--sender', action='append', nargs='+', required=True, \
help="Specify senders: <src ip>#<dst ip>#<port>#<congestion>#<number>#<interface>#<sender-delay in s>#<early stop in s> -- individual specifications overwrite globals. "+\
"Example: -s 10.0.0.1#10.0.0.2##yeah#2 -- Creates 2 senders using yeah, without changing the global port (-p)")
help="Specify senders: <src ip>[#<dst ip>#<port>#<congestion>#<number>#<interface>#<sender-delay in s>#<early stop in s>] -- individual specifications overwrite globals. "+\
"Example: -s 10.0.0.1#10.0.0.2##yeah#2 -- Creates 2 senders using yeah, without changing the global port (-p). All optional settings can be omitted.")
## "--receiver" sets the receiver if there was no receiver was specified
# (XXX same for --port, etc)
parser.add_argument('-r', '--receiver', default="localhost")
......@@ -240,7 +245,7 @@ flat_sender_args = [item for sublist in args.sender for item in sublist] # make
sender = []
args.tmp_folder = os.path.abspath(args.tmp_folder)
args.tmp_folder = os.path.abspath(args.tmp_folder+"/test-"+args.label+"-"+str(mypid))
args.tmp_folder = os.path.abspath(args.tmp_folder+"/test-"+args.label+"_"+str(mypid))
os.mkdir(args.tmp_folder)
args.samplerate = float(args.samplerate)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment