LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2007, 02:42 AM   #1
yeo_harry
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
How to automate detection & killing of long running ssh2 processes?


Hi,

I keep having long running ssh2 (more than 3 days) processes that uses a high percebtage of my CPU resources on my SUSE linux server.

Currently, I will log into the system, do a 'top', identify the process and perform a 'kill -9 nnnnn'.

Is there a way to automate the detection & killing of this processes?
 
Old 10-29-2007, 03:28 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
Try starting with:
Code:
ps -C ssh2 -o pid=,stime=
This will list all process id's from command ssh2 and their start time

From there you should be able to decide if you want to kill the process or not.

My testing was searching for bash instead of ssh but the concept is the same.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Killing running processes on Zenwalk 2.8 netstrider Linux - Newbie 2 02-01-2007 05:56 PM
how to automate executing processes with prority daily pranith Linux - General 1 12-16-2005 03:24 AM
Killing running processes hitest SUSE / openSUSE 4 09-03-2005 02:22 PM
Running a browser long enough to load a page, then killing it. davee Programming 1 10-07-2003 09:23 AM
killing processes adriaanbw Linux - Software 3 05-24-2003 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration