send kill signal to iperf3
This commit is contained in:
@@ -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():
|
|||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user