1846957 Members
4668 Online
110257 Solutions
New Discussion

Kill a process

 
SOLVED
Go to solution
M. Tariq Ayub
Regular Advisor

Kill a process

Hi,

I am trying to kill a process by kill -9. but it is not terminating. I have also tried from SAM.

Any help?
10 REPLIES 10
Pete Randall
Outstanding Contributor
Solution

Re: Kill a process

This happens when a process is waiting for something like completion of an I/O request. It won't process the kill signal until it receives the answer to it's I/O request. If kill -9 won't do it, the only simple answer is to reboot.


Pete


Pete
Steven E. Protter
Exalted Contributor

Re: Kill a process

By now the process is probably a zombie. Usually only booting will fix that.
ps -ef | grep defunct
# finds zombies


ps -ef | grep

If the PPID is 1 you can't kill it because process 1 is the whole machine.

If the PPID is not 1, you can wait or try again.

Also:

export UNIX95=1

ps -efH | grep

This indents to show children and is useful in diagnosis.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fragon
Trusted Contributor

Re: Kill a process

Hi,
For safety reason,some process can't be killed even with -9 option! For example, mediainit tool!

-ux
M. Tariq Ayub
Regular Advisor

Re: Kill a process

ITS PPID is 1
Abskhan
Occasional Advisor

Re: Kill a process

please dont kill it then.You will bring down the machine !!!!!!!!!!!!!!!!!!!!
doug mielke
Respected Contributor

Re: Kill a process

ppid of 1, init, mother of all processes.
It could have become orphaned if it's parent died, and only a parent can kill a child.
If parent dies, then init will adopt, and try to manage it.
It really doesn't matter tho, if kill -9 wont kill it, no kill will.
Other then reboot, which brings with it it's own risks and challenges with a hung process, you can try to find the system event that the process is waiting for, and satisfy it, or 'abort' the request. (i.e., if hung accessing the tape drive, turn the tape off, to see if the process stops waiting.
Abskhan
Occasional Advisor

Re: Kill a process

sorry about my earlier posting. I read the your posting as PID 1.
When PPID is 1 , it means that it is an orphan process.YOu can try killing with kill -9 .
Pete Randall
Outstanding Contributor

Re: Kill a process

A PPID of 1 indicates either an orphan or a zombie process. Once again, the only reasonable solution is to re-boot your machine, as the only way to kill one of these processes is to kill the parent and you certainly don't want to kill init!


Pete


Pete
Caesar_3
Esteemed Contributor

Re: Kill a process

Hello!

There is no way to kill zombie process
so the only you can do is to reboot the system.

Caesar
M. Tariq Ayub
Regular Advisor

Re: Kill a process

Ok i will give a reboot to the system. as it is the only safe way. Thanks a lot guys.