how do I kill defunct processes?

mqm 17700 16815 0 0:00 <defunct>

kill -9 does not work, even as root

Process 17700 is already dead. Process 16815 is the parent of process 17700. Process 16815 is currently the only thing capable of making process 17700 disappear completely. Until the parent waits for its dead children or informs the os that it is not interested in any dead children, this situation will persist. You could kill process 16815. Then process 17700 will be inherited by init and init will reap it immedately.

On another note, are you actually using WebSphere's MQ for JMS? I've seen admins in the past that are using WAS, but not MQ for JMS who install it as default. You then end up with processes you really don't use or need.

sol: :cool:
1) A reboot can solve your issue, OR
2) Leave it as it is.

Also the defunct (Zombie) does not occupy much of resources until you have them in lots where by you are devoid of PID's.

dbasan,
Read Perderabo's reply. You do not need a reboot to get rid of defunct processes. I have seen runaway processes fork 3000+ defunct processes which were cleaned up in mircoseconds after the parent process was killed.

You can also reap processes if init does not do so using preap.

I'm pretty sure that preap is Solaris only. I'd be interested to know if any other system has it.

Sorry yes, I should have clarified that I posted that, this being in the Solaris Forum, I am not aware of it existing in any other flavour either.

Doing a kill -SIGHUP on the parent will get rid of the defunct process. The problem is that all of the other processes will have to be started over again.

Is that an "mqm" specific solution or are you claiming that as a generic solution?

What an application does with SIGHUP is, as they say, application specific.

Just wondering, is there anyway to keep this from happening? I see several "reactive" responses, but I am looking for something *proactive*. (Wow, did I just use that word? Proactive?) :eek: