停止ipcluster引擎(IPython Parallel)

时间:2015-06-19 04:55:51

标签: python ipython ipython-parallel

如何停止已启动的引擎: ipcluster engines --n=8 --daemonize

当前正在运行的流程如下所示:

/usr/bin/python /usr/local/bin/ipcluster engines --n=8 --daemonize
/usr/bin/python -m IPython.parallel.engine --profile-dir /home/ubuntu/.ipython/profile_default --cluster-id  --log-to-file --log-level=20

我不想运行killall python

1 个答案:

答案 0 :(得分:1)

从客户端,您可以致电shutdown

import IPython.parallel as ipp
rc = ipp.Client()
# shutdown specific engines
rc.shutdown([1, 5])
# shutdown all engines:
rc.shutdown()
# shutdown everything, including the Hub
rc.shutdown(hub=True)