The tomcat port number and process under Linux
1. View the Tomcat process:
Ps-aux | grep tomcat (or Ps-ef | grep Tomcat is OK)
You can see that there are now two Tomcat processes running, one with a PID of 9974 and another PID of 23422.
2, view the port number according to the process:
sudo netstat-naop | grep 23422
This is the port number to view the process occupied by PID 23422;
You can see that the 9300 and 9399 port numbers are occupied, where 9399 is the port number of the Tomact server's shutdown, and 9300 is the connector port number of the Tomcat Catalina service.
3, view the process according to the port number:
sudo lsof-i:9300
You can view the process that occupies the port number. Online says use Ps-aux | grep 9300 Similar to the command, the result does not seem to have the information we need.
4, kill the process according to the process number:
Kill-9 23422
Kill the Tomcat process with process number 23422;
The tomcat port number and process under Linux