Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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.

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.

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.

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

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.

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.

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.

![]() |
need help-satya
|
problem with solaris 8 in...
|

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