Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Patch: Detection of running t-rex instance before initializing
[csit.git]
/
resources
/
libraries
/
python
/
TrafficGenerator.py
diff --git
a/resources/libraries/python/TrafficGenerator.py
b/resources/libraries/python/TrafficGenerator.py
index
b125a0b
..
7f53836
100644
(file)
--- a/
resources/libraries/python/TrafficGenerator.py
+++ b/
resources/libraries/python/TrafficGenerator.py
@@
-167,6
+167,9
@@
class TrafficGenerator(object):
logger.error('trex-cfg failed: {0}'.format(stdout + stderr))
raise RuntimeError('trex-cfg failed')
logger.error('trex-cfg failed: {0}'.format(stdout + stderr))
raise RuntimeError('trex-cfg failed')
+ (ret, _, _) = ssh.exec_command(
+ "sh -c 'pgrep t-rex && sudo pkill t-rex'")
+
(ret, _, _) = ssh.exec_command(
"sh -c 'cd {0}/scripts/ && "
"sudo nohup ./t-rex-64 -i -c 7 --iom 0 > /dev/null 2>&1 &'"
(ret, _, _) = ssh.exec_command(
"sh -c 'cd {0}/scripts/ && "
"sudo nohup ./t-rex-64 -i -c 7 --iom 0 > /dev/null 2>&1 &'"