The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
zombie processes and hung process termination ukndoit Shell Programming and Scripting 2 03-13-2008 11:53 PM
killing cascade processes victorin Shell Programming and Scripting 4 12-15-2006 04:57 AM
forking and killing parent processes davewilliams20 UNIX for Dummies Questions & Answers 0 10-17-2005 02:40 AM
killing all processes for an user krishan SUN Solaris 2 05-27-2005 06:38 AM
Killing processes in scripts el_toro Shell Programming and Scripting 4 07-17-2002 05:02 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-16-2008
Registered User
 

Join Date: Sep 2007
Posts: 19
Post Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go?

Thank you
Richard
Reply With Quote
Forum Sponsor
  #2  
Old 01-16-2008
Resident BOFH
 

Join Date: Dec 2007
Posts: 262
what do you mean by "hung"? What is the problem that the "hung" processes are causing. Some processes run from system boot to the next halt/reboot. You really don't want to blindly kill processes.
Reply With Quote
  #3  
Old 01-16-2008
Registered User
 

Join Date: Jan 2008
Posts: 5
i dont know what you mean by "hang" but when my solaris OS is getting really slow responding and seeing that the CPU load is almost always 100% the first thing i would do is execute "prstat" to check which process is taking up load in the CPU. i would kill the process only if i knew that it is not important ie. from users etc. - check the owner in the "prstat" output.
Reply With Quote
  #4  
Old 01-16-2008
Resident BOFH
 

Join Date: Dec 2007
Posts: 262
Quote:
Originally Posted by genix2008 View Post
i dont know what you mean by "hang"
you said it

Quote:
Originally Posted by genix2008
if they hang too long
your box might not be the right size for what your needs are. You may want to implement resource limits or something. If you set a cpu time limit then the OS would kill the processes for you.
Reply With Quote
  #5  
Old 01-17-2008
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
Quote:
but certain scripts which are expected to take a long time to let them go?

How to categorize them actually ?

To be on the safer side for these kind of problems; a safe and reliable approach would be to,

if possible make the process which needs to be monitored dump some [DEBUG] messages, [INFO] messages every 'n' time slice to an unique log file

With that it would be quite easy to track the status of the process by parsing the log file that is specific to each of the process that needs to be monitored.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0