Solved

How to kill SSH Defunct process

Posted on 2008-10-13
4
3,679 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
ID: 22703979
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
ID: 22704486
If you can not kill a defunct process, then you have to reboot.
0
 

Author Comment

by:tkstkstks
ID: 22704620
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
ID: 22704693
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

932 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

11 Experts available now in Live!

Get 1:1 Help Now