View and kill Tomcat process

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/lihua5419/article/details/88893885

First, the local environment

1, use the command to kill the process according to the process ID

netstat -ano  can view all processes

netstat -ano | findstr [specify the port number] 

Example: netstat -ano | findstr 8080

Example: taskkill / F / PID 748

2, use the command to kill the process under the name
1> First, find the process number corresponding to the process name
tasklist | findstr [process ID]; such as: tasklist | findstr 748

2> and then kill the process according to the process name
taskkill / f / t / im [process name]; such as: taskkill / f / t / im javaw.exe


Two, Linux viewing port occupancy and kill the process

1, view the port number occupancy: 

netstat -apn | grep 11305

2, after finding the process to determine the process ID number, and then use the following command to view the details:

ps -aux | grep <process ID> 

3. kill the process

kill  <pid>

 

Three, Linux View Tomcat process

1, view all processes Tomcat

ps -ef | grep tomcat

2, to see whether the process started tomcat

ps aux | grep tomcat

Subsequent updates to other commands. . .

Guess you like

Origin blog.csdn.net/lihua5419/article/details/88893885