Skip to content

Commit

Permalink
Fix wrong parsing of PID from ps
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmitterdorfer committed Apr 28, 2016
1 parent ab4290b commit 283cf15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esrally/utils/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ def kill_running_es_instances(node_prefix):
for line in subprocess.Popen(["ps", "aux"], stdout=subprocess.PIPE).communicate()[0].splitlines():
line = line.decode("utf-8")
if "java" in line and "elasticsearch" in line and node_prefix in line:
pid = int(line.split(None, 1)[0])
pid = int(line.split()[1])
logger.info("Killing lingering ES benchmark instance with PID [%s]." % pid)
os.kill(pid, signal.SIGKILL)

0 comments on commit 283cf15

Please sign in to comment.