Skip to content
Snippets Groups Projects
Commit 4a024f31 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

send kill signal to iperf3

parent 9b9f0682
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ def kill_processes(name): ...@@ -52,7 +52,7 @@ def kill_processes(name):
out_arr = out.split() out_arr = out.split()
pid_to_kill = out_arr[1] pid_to_kill = out_arr[1]
print "Now killing process ID " + pid_to_kill + " on Phone" print "Now killing process ID " + pid_to_kill + " on Phone"
cmd = 'sudo adb -s ' + device_id +' shell "kill ' + pid_to_kill + '"' cmd = 'sudo adb -s ' + device_id +' shell "kill -9 ' + pid_to_kill + '"'
status, out = commands.getstatusoutput(cmd) status, out = commands.getstatusoutput(cmd)
if status != 0: if status != 0:
print "Error execting command to kill process " + name print "Error execting command to kill process " + name
...@@ -95,6 +95,7 @@ def stop_ue(): ...@@ -95,6 +95,7 @@ def stop_ue():
os.system('sudo adb -s ' + device_id + ' shell \"settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true\" ') os.system('sudo adb -s ' + device_id + ' shell \"settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true\" ')
print "Killing iperf/ping sessions" print "Killing iperf/ping sessions"
kill_processes('iperf') kill_processes('iperf')
kill_processes('iperf3')
kill_processes('ping') kill_processes('ping')
i=1 i=1
......
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