1753773 Members
4906 Online
108799 Solutions
New Discussion юеВ

Defunct processes

 
SOLVED
Go to solution
Kavita Poonia
Regular Advisor

Defunct processes

Hello,

There are some defunct processes running on server. I need to kill them all but when I am issuing the commands kill, kill -9, kill -15 and kill -s SIGKILL they are not getting killed. Because of these defunct processes memory utilization is very high on server, so I need to kill them all.

Please suggest how to do this ?

Thanks a lot !

Regards,
Kavita
22 REPLIES 22
Michael Steele_2
Honored Contributor
Solution

Re: Defunct processes

Hi Kavita:

You are very much mistaken about 'defunct' processes consumming memory, or any resources of any kind. They take up an item in the process table and the process table only. This is clearly spelled out in the 'PS' man page. Or, search the itrc with the pattern 'defunct'.

You can try killing the parent or PPID. This often works. But the source of the problem is poor coding.
Support Fatherhood - Stop Family Law
Yogeeraj_1
Honored Contributor

Re: Defunct processes

hi,

Killing the defunc processes would only be soothing the problem for a short while. You need to look into the problem at the root.

are the processes associated to a specific user in all cases?

revert!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Kavita Poonia
Regular Advisor

Re: Defunct processes

Thanks a lot Michael !

Ya I did know that defunct processes do not utilize the memory but some HP guys told me that they do, so I was confused. And why generally people suggest to kill defunct processes when they do not utilize any resource.


Kavita Poonia
Regular Advisor

Re: Defunct processes

Thanks a lot Yogeeraj !

Actually I do not have any other option, instead of killing them as we have recycled all the applications which are utilizing more memory. The memory utilization reduced at that time but after sometime it has again rised.

Its Parent Process is the process with the name "wrapper". I think it is a process associated with java application and we have lots of java application running on this server.
Bill Hassell
Honored Contributor

Re: Defunct processes

You can't kill a defunct process because it is already killed. It appears in the ps listing only because it was improperly handled by it's parent. A quick Google search will confirm that thousands of defunct processes will consume no resources at all except an entry in the process table. Of course, very bad programming could cause a runaway which then fill the process table so go after the programmers and fix the broken code.

Meanwhile, memory consumption is fairly easy to see. Just ask ps to tell you:

UNIX95=1 ps -eo vsz,pid,ppid,args | sort -rn | head -20

Type this exactly as shown and the biggest (local) memory consumers will be seen. For shared memory, use this command:

ipcs -bmop | sort -rnk8

The segsz column is memory consumed by shared memory.


Bill Hassell, sysadmin
Michael Steele_2
Honored Contributor

Re: Defunct processes

An HP Support Guy told you That!

HP Support has been going down hill steadily and I'm very sorry to here this. They have been removing all of their valuble people and replacing them with people they found on the sidewalk and paying them 15 cents and hour.
Support Fatherhood - Stop Family Law
Kavita Poonia
Regular Advisor

Re: Defunct processes

Hi Bill,

Thanks a lot for your reply. It was really helpful. The java processes are consuming lots of memory on server.
Kavita Poonia
Regular Advisor

Re: Defunct processes

Hi Michael,

Ya HP support guy told me that they consume resources and memory too, so I was confused. Anyways now its very much clear that they do not consume any memory or resource but they are not good for the system, right.

Thank you !
Michael Steele_2
Honored Contributor

Re: Defunct processes

Hi Kavita:

I'm very sorry for your experience with HP support. They're suppose to be where you go for the final answer to your problems. I have used them as references in committee meetings for years always with the comment, "...this is what the manufacturer recommends..".

Use to be you there was a philosophy to 'capture the information from the source' in IT because the source is where you find the answer. Well, hp is the source and they didn't provide you with an answer to a problem thats decades old.

As for your question, I think both Bill and I have given the correct information. 'defunct' processes only take up an entry in the process or ps table and exist due to poor programming clean up. Also, the UNIX95 command is one of my favorites. I'm glad Bill provided it. Store it away and use it daily, or when you're trouble shooting a problem box. Refer to the man page for 'ps' and note the -o arguements for a variety of reporting information. Like pcpu, vsz, rsz, time, state, etc.
Support Fatherhood - Stop Family Law