The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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-14-2008 02:53 AM
killing cascade processes victorin Shell Programming and Scripting 4 12-15-2006 07:57 AM
forking and killing parent processes davewilliams20 UNIX for Dummies Questions & Answers 0 10-17-2005 05:40 AM
killing all processes for an user krishan SUN Solaris 2 05-27-2005 09:38 AM
Killing processes in scripts el_toro Shell Programming and Scripting 3 07-17-2002 08:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-16-2008
ukndoit ukndoit is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 20
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
  #2 (permalink)  
Old 01-16-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 423
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.
  #3 (permalink)  
Old 01-16-2008
genix2008 genix2008 is offline
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.
  #4 (permalink)  
Old 01-16-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 423
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.
  #5 (permalink)  
Old 01-17-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0