Showing posts with label kill tomcat process in linux. Show all posts
Showing posts with label kill tomcat process in linux. Show all posts

Wednesday, 24 October 2012

How to kill tomcat process in linux

Find and kill tomcat process in linux with below steps:

Step 1 : Find the process id of the tomcat process:

Use  following commands to find tomcat process:


ps -ef  | grep tomcat  :here try with capital Tomcat as well

if not found with above command use below command :

ps -ef  | grep java

if still not found with above commands use below command which lists down all the processes and  go through each processes one by one to find tomcat process:

ps -ef

In above commands
-e :select all process
-f  : list down all the processes

Note *:Check command man ps for more options.

Step 2: From above steps we will able to find out tomcat process pid. use below command to
 kill the process

kill -9 pid

-9 is special Kill signal, which will kill the process. There is very less chance of failing single with option -9.

Note *:Check command man kill for more options.

Step 3 :execute step 1 to check whether tomcat process is killed or not.



How to kill Process In Linux


Some time we fire stop command on particular process using “service” command but it doesn’t stop. In such case we need to stop the process using ps command.

Follow below steps to kill process:

Step 1 :  Before killing the process we need identify which process to kill. Use below command to find particular process:

ps -ef  | grep java


Note: Here all wunning java processes will be listed. change java to other process name as per needed.

-e : select all  running processes
-f :  list down all the process

Description: ps -ef will get all the running process list which is given to grep commnad which will only show java processes.

Step 2: Identify the process id (pid ) from above command result and use below command to kill the process:

kill pid

if above command does not work.Then use below command

kill -9 pid

-9 is special Kill signal, which will kill the process. There is very less chance of failing single with option -9.

step 3 : verify process is killed or not using step 1

Note*: use command man ps and man kill  for more options for ps and kill command.


E.g.  click to see example for find and kill tomcat process



Also check below links :