杀死斯坦福大学的核心nlp进程 [英] Killing Stanford core nlp process

查看:99
本文介绍了杀死斯坦福大学的核心nlp进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令(在Ubuntu 16.04上)启动Stanford Core NLP服务器:

I launch Stanford Core NLP server using the following command (on Ubuntu 16.04):

java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000

使用完后,我想杀死该服务器.仅仅关闭终端是没有帮助的.它不会释放内存.有没有办法在不重新启动计算机的情况下杀死它并释放内存?

I would like to kill this server once I am done using it. Simply closing terminal does not help. It does not release memory. Is there way to kill it and release memory without rebooting computer?

推荐答案

您始终可以在终端窗口中CTRL-C来停止服务器.

You can always CTRL-C in the terminal window to stop the server.

您还可以ps aux | grep StanfordCoreNLPServer查找pid,然后手动终止该进程.

You could also ps aux | grep StanfordCoreNLPServer to find the pid and then kill the process manually.

启动服务器时,它应该创建一个关机密钥,您可以将该消息发送到服务器以关闭服务器.这在我的Macbook Pro上不起作用(可能是权限问题??),但我发现它在其他计算机上也可以使用.

When the server is started it should create a shutdown key and you can send that message to the server to close the server. This isn't working on my Macbook Pro (maybe a permission issue ??) but I've seen it work on other machines.

这是命令:

wget "localhost:9000/shutdown?key=`cat /tmp/corenlp.shutdown`" -O -

请注意关机密钥存储在/tmp/corenlp.shutdown

Note the shutdown key is stored at /tmp/corenlp.shutdown

如果使用-server_id server0选项,则关机密钥将存储在此路径/tmp/corenlp.shutdown.server0

If you use the the -server_id server0 option the shutdown key will be stored at this path /tmp/corenlp.shutdown.server0

这篇关于杀死斯坦福大学的核心nlp进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆