Instead of return .. exit 100 or exit 110
-- charlie > Send Veritas-ha mailing list submissions to > veritas-ha@mailman.eng.auburn.edu > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha > or, via email, send a message with subject or body 'help' to > [EMAIL PROTECTED] > > You can reach the person managing the list at > [EMAIL PROTECTED] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Veritas-ha digest..." > > > Today's Topics: > > 1. VCS 4.1 MP1 ... Monitor Program returns UNKNOWN ... (Sanjay > Gowda) > 2. Re: VCS 4.1 MP1 ... Monitor Program returns UNKNOWN ... > (Jon E Price/SYS/NYTIMES) > 3. Re: VCS 4.1 MP1 ... Monitor Program returns UNKNOWN ... > (Sanjay Gowda) > 4. Re: VCS 4.1 MP1 ... Monitor Program returns UNKNOWN ... > (Sanjay Gowda) > 5. Re: VCS 4.1 MP1 ... Monitor Program returns UNKNOWN ... > (Anand Ganesh) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 25 Jul 2007 20:14:40 -0500 > From: "Sanjay Gowda" <[EMAIL PROTECTED]> > Subject: [Veritas-ha] VCS 4.1 MP1 ... Monitor Program returns UNKNOWN > ... > To: <veritas-ha@mailman.eng.auburn.edu> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii" > > Hi All, > > I have a simple 2-node cluster (both boxes are Sun-Fire T2000s > (architecture > sun4v) running Solaris 5.10 Generic_118833-36). > Both nodes are running VCS 4.1 with patch MP1. > > I have a monitor script that returns code 110 and 100 depending on > whether > the program is up or down. > However VCS fails to recognize the monitor scripts' output and > complains as > follows in the engine_A.log file: > > Application:oracle_sg:monitor:State returned by Monitor Program > (/opt/VRTSvcs/scripts/bin/monitor.sh PROCESSNAME):UNKNOWN. > > And this keeps repeating every 60 seconds (as it should because the > default > monitor interval is 60 secs). > > Here is the monitor.sh script: > > #!/bin/ksh > # > PROCESS_NAME="${1}" > # > /usr/bin/pgrep -U USERID -G GROUPID -f ${PROCESS_NAME} > /dev/null > # > if [ $? = 0 ]; then > return 110 > else > return 100 > fi > exit > > I have quite a bit of VCS experience or I thought I did :) But I > cannot > for the life of me figure out what I am doing wrong. > > Anybody see anything wrong with the above monitor script? The > reason I am > mentioning the hardware in this email is > because the nodes are T2000s, I had to replace the "had" binary on > both > nodes because VCS was complaining about > license. After the "had" daemons were replaced, VCS is now up and > running. > > Anyway, looking forward to any suggestions or fixes. Thanks, > everybody. > > - SG > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://mailman.eng.auburn.edu/pipermail/veritas-ha/attachments/ > 20070725/2d4b0e1d/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Wed, 25 Jul 2007 22:18:02 -0400 > From: Jon E Price/SYS/NYTIMES <[EMAIL PROTECTED]> > Subject: Re: [Veritas-ha] VCS 4.1 MP1 ... Monitor Program returns > UNKNOWN ... > To: "Sanjay Gowda" <[EMAIL PROTECTED]> > Cc: veritas-ha@mailman.eng.auburn.edu > Message-ID: > <OFB3B25C78.B5755256- > [EMAIL PROTECTED]> > > Content-Type: text/plain; charset=US-ASCII > > > Hi Sanjay, > > Well, I don't know either sorry. > > But can you run the script manually and get the correct output? > Maybe changing the return's to echo's would help troubleshoot? > > Jon > > > > > > > "Sanjay Gowda" > <[EMAIL PROTECTED] >> To > Sent by: <veritas- > [EMAIL PROTECTED]> > veritas-ha- > bounce cc > [EMAIL PROTECTED] > urn.edu > Subject > [Veritas-ha] VCS 4.1 MP1 ... > Monitor Program returns > UNKNOWN ... > 07/25/2007 09:23 > PM > > > > > > > > > > > Hi All, > > I have a simple 2-node cluster (both boxes are Sun-Fire T2000s > (architecture sun4v) running Solaris 5.10 Generic_118833-36). > Both nodes are running VCS 4.1 with patch MP1. > > I have a monitor script that returns code 110 and 100 depending on > whether > the program is up or down. > However VCS fails to recognize the monitor scripts' output and > complains as > follows in the engine_A.log file: > > Application:oracle_sg:monitor:State returned by Monitor Program > (/opt/VRTSvcs/scripts/bin/monitor.sh PROCESSNAME):UNKNOWN. > > And this keeps repeating every 60 seconds (as it should because the > default > monitor interval is 60 secs). > > Here is the monitor.sh script: > > #!/bin/ksh > # > PROCESS_NAME="${1}" > # > /usr/bin/pgrep -U USERID -G GROUPID -f ${PROCESS_NAME} > /dev/null > # > if [ $? = 0 ]; then > return 110 > else > return 100 > fi > exit > > I have quite a bit of VCS experience or I thought I did :) But I > cannot > for the life of me figure out what I am doing wrong. > > Anybody see anything wrong with the above monitor script? The > reason I am > mentioning the hardware in this email is > because the nodes are T2000s, I had to replace the "had" binary on > both > nodes because VCS was complaining about > license. After the "had" daemons were replaced, VCS is now up and > running. > > Anyway, looking forward to any suggestions or fixes. Thanks, > everybody. > > - SG_______________________________________________ > Veritas-ha maillist - Veritas-ha@mailman.eng.auburn.edu > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha > > > > > ------------------------------ > > Message: 3 > Date: Wed, 25 Jul 2007 23:32:31 -0500 > From: "Sanjay Gowda" <[EMAIL PROTECTED]> > Subject: Re: [Veritas-ha] VCS 4.1 MP1 ... Monitor Program returns > UNKNOWN ... > To: "'Jon E Price/SYS/NYTIMES'" <[EMAIL PROTECTED]> > Cc: veritas-ha@mailman.eng.auburn.edu > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii" > > Running the script manually indeed returns the correct value. > > After running the script, I execute echo $? And it will return > either 100 or 110 as it should. That is what is so puzzling. > Why is this script not running? > > I have also tested this script, running it as "ksh -x ./monitor.sh > PROCESS_NAME" > and it executes with all the correct variables populated which > is confirmed by the -x option. > > - SG > > -----Original Message----- > From: Jon E Price/SYS/NYTIMES [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 25, 2007 9:18 PM > To: Sanjay Gowda > Cc: veritas-ha@mailman.eng.auburn.edu > Subject: Re: [Veritas-ha] VCS 4.1 MP1 ... Monitor Program returns > UNKNOWN > ... > > > Hi Sanjay, > > Well, I don't know either sorry. > > But can you run the script manually and get the correct output? > Maybe changing the return's to echo's would help troubleshoot? > > Jon > > > > > > > "Sanjay Gowda" > <[EMAIL PROTECTED] >> To > Sent by: <veritas- > [EMAIL PROTECTED]> > veritas-ha- > bounce cc > [EMAIL PROTECTED] > urn.edu > Subject > [Veritas-ha] VCS 4.1 MP1 ... > Monitor Program returns > UNKNOWN ... > 07/25/2007 09:23 > PM > > > > > > > > > > > Hi All, > > I have a simple 2-node cluster (both boxes are Sun-Fire T2000s > (architecture > sun4v) running Solaris 5.10 Generic_118833-36). > Both nodes are running VCS 4.1 with patch MP1. > > I have a monitor script that returns code 110 and 100 depending on > whether > the program is up or down. > However VCS fails to recognize the monitor scripts' output and > complains as > follows in the engine_A.log file: > > Application:oracle_sg:monitor:State returned by Monitor Program > (/opt/VRTSvcs/scripts/bin/monitor.sh PROCESSNAME):UNKNOWN. > > And this keeps repeating every 60 seconds (as it should because the > default > monitor interval is 60 secs). > > Here is the monitor.sh script: > > #!/bin/ksh > # > PROCESS_NAME="${1}" > # > /usr/bin/pgrep -U USERID -G GROUPID -f ${PROCESS_NAME} > /dev/null > # if [ $? > = 0 ]; then > return 110 > else > return 100 > fi > exit > > I have quite a bit of VCS experience or I thought I did :) But I > cannot > for the life of me figure out what I am doing wrong. > > Anybody see anything wrong with the above monitor script? The > reason I am > mentioning the hardware in this email is because the nodes are > T2000s, I had > to replace the "had" binary on both nodes because VCS was > complaining about > license. After the "had" daemons were replaced, VCS is now up and > running. > > Anyway, looking forward to any suggestions or fixes. Thanks, > everybody. > > - SG_______________________________________________ > Veritas-ha maillist - Veritas-ha@mailman.eng.auburn.edu > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha > > > > > ------------------------------ > > Message: 4 > Date: Wed, 25 Jul 2007 23:48:06 -0500 > From: "Sanjay Gowda" <[EMAIL PROTECTED]> > Subject: Re: [Veritas-ha] VCS 4.1 MP1 ... Monitor Program returns > UNKNOWN ... > To: <veritas-ha@mailman.eng.auburn.edu> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii" > > I forgot to mention this. I am running all of below in a global zone. > There are no zones > configured on these two boxes. > > Please accept my apologies for not mentioning this earlier. > > _____ > > From: Sanjay Gowda [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 25, 2007 8:15 PM > To: 'veritas-ha@mailman.eng.auburn.edu' > Subject: VCS 4.1 MP1 ... Monitor Program returns UNKNOWN ... > > > Hi All, > > I have a simple 2-node cluster (both boxes are Sun-Fire T2000s > (architecture > sun4v) running Solaris 5.10 Generic_118833-36). > Both nodes are running VCS 4.1 with patch MP1. > > I have a monitor script that returns code 110 and 100 depending on > whether > the program is up or down. > However VCS fails to recognize the monitor scripts' output and > complains as > follows in the engine_A.log file: > > Application:oracle_sg:monitor:State returned by Monitor Program > (/opt/VRTSvcs/scripts/bin/monitor.sh PROCESSNAME):UNKNOWN. > > And this keeps repeating every 60 seconds (as it should because the > default > monitor interval is 60 secs). > > Here is the monitor.sh script: > > #!/bin/ksh > # > PROCESS_NAME="${1}" > # > /usr/bin/pgrep -U USERID -G GROUPID -f ${PROCESS_NAME} > /dev/null > # > if [ $? = 0 ]; then > return 110 > else > return 100 > fi > exit > > I have quite a bit of VCS experience or I thought I did :) But I > cannot > for the life of me figure out what I am doing wrong. > > Anybody see anything wrong with the above monitor script? The > reason I am > mentioning the hardware in this email is > because the nodes are T2000s, I had to replace the "had" binary on > both > nodes because VCS was complaining about > license. After the "had" daemons were replaced, VCS is now up and > running. > > Anyway, looking forward to any suggestions or fixes. Thanks, > everybody. > > - SG > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://mailman.eng.auburn.edu/pipermail/veritas-ha/attachments/ > 20070725/741fc278/attachment-0001.htm > > ------------------------------ > > Message: 5 > Date: Wed, 25 Jul 2007 22:03:56 -0700 > From: "Anand Ganesh" <[EMAIL PROTECTED]> > Subject: Re: [Veritas-ha] VCS 4.1 MP1 ... Monitor Program returns > UNKNOWN ... > To: "Sanjay Gowda" <[EMAIL PROTECTED]>, "Jon E Price/SYS/NYTIMES" > <[EMAIL PROTECTED]> > Cc: veritas-ha@mailman.eng.auburn.edu > Message-ID: > > <[EMAIL PROTECTED] > itas.com> > > Content-Type: text/plain; charset="us-ascii" > > Hi Sanjay, > > Then a good way to find out is by turning on debugging for the > agent. If > you run the following commands: > > # haconf -makerw > # hatype -modify Application LogDbg -add DBG_4 > # haconf -dump -makero > > The agent should spit out some extra debugging messages which might > give > you a clue to the problem. > > To remove the debug tag later, you can do: > # hatype -modify Application LogDbg -delete -keys > > HTH, > Anand > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Sanjay > Gowda > Sent: Wednesday, July 25, 2007 9:33 PM > To: 'Jon E Price/SYS/NYTIMES' > Cc: veritas-ha@mailman.eng.auburn.edu > Subject: Re: [Veritas-ha] VCS 4.1 MP1 ... Monitor Program returns > UNKNOWN ... > > Running the script manually indeed returns the correct value. > > After running the script, I execute echo $? And it will return > either 100 or 110 as it should. That is what is so puzzling. > Why is this script not running? > > I have also tested this script, running it as "ksh -x ./monitor.sh > PROCESS_NAME" > and it executes with all the correct variables populated which is > confirmed by the -x option. > > - SG > > -----Original Message----- > From: Jon E Price/SYS/NYTIMES [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 25, 2007 9:18 PM > To: Sanjay Gowda > Cc: veritas-ha@mailman.eng.auburn.edu > Subject: Re: [Veritas-ha] VCS 4.1 MP1 ... Monitor Program returns > UNKNOWN ... > > > Hi Sanjay, > > Well, I don't know either sorry. > > But can you run the script manually and get the correct output? > Maybe changing the return's to echo's would help troubleshoot? > > Jon > > > > > > > > "Sanjay Gowda" > > <[EMAIL PROTECTED] > >> > To > Sent by: > <veritas-ha@mailman.eng.auburn.edu> > veritas-ha-bounce > cc > [EMAIL PROTECTED] > > urn.edu > Subject > [Veritas-ha] VCS 4.1 MP1 ... > > Monitor Program returns UNKNOWN > ... > 07/25/2007 09:23 > > PM > > > > > > > > > > > > > > > > Hi All, > > I have a simple 2-node cluster (both boxes are Sun-Fire T2000s > (architecture > sun4v) running Solaris 5.10 Generic_118833-36). > Both nodes are running VCS 4.1 with patch MP1. > > I have a monitor script that returns code 110 and 100 depending on > whether > the program is up or down. > However VCS fails to recognize the monitor scripts' output and > complains > as > follows in the engine_A.log file: > > Application:oracle_sg:monitor:State returned by Monitor Program > (/opt/VRTSvcs/scripts/bin/monitor.sh PROCESSNAME):UNKNOWN. > > And this keeps repeating every 60 seconds (as it should because the > default > monitor interval is 60 secs). > > Here is the monitor.sh script: > > #!/bin/ksh > # > PROCESS_NAME="${1}" > # > /usr/bin/pgrep -U USERID -G GROUPID -f ${PROCESS_NAME} > /dev/null > # if > [ $? > = 0 ]; then > return 110 > else > return 100 > fi > exit > > I have quite a bit of VCS experience or I thought I did :) But I > cannot > for the life of me figure out what I am doing wrong. > > Anybody see anything wrong with the above monitor script? The > reason I > am > mentioning the hardware in this email is because the nodes are > T2000s, I > had > to replace the "had" binary on both nodes because VCS was complaining > about > license. After the "had" daemons were replaced, VCS is now up and > running. > > Anyway, looking forward to any suggestions or fixes. Thanks, > everybody. > > - SG_______________________________________________ > Veritas-ha maillist - Veritas-ha@mailman.eng.auburn.edu > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha > > > _______________________________________________ > Veritas-ha maillist - Veritas-ha@mailman.eng.auburn.edu > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha > > > > ------------------------------ > > _______________________________________________ > Veritas-ha maillist - Veritas-ha@mailman.eng.auburn.edu > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha > > > End of Veritas-ha Digest, Vol 15, Issue 12 > ****************************************** _______________________________________________ Veritas-ha maillist - Veritas-ha@mailman.eng.auburn.edu http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha