Guys,
I am a newbie to shell scripting.
I am dealing with an issue of a process being hung on a random basis for days. Is there a way to write a script that will send an email (with process or job details) if a process has been running for more than 24 hrs? I use cron to run different jobs. I would like to add this script to cron and run it x amount of times per day to scan the processes/jobs.
#!/bin/ksh
ps -ef | grep "app_id"
gives me all the processing running under app_id.
Any help will be highly appreciated.
Al
I am a newbie to shell scripting.
I am dealing with an issue of a process being hung on a random basis for days. Is there a way to write a script that will send an email (with process or job details) if a process has been running for more than 24 hrs? I use cron to run different jobs. I would like to add this script to cron and run it x amount of times per day to scan the processes/jobs.
#!/bin/ksh
ps -ef | grep "app_id"
gives me all the processing running under app_id.
Any help will be highly appreciated.
Al