Solved

How to kill SSH Defunct process

Posted on 2008-10-13
4
3,791 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux script delete files 3 49
How to mount nfs share on this CentOS server? 6 42
EXCHANGE. LINUX, SYMANTEC MESSAGING GATEWAY 2 37
linux - yum package installation issue 2 59
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…
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 …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

860 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