The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
killing the process arthi UNIX for Dummies Questions & Answers 3 06-03-2008 05:57 AM
Reg process of killing shanshine SUN Solaris 6 12-05-2007 10:50 AM
killing a process bbhayana UNIX for Dummies Questions & Answers 6 06-02-2007 04:58 AM
killing a process pid jo calamine UNIX for Advanced & Expert Users 16 12-04-2006 03:43 AM
script to monitor process running on server and posting a mail if any process is dead pradeepmacha Shell Programming and Scripting 11 07-12-2005 12:49 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2008
Registered User
 

Join Date: Feb 2008
Posts: 2
Stumble this Post!
Killing of a process and send a mail if the process doesnot come up within 2 minutes

Hi Friends,
I am new to this forum as well as new to shell scripting.
I have a problem here and i need someone to solve this.

Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument .
There is a automated system which detects which process is killed and it starts the process up within two minutes.This is the summary.

Now what i want is:-
The program should contain these features:_
1. It will take the PID of the two process.
2. kill the process with the help of the script(killtheprocess). The
script should contain the two process names(i.e abc & def) .
3. After the process is killed, it should be able to detect if the two particular process has come up within two minutes by the help of the automated sytem
4. If the process comes up then it will send a mail to a group of people that everything is fine .
5. if the process doesnot come up then it should send a mail to a group of people that it needs to be manually started.
6. For confirmation that the process has indeed gone down and come up the two PIDs should be different.

It is urgent . Please help me out. If soemone needs some more clarification then please reply.

Thanks
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-15-2008
Registered User
 

Join Date: Feb 2008
Location: stockholm sweden
Posts: 26
Stumble this Post!
what script languages do you have at your disposal? the bourne shell family (sh ksh bash zsh)? or cshell family (csh tcsh)? Or can you live with perl?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:36 AM.


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

Content Relevant URLs by vBSEO 3.2.0