[ale] crontab: script is hanging
Zyman, Andy
zymana at hra.nyc.gov
Wed Jul 24 10:45:28 EDT 2002
Jonathan,
Don't know. i have whole bunch of other scripts, like cold backup, analyze
etc. non of them specify exit explicitly.....
still in the dark...
AZ
> -----Original Message-----
> From: Jonathan Glass [mailto:jonathan.glass at ibb.gatech.edu]
> Sent: Wednesday, July 24, 2002 10:36 AM
> To: Zyman, Andy
> Subject: Re: [ale] crontab: script is hanging
>
>
> At 09:59 AM 7/24/2002 -0400, you wrote:
> >Morning gentlemen,
> >the following script is hanging then I'm running it from cron.
> >The weird part - it executes all statements without any
> problems. I can see
> >"DONE" in the log file. but somehow it is not exiting - i
> can see that i
> >still have this process....
> >I tested it from "unix prompt" it is working without any problems.
> >crontab -l:
> >59 20 * * 1-5 /oracle/work/bin/bounce.sh stop rivr | tee
> >/oracle/work/bin/log/bounce_stop_rivr.log
> >00 01 * * 2-6 /oracle/work/bin/bounce.sh start rivr | tee
> >/oracle/work/bin/log/bounce_start_rivr.log
> >
> >ls -l /oracle/work/bin/log/bounce_*
> >
> >-rw-r--r-- 1 oraowner dba 2076 Jul 24 01:00
> >/oracle/work/bin/log/bounce_start_rivr.log
> >-rw-r--r-- 1 oraowner dba 705 Jul 23 21:00
> >/oracle/work/bin/log/bounce_stop_rivr.log
> >
> >more /oracle/work/bin/log/bounce_start_rivr.log //last 10 lines:
> >$ tail -10 /oracle/work/bin/log/bounce_start_rivr.log
> >Total System Global Area 679362064 bytes
> >Fixed Size 48656 bytes
> >Variable Size 183681024 bytes
> >Database Buffers 491520000 bytes
> >Redo Buffers 4112384 bytes
> >Database mounted.
> >Database opened.
> >SVRMGR> SVRMGR>
> >Server Manager complete.
> > DONE
> >$
> >
> >here is last part of the script:
> >
> >----------------begin -----------------------
> >svrmgrl << EOF
> >connect internal
> >$DO
> >
> >EOF
> >
> >if [ "$STATUS" -eq "`ps -ef | grep pmon | grep -c
> $ORACLE_SID `" ]; then
> > echo " \n There are problems during
> executing svrmgrl"
> > echo " Sending email notification to DBA"
> > mailx -s "[ ${0##*/} ] Check status
> of $ORACLE_SID on
> >`hostname`" $DBA << EOF
> > Please check log file for script $0 on `hostname`
> >EOF
> > echo " Terminating"
> > exit 1
> >
> >fi
> >
> >echo " DONE "
> >
> >
> >#DONE
> >---------------- end ------------------------
> >
> >interesting part that it's not hanging when i'm passing "stop" (then
> >$DO=shutdown ). Another thing - maybe it removes (?) the
> hanging "bounce.sh
> >stop" process and because this is happening in the night i
> can't see that
> >"stop" was hanging also?
> >Please advise.
> >
> >Thank You
> > Andy
> >
> >---
> >This message has been sent through the ALE general discussion list.
> >See http://www.ale.org/mailing-lists.shtml for more info.
> Problems should be
> >sent to listmaster at ale dot org.
>
> Isn't cron waiting for control to return from this script?
> Should you run
> your application in the background (&), since it appears that
> the script
> does your error-handling. I personally create scriptlets
> (/root/backup-databases.sh), call them and send them to the
> background (x x
> x x x /root/backup-databases.sh & 2> /tmp/backup.log).
>
> Just thinking out loud...
>
>
> Jonathan Glass
> Systems Support Specialist II
> Institute for Bioengineering and Bioscience/BME
> Georgia Institute of Technology
> Voice: 404-385-0127
> E-mail: jonathan.glass at ibb.gatech.edu
>
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list