diff --git a/python/ray/scripts/scripts.py b/python/ray/scripts/scripts.py index 731445868..3bf312620 100644 --- a/python/ray/scripts/scripts.py +++ b/python/ray/scripts/scripts.py @@ -378,8 +378,29 @@ def start(node_ip_address, redis_address, redis_port, num_redis_shards, @cli.command() def stop(): + # Find the PID of the plasma_store_server process and kill it. subprocess.call( - ["killall plasma_store_server raylet raylet_monitor"], shell=True) + [ + "kill $(ps aux | grep plasma_store_server | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null" + ], + shell=True) + + # Find the PID of the raylet process and kill it. + subprocess.call( + [ + "kill $(ps aux | grep raylet | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null" + ], + shell=True) + + # Find the PID of the raylet_monitor process and kill it. + subprocess.call( + [ + "kill $(ps aux | grep raylet_monitor | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null" + ], + shell=True) # Find the PID of the monitor process and kill it. subprocess.call(