LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Command/Script required to send an email alert in case command will not respond (http://www.linuxquestions.org/questions/linux-general-1/command-script-required-to-send-an-email-alert-in-case-command-will-not-respond-945891/)

rajaniyer123 05-19-2012 09:52 AM

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

pan64 05-19-2012 01:12 PM

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.


All times are GMT -5. The time now is 06:31 AM.