From 283cf151dfbd8d40575fce2b372710a48696a62b Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Thu, 28 Apr 2016 10:47:46 +0200 Subject: [PATCH] Fix wrong parsing of PID from ps --- esrally/utils/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esrally/utils/process.py b/esrally/utils/process.py index 90a1ef99d..8ab174307 100644 --- a/esrally/utils/process.py +++ b/esrally/utils/process.py @@ -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)