本文介绍了如何在终端中终止这个tomcat进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 ps -ef | grep tomcat 我发现了一个正在运行的tomcat服务器。我尝试了 kill -9 {id} ,但它返回没有这样的过程。我究竟做错了什么?

Using ps -ef | grep tomcat I found a tomcat server that is running. I tried kill -9 {id} but it returns "No such process." What am I doing wrong?

以下是一个例子:

Admins-MacBook-Pro:test-parent tom.maxwell$ ps -ef | grep tomcat
2043706342 39707 39695   0  3:40PM ttys000    0:00.00 grep tomcat
Admins-MacBook-Pro:test-parent tom.maxwell$ kill -9 39707
-bash: kill: (39707) - No such process


推荐答案

没有必要知道Tomcat的pid(进程ID)来杀死它。您可以使用以下命令来杀死Tomcat:

There is no need to know Tomcat's pid (process ID) to kill it. You can use the following command to kill Tomcat:

pkill -9 -f tomcat

这篇关于如何在终端中终止这个tomcat进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 07:46
查看更多