Hi,
does any one have job or routine or shell script that is automatic send email if job hung?
thanks in advance.
Yen
automatic send alert email when job hung
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 407
- Joined: Mon Jun 27, 2005 8:54 am
- Location: Walker, Michigan
- Contact:
I wrap a timer around my dsjob call in my dsjob invoker script. The timer is a parameter number of minutes. The default is 60 minutes. But can be specified as anything between 1 and whatever. When the time is exceeded, an email/page (to designated ids) and openview message are sent via the script that the job is wrong long. The job is not terminated as it may just be running long or the time needs to be increased.
There is a job called MonitorSeq in EtlStats which you could modify to to send you an email if a job runs long. Rght now it gets row counts and emails the log of all jobs that fail in a sequence. Instead of a wrapper this would need to start at the same time or right after you start the job you want to monitor.
Mamu Kim
Hello Kduke, Autranumdane and ArndW - Thank you so much for such a quick response.
Kduke - Where do I find job MonitorSeq in EtlStats? I went to your website http://www.duke-consulting.com/KimD/DataStage_Tips.htm, I clicked etlstat.zip, it said page can not be found. I haven't experienced any DS routine. Any help from you will be greatly appreciated.
Ultramundance - I am also interesting how you wrap a timer in dsjob. Can you please send the sample script & how it call in dsjob? Thanks for your feed back.
ArndW - I determined job hung if it runs more than 2 hours, especially incremental update job. these jobs are run nightly and and they should not take more than 2 hours. This specific job took 17 hours and job status is still running. this job is definitely got hung.
thanks for all your helps. I am looking for your advice.
Yen
Kduke - Where do I find job MonitorSeq in EtlStats? I went to your website http://www.duke-consulting.com/KimD/DataStage_Tips.htm, I clicked etlstat.zip, it said page can not be found. I haven't experienced any DS routine. Any help from you will be greatly appreciated.
Ultramundance - I am also interesting how you wrap a timer in dsjob. Can you please send the sample script & how it call in dsjob? Thanks for your feed back.
ArndW - I determined job hung if it runs more than 2 hours, especially incremental update job. these jobs are run nightly and and they should not take more than 2 hours. This specific job took 17 hours and job status is still running. this job is definitely got hung.
thanks for all your helps. I am looking for your advice.
Yen
I have not used this job in a while but if I remember correctly this job needs to start at almost the same time as the job you want to monitor. You give it the job name to monitor. It will loop until the job finishes. It was designed to run EtlChkSeqJobsNotRun and send you the log file of any job that failed. You would need to modify it to email a message when a time frame is exceeded. It is fairly straight forward. I wrote this several years ago and have not used it since so let me know if you get it to meet your needs. I would add a parameter for max time to wait before emailing.
Mamu Kim
Hi,kduke wrote:There is a job called MonitorSeq in EtlStats which you could modify to to send you an email if a job runs long. Rght now it gets row counts and emails the log of all jobs that fail in a sequence. Instead of a wrapper this would need to start at the same time or right after you start the job you want to monitor.
Where can I find this job MonitorSeq in EtlStats?
Can you please provide me the latest link.
Appreciate for the help.
Thanks.