Computing.Net > Forums > Solaris > How to kill defunct processes

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to kill defunct processes

Reply to Message Icon

Name: PVH
Date: November 2, 2001 at 13:12:54 Pacific
Comment:

I was wondering as to how do I kill defunct processes in Solaris 7 without rebooting the system. Any help would be appreciated.

Regards,
PVH.



Sponsored Link
Ads by Google

Response Number 1
Name: danny
Date: November 3, 2001 at 11:37:24 Pacific
Reply:

with the "kill ##" command, where ## is the PID.


0

Response Number 2
Name: Mark M
Date: November 26, 2001 at 22:07:07 Pacific
Reply:

Or if it's really stubborn you might have give it a bit of a harder kick.... if a process is really locked up and won't die, you can try a kill -9 xxx (where xxx = PID)

Obviously you find the process you want to kill with ps -ef but be careful :o) I've seen people make typos and killa process with a shedload of children..oops.


0

Response Number 3
Name: ChrisB
Date: December 11, 2001 at 08:16:38 Pacific
Reply:

Run:

ps -ef

or ps -ef | grep "process name"

find the process ID number:

root 26900 198 0 Dec 10 ? 0:00

The process id in this example is 26900

Use the kill -9 "process id"

Any further questions just let me know.


0

Response Number 4
Name: Me
Date: December 19, 2001 at 06:31:49 Pacific
Reply:

defunct processes can't be killed since they are already dead. To make them disappear you have to kill their parent process...


0

Response Number 5
Name: Questmaker
Date: February 4, 2002 at 00:56:44 Pacific
Reply:

So, the nxt question is:

How do you find the parent process for a process?


0

Related Posts

See More



Response Number 6
Name: Rajah
Date: February 4, 2002 at 14:05:43 Pacific
Reply:

Can anybody explain how these defunct processes are created? I'm facing a problem because of these defunct processes. It is noe allowing any of my cgi applications to run.


0

Response Number 7
Name: Gerald
Date: April 15, 2002 at 03:53:07 Pacific
Reply:

It's not possible to kill defunct processes.

A good way to kill lists of processes is

ps -ef | grep name_of_process | awk '{print "kill -9 ",$2}' | ksh

A way to find the parent process of defunct processes is

ps -ef | grep defunct | awk '{print "kill -9 ",$3}'

Probably the first search will destroy the parent of all defunct processes and recursive subcalls will produce an error because neither the child nor the parent does not exist anymore after deleting the first found parent.

You should not pipe the output to ksh you should pipe it into a file an manual edit the file because the admin should know what to delete.


0

Response Number 8
Name: David Jackson
Date: April 17, 2002 at 16:51:05 Pacific
Reply:

The process is defunct and cannot be killed until the parent process is killed. The process is becoming defunct because it has a FILEHANDLE open at the time the parent is closing.

The parent process ID can be found by:

ps -fe | grep somedefunctprocess | awk '{print $3}'

Be sure you are closing filehandles and doing proper cleanup at the end of your scripts or programs.


0

Sponsored Link
Ads by Google
Reply to Message Icon

need help-satya problem with solaris 8 in...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: How to kill defunct processes

kill ideal processes www.computing.net/answers/solaris/kill-ideal-processes/1550.html

How to restart/ stop a service www.computing.net/answers/solaris/how-to-restart-stop-a-service/2043.html

Process java doesn't killed itself www.computing.net/answers/solaris/process-java-doesnt-killed-itself/3252.html