Solved

How to kill SSH Defunct process

Posted on 2008-10-13
4
3,598 Views
Last Modified: 2013-12-16
Hi All,

Currently we have issues with defunct processes. These defunct processes slows down the performance of the database servers. I know defunct can be killed by either rebooting the server or kill the parent process. My problem is as this is a database server, we have some processes related to database too running as defunct.

My request is to kill only SSH defunct processes. Do we any script to do so.

Kindly assist.

Cheers,
Bull
0
Comment
Question by:tkstkstks
  • 2
4 Comments
 
LVL 9

Expert Comment

by:michofreiha
Comment Utility
I  advice to list them all first and them kill them one by one
to list all SSh processes:

ps -aux | grep SSH

You'll get the PID of each one and kill them one by one

kill -9 PID
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 125 total points
Comment Utility
If you can not kill a defunct process, then you have to reboot.
0
 

Author Comment

by:tkstkstks
Comment Utility
I have almost 250 defunct process running, i don't have time to kill each one by one.
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 125 total points
Comment Utility
can you reboot?

try

ps -ef | grep defunct | grep -v grep | awk ' { print $2 } ' | while read pid
do
  kill -9 $pid
done
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now