1. Ps-ef | grep java
Represents the process information for viewing all processes where CMD is Java
2. Ps-aux | grep java
-aux Show All States
3. kill-9 [PID]
-9 means the forced process stops immediately
4. lsof-i:8080 View 8080 port occupancy
Other:
1. Netstat
Netstat-nat | grep 3306
2. lsof
Lsof-n-p-i tcp-s Tcp:listen
-N indicates that the host is displayed as an IP address
-P indicates that the port is displayed as a number, by default the port name
-I meaning more, specific man lsof, mainly used to filter lsof output results
-S and -I are used in conjunction to filter the output
3. Telnet
Telnet 127.0.0.1 3306
4. NC
Nc-w 10-n-Z 127.0.0.1 1990-1999
-W indicates waiting time for connection is ten seconds
-N try to convert port number names to port number numbers
-Z does not have input and output for ports that need to be inspected for port scan mode
127.0.0.1 the IP address to check
1990-1999 can be a port or a port
returns the result as an open port, such as the 1997 and 1998 ports In this example
https://my.oschina.net/foreverich/blog/402252
5. View occupy port and kill
http://blog.csdn.net/guoguo1980/article/details/2324454
Lsof-n-p-i tcp-s Tcp:listen
Kill process ID
Several commands for the Centos view process