identify origin of a linux process

when a set of processes of the same command are running. Sometime you need to kill a particular one because of wrong parametesr used. The first task is identify the process id (pid). I found this can be obtained by finding the origin directory using command

ps -aux > x

check file x to find origin folder of each pid (eg 32502) , then kill it

kill -9 32502

or

you may stop one suspected process and examine the output status to ascertain the right pid

 

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s