From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nelson Kawumi Newsgroups: gmane.os.tru64.managers Subject: help Date: Wed, 31 Jul 2002 16:46:02 +0300 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <3329C67DF372FD429F610AF04ACDC538FA5B4E@ugamailudb.mtn.co.ug> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1028123068 16816 127.0.0.1 (31 Jul 2002 13:44:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2002 13:44:28 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17Ztm6-0004Mz-00 for ; Wed, 31 Jul 2002 15:44:26 +0200 Original-Received: (qmail 25440 invoked by uid 5); 31 Jul 2002 13:44:50 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 25373 invoked from network); 31 Jul 2002 13:44:50 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 31 Jul 2002 13:44:50 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H04002MM8UO1L@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 31 Jul 2002 09:44:50 -0400 (EDT) Original-Received: from dns.mtn.co.ug (demon.mtn.co.ug [212.88.97.20]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H04004FT8UG20@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 31 Jul 2002 09:44:46 -0400 (EDT) Original-Received: from ugamailudb.mtn.co.ug (mail.mtn.co.ug [212.88.97.6]) by dns.mtn.co.ug (8.9.3/8.9.3) with SMTP id QAA12085 for ; Wed, 31 Jul 2002 16:13:43 +0300 Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft Exchange V6.0.4712.0 Thread-Index: AcI4lpJSegMGQSCERIe4aVT2QBBnTgAAfw4w content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Xref: main.gmane.org gmane.os.tru64.managers:1184 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:1184 >I'm running a script that does continuous ftp of files to a given ftp >server. When started manually, it runs fine. When started using CAA, it >gives the following error, > > > >EVM alert [sauga01.mtn.co.ug]: CAAD[524900]: `streamserve` on `sauga01` = went >OFFLINE unexpectedly > >in the CAA script I run the following to stop the application > >kill `ps -e | grep streamserve.sh | grep -v "grep" | cut -d " " -f 1` > >I need help on this error > >Attached are my profile and script > >Profile > >NAME=3Dstreamserve > >TYPE=3Dapplication > >ACTION_SCRIPT=3Dstreamserve.scr > >ACTIVE_PLACEMENT=3D0 > >AUTO_START=3D1 > >CHECK_INTERVAL=3D60 > >DESCRIPTION=3Dstreamserve > >FAILOVER_DELAY=3D0 > >FAILURE_INTERVAL=3D40 > >FAILURE_THRESHOLD=3D3 > >HOSTING_MEMBERS=3Dsauga02 sauga01 > >OPTIONAL_RESOURCES=3D > >PLACEMENT=3Drestricted > >REQUIRED_RESOURCES=3D > >RESTART_ATTEMPTS=3D1 > >SCRIPT_TIMEOUT=3D60 > >Script > > > >SERVICE_NAME=3D"streamserve" > >PROBE_PROCS=3D"/usr/scripts/streamserve.sh" > >START_APPCMD=3D"/usr/scripts/streamserve.sh" > >STOP_APPCMD=3D"/usr/scripts/streamservestop.sh" > >APPDIR=3D"/usr/scripts" > >export SERVICE_NAME START_APPCMD START_APPCMD2 > >export APPDIR PROBE_PROCS STOP_APPCMD STOP_APPCMD2 > >DEBUG_PRIORITY=3D100 > >INFO_PRIORITY=3D200 > >ERROR_PRIORITY=3D500 > >SCRIPT=3D$0 > >ACTION=3D$1 # Action (start, stop or check) > >EVMPOST=3D"/usr/bin/evmpost" # EVM command to post events > >DEBUG=3D0 > >if [[ "$CAA_SCRIPT_DEBUG" !=3D "" ]]; then > >DEBUG=3D1 > >EVMPOST=3D"/usr/bin/evmpost -r | /usr/bin/evmshow -d" > >fi > >export EVMPOST ACTION SCRIPT > >etpid () { > >if [ -n "$1" ]; then > >GETMYPID=3D$1 > >shift > >/bin/ps -e -o pid,command $* | while read mypid command args > >do > >if [ "$command" =3D "$GETMYPID" ]; then > >echo "$mypid" > >fi > >done > >fi > > > >zapdaemon () { > >typeset ret=3D0 > >for i in ${1} > >do > >checkdaemon ${i} > >if [ $? -ne 0 ]; then > >kill `getpid ${i}` > >checkdaemon ${i} > >if [ $? -ne 0 ]; then > >kill -9 `getpid ${i}` > >checkdaemon ${i} > >if [ $? -ne 0 ]; then > >postevent $ERROR_PRIORITY "${i}: stuck - could not kill -KIL > >L" > >ret=3D1 > >else > >postevent $ERROR_PRIORITY "${i}: killed with -KILL" > >fi > >else > >postevent "" "${i}: killed" > >fi > >fi > >done > >return $ret > > > >probeapp () { > >checkdaemon $1 > >if [ $? -ne 0 ]; then > >postevent $DEBUG_PRIORITY "$1 check OK" > >return 0 > >else > >postevent $DEBUG_PRIORITY "$1 check failed" > >return 1 > >fi > > > >case $1 in > >'start') > >postevent $DEBUG_PRIORITY "trying to start" > >cd $APPDIR > >if [ "$START_APPCMD" !=3D "" ]; then > >$START_APPCMD & > >if [ $? -ne 0 ]; then > >postevent $ERROR_PRIORITY "start: $out" > >exit 1 > >fi > >fi > > > >'stop') > >postevent $DEBUG_PRIORITY "trying to stop" > >cd $APPDIR > >if [ "$STOP_APPCMD" !=3D "" ]; then > >$STOP_APPCMD & > >if [ $? -ne 0 ]; then > >postevent $ERROR_PRIORITY "stop: $out" > >exit 1 > >fi > >fi > >if [ $STOP_APPCMD2 !=3D "" ]; then > >$STOP_APPCMD2 & > >if [ $? -ne 0 ]; then > >postevent $ERROR_PRIORITY "stop 2: $out" > >exit 1 > >fi > >fi > >if [ "$START_APPCMD2" !=3D "" ]; then > >$START_APPCMD2 & > >if [ $? -ne 0 ]; then > >postevent $ERROR_PRIORITY "start 2: $out" > >exit 1 > >fi > >fi > >;; > >for i in ${PROBE_PROCS}; do > >zapdaemon ${i} > >done > >;; > >'check') > >for i in ${PROBE_PROCS}; do > >postevent $DEBUG_PRIORITY "trying to check $i" > >probeapp $i > >if [ $? -ne 0 ]; then > >postevent "" "check failed for $i" > >exit 1 > >fi > >done > >;; > >*) > >postevent $ERROR_PRIORITY "usage: $0 {start|stop|check}" > >exit 1 > >;; > >esac > >postevent "" success > >exit 0 > > > > > > > > > > > >

I'm running a script that does continuous ftp of = files to a given ftp
>server. When started manually, it runs fine. When started using CAA, = it
>gives the following error,
>
>
>
>EVM alert [sauga01.mtn.co.ug]: CAAD[524900]: `streamserve` on `sauga01` went
>OFFLINE unexpectedly
>
>in the CAA script I run the following to stop the application
>
>kill `ps -e | grep streamserve.sh | grep -v "grep" | cut -d = " " -f 1`
>
>I need help on this error
>
>Attached are my profile and script
>
>Profile
>
>NAME=3Dstreamserve
>
>TYPE=3Dapplication
>
>ACTION_SCRIPT=3Dstreamserve.scr
>
>ACTIVE_PLACEMENT=3D0
>
>AUTO_START=3D1
>
>CHECK_INTERVAL=3D60
>
>DESCRIPTION=3Dstreamserve
>
>FAILOVER_DELAY=3D0
>
>FAILURE_INTERVAL=3D40
>
>FAILURE_THRESHOLD=3D3
>
>HOSTING_MEMBERS=3Dsauga02 sauga01
>
>OPTIONAL_RESOURCES=3D
>
>PLACEMENT=3Drestricted
>
>REQUIRED_RESOURCES=3D
>
>RESTART_ATTEMPTS=3D1
>
>SCRIPT_TIMEOUT=3D60
>
>Script
>
>
>
>SERVICE_NAME=3D"streamserve"
>
>PROBE_PROCS=3D"/usr/scripts/streamserve.sh"
>
>START_APPCMD=3D"/usr/scripts/streamserve.sh"
>
>STOP_APPCMD=3D"/usr/scripts/streamservestop.sh"
>
>APPDIR=3D"/usr/scripts"
>
>export SERVICE_NAME START_APPCMD START_APPCMD2
>
>export APPDIR PROBE_PROCS STOP_APPCMD STOP_APPCMD2
>
>DEBUG_PRIORITY=3D100
>
>INFO_PRIORITY=3D200
>
>ERROR_PRIORITY=3D500
>
>SCRIPT=3D$0
>
>ACTION=3D$1 # Action (start, stop or check)
>
>EVMPOST=3D"/usr/bin/evmpost" # EVM command to post events
>
>DEBUG=3D0
>
>if [[ "$CAA_SCRIPT_DEBUG" !=3D "" ]]; then
>
>DEBUG=3D1
>
>EVMPOST=3D"/usr/bin/evmpost -r | /usr/bin/evmshow -d"
>
>fi
>
>export EVMPOST ACTION SCRIPT
>
>etpid () {
>
>if [ -n "$1" ]; then
>
>GETMYPID=3D$1
>
>shift
>
>/bin/ps -e -o pid,command $* | while read mypid command args
>
>do
>
>if [ "$command" =3D "$GETMYPID" ]; then
>
>echo "$mypid"
>
>fi
>
>done
>
>fi
>
>}
>
>zapdaemon () {
>
>typeset ret=3D0
>
>for i in ${1}
>
>do
>
>checkdaemon ${i}
>
>if [ $? -ne 0 ]; then
>
>kill `getpid ${i}`
>
>checkdaemon ${i}
>
>if [ $? -ne 0 ]; then
>
>kill -9 `getpid ${i}`
>
>checkdaemon ${i}
>
>if [ $? -ne 0 ]; then
>
>postevent $ERROR_PRIORITY "${i}: stuck - could not kill -KIL
>
>L"
>
>ret=3D1
>
>else
>
>postevent $ERROR_PRIORITY "${i}: killed with -KILL"
>
>fi
>
>else
>
>postevent "" "${i}: killed"
>
>fi
>
>fi
>
>done
>
>return $ret
>
>}
>
>probeapp () {
>
>checkdaemon $1
>
>if [ $? -ne 0 ]; then
>
>postevent $DEBUG_PRIORITY "$1 check OK"
>
>return 0
>
>else
>
>postevent $DEBUG_PRIORITY "$1 check failed"
>
>return 1
>
>fi
>
>}
>
>case $1 in
>
>'start')
>
>postevent $DEBUG_PRIORITY "trying to start"
>
>cd $APPDIR
>
>if [ "$START_APPCMD" !=3D "" ]; then
>
>$START_APPCMD &
>
>if [ $? -ne 0 ]; then
>
>postevent $ERROR_PRIORITY "start: $out"
>
>exit 1
>
>fi
>
>fi
>
>
>
>'stop')
>
>postevent $DEBUG_PRIORITY "trying to stop"
>
>cd $APPDIR
>
>if [ "$STOP_APPCMD" !=3D "" ]; then
>
>$STOP_APPCMD &
>
>if [ $? -ne 0 ]; then
>
>postevent $ERROR_PRIORITY "stop: $out"
>
>exit 1
>
>fi
>
>fi
>
>if [ $STOP_APPCMD2 !=3D "" ]; then
>
>$STOP_APPCMD2 &
>
>if [ $? -ne 0 ]; then
>
>postevent $ERROR_PRIORITY "stop 2: $out"
>
>exit 1
>
>fi
>
>fi
>
>if [ "$START_APPCMD2" !=3D "" ]; then
>
>$START_APPCMD2 &
>
>if [ $? -ne 0 ]; then
>
>postevent $ERROR_PRIORITY "start 2: $out"
>
>exit 1
>
>fi
>
>fi
>
>;;
>
>for i in ${PROBE_PROCS}; do
>
>zapdaemon ${i}
>
>done
>
>;;
>
>'check')
>
>for i in ${PROBE_PROCS}; do
>
>postevent $DEBUG_PRIORITY "trying to check $i"
>
>probeapp $i
>
>if [ $? -ne 0 ]; then
>
>postevent "" "check failed for $i"
>
>exit 1
>
>fi
>
>done
>
>;;
>
>*)
>
>postevent $ERROR_PRIORITY "usage: $0 {start|stop|check}"
>
>exit 1
>
>;;
>
>esac
>
>postevent "" success
>
>exit 0
>
>
>
>

> > >