From 688a0d17e60d165b39e5f47e53552f3c99c0722d Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Sat, 23 Feb 2019 12:08:39 -0800 Subject: [PATCH] Kill dashboard and reporter in ray stop. (#4116) --- python/ray/scripts/scripts.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/python/ray/scripts/scripts.py b/python/ray/scripts/scripts.py index 3bf312620..b4d853cb2 100644 --- a/python/ray/scripts/scripts.py +++ b/python/ray/scripts/scripts.py @@ -440,6 +440,22 @@ def stop(): ], shell=True) + # Find the PID of the Ray reporter process and kill it. + subprocess.call( + [ + "kill $(ps aux | grep reporter.py | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null" + ], + shell=True) + + # Find the PID of the Ray dashboard process and kill it. + subprocess.call( + [ + "kill $(ps aux | grep dashboard.py | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null" + ], + shell=True) + # Find the PID of the jupyter process and kill it. try: from notebook.notebookapp import list_running_servers