1. ps Command and kill match:
Ps-ef|grep local=no|grep-v grep|cut-c 9-15|xargs kill-9
Pipe symbol "|" Used to separate two commands, the output from the left command of the pipe character is entered as the command to the right of the pipe. Let's talk about the connection with the pipe symbol.
Several commands:
"Ps-ef" is a command in red Hat to view all processes. The retrieved process is then entered as the next command "grep local=no".
The output from grep local=no is that all processes that contain the keyword "local=no" are common to the remote connection process in the Oracle database.
Grep-v grep removes the process that contains the keyword "grep" in the listed process.
"Cut-c 9-15" is the 9th character to the 15th character of the input line, which is exactly the process number PID.
The Xargs command in "Xargs kill-9" is used to take the output (PID) of the preceding command as a parameter to the "kill-9" command and execute the order.
"Kill-9" will forcibly kill the specified process, which successfully clears all the remote connection processes for Oracle. For other similar tasks, just modify the keyword section in "grep local=no" to do so.
2. Killall Process Name
Like killing Java-related processes: Killall java
Kill kills multiple processes