Solved

How to kill SSH Defunct process

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS RDS 3 83
Linux Mint 18 31 89
AWS - HAProxy- KeepAlived 5 41
number in printf 13 27
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.

785 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