LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-19-2012, 09:52 AM   #1
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Rep: Reputation: 30
Command/Script required to send an email alert in case command will not respond


Hi,

I would like to command/script which can send me an alert in case command will not return any o/p and just hung.

As in my case one of the application got hung frequently, but the process running fine, so I would like to set up the alert in which case if it will not return any o/p there should be email alert. In my case the command just hung, I have to quit the same by Ctrl+z.

Please suggest.

Thanks
Rajan
 
Old 05-19-2012, 01:12 PM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,837

Rep: Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287
This can be hard. How would you know if an application was running or just hung? What OS you have, how can you send mails (do you have your own system or need to contact ISP?) Maybe the script can also restart your app instead of sending a mail, or maybe you can modify your app to wake up automatically.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script/Command Require in case command hangs rajaniyer123 Linux - General 1 04-03-2012 06:45 PM
Command based email client to send email through secure smtp havolinec Linux - Newbie 2 07-27-2010 07:40 AM
Send email from command line markotitel Linux - Newbie 4 10-26-2009 08:41 AM
Need to send email from command promt adhar Red Hat 3 09-23-2009 10:57 AM
LXer: Perl script to monitor disk space and send an email alert LXer Syndicated Linux News 1 02-23-2007 01:12 PM


All times are GMT -5. The time now is 03:39 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration