Wednesday, 24 October 2012

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 :


2 comments:

  1. alway try thisone but gone to Maintenance mood

    ReplyDelete
  2. Did you hear there is a 12 word sentence you can tell your man... that will trigger intense feelings of love and impulsive attractiveness to you deep within his chest?

    That's because deep inside these 12 words is a "secret signal" that triggers a man's instinct to love, idolize and guard you with all his heart...

    12 Words Will Fuel A Man's Love Response

    This instinct is so built-in to a man's brain that it will drive him to try better than before to love and admire you.

    Matter of fact, fueling this dominant instinct is so binding to achieving the best possible relationship with your man that as soon as you send your man one of the "Secret Signals"...

    ...You'll immediately find him open his soul and mind to you in such a way he's never expressed before and he will identify you as the one and only woman in the galaxy who has ever truly interested him.

    ReplyDelete