In linux, view and terminate processes. In linux, terminate processes.
1. Check which process occupies the port.
Example: netstat-anp | grep 1160
Ps: Check that port 1169 is occupied by that process.
2. Search for processes
Example: ps-ef | grep 'tomcat'
Ps: Find the process whose name contains tomcat
3. Terminate the process
The method for terminating a process is as follows:
Killed 8080
Ps: terminate a process with process no. 8080
If the above command cannot terminate the process, you can use the killall command to terminate the process.
For example, killall-KILL 8080
Ps: Force terminate a process with process no. 8080
How can I check the reason for linux Process Termination?
After a process is killed, it should not be running. Are you sure the process is killed? Either being suspended or using the Lun Xun mechanism to save CPU resources
Briefly describes how to start and terminate a linux Process and how to view the process
Processes in Linux are divided into independent daemon and passive daemon. The independent daemon is started independently, while the passive daemon is started by the Xinetd service listener. For example, the mail server configuration daemon sendmail is an independent daemon, which can be started by using the service command, and the pop3 protocol is started by a passive daemon. You need to modify/etc/xinetd. d directory, and then restart xinetd.
To view processes, run the kill command to list all background processes that have been deleted by the ps command. The syntax format of the kill command is very simple. There are roughly two methods: kill [-s Signal |-p] [-a] process number... kill-l [Signal]-s specifies the signal to be sent. It can be either a signal name or a number. -P specifies that the kill command only displays the pid of the process and does not actually send the end signal. -L display the signal name list, which can also be found in the/usr/include/linux/signal. h file. General Usage: ps lists all the current background process kill PID. If a process is suspended or idle and cannot be killed by using the kill command, a signal 9 must be sent to forcibly stop the process.