Rick, I can't get it to run in the background, thats what I am trying to
figure out. Once it is in the background, I'll just kill -9 it.

The point of this is I need a app that I can trigger that will run (in the
background) long enough for me to do a ps -ef|grep appname on it in another
session.

-----Original Message-----
From: Rick Tsujimoto [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 4:35 PM
To: [EMAIL PROTECTED]
Subject: Re: How to trigger amqsput into the background


Peter,

Doesn't amqsput require two null inputs to terminate the application?  If
you run in background, how are you providing the double nulls?




             "Potkay, Peter M
             (ISD, IT)"
             <[EMAIL PROTECTED]                                          To
             HARTFORD.COM>             [EMAIL PROTECTED]
             Sent by: MQSeries                                          cc
             List
             <[EMAIL PROTECTED]                                     Subject
             n.AC.AT>                  How to trigger amqsput into the
                                       background

             07/22/2004 04:08
             PM


             Please respond to
               MQSeries List
             <[EMAIL PROTECTED]
                 n.AC.AT>






Solaris 2.8
MQ 5.3 CSD4

I have runmqtrm running in the foreground.

I have the following in my ApplID field of the process definition:
/var/mqm/peterscript.sh

I have the following in /var/mqm/peterscript.sh:
/opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1

This works great, as I see the following in the Trigger Monitor Window:
__________________________________________________
Waiting for a trigger message

/var/mqm/peterscript.sh 'TMC    2PETER
Sample AMQSPUT0 start
target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
my test message to be put

Sample AMQSPUT0 end
End of application trigger.

__________________________________________________
Waiting for a trigger message


So now I want the trigger monitor to kick off amqsput in the background. I
don't care that I won't be able to put to it, I will use ps -ef|grep
amqsput
to verify it is up, and then kill -9 it.

I tried putting this inside the script:
/opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1 &

and got this in the trigger monitor window:
__________________________________________________
/var/mqm/peterscript.sh 'TMC    2PETER
Sample AMQSPUT0 start
target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
Sample AMQSPUT0 end
End of application trigger.

__________________________________________________
Waiting for a trigger message


It just ends amqsput right away. It is not running in the background. And
notice the Waiting for Trigger message line does not come up either. But if
I then try retriggering it in the foreground again, I get this:

/var/mqm/peterscript.sh 'TMC    2PETER
Sample AMQSPUT0 start
target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
Sample AMQSPUT0 end
End of application trigger.

__________________________________________________
Waiting for a trigger message

I didn't get the chance to add my message; amqsput ends right away again,
but now the Waiting for Trigger Message comes up, and now I can retrigger
correctly in the foreground as I did in the beginning.


I also tried putting the & in the Environment Data of the Process Def, I
got
this:
__________________________________________________
Waiting for a trigger message
Sample AMQSPUT0 start
target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
Sample AMQSPUT0 end

again no Waiting for Trigger message error. Altering the Process def to
remove the & and trying to trigger again gave me this:

/var/mqm/peterscript.sh 'TMC    2PETER
Sample AMQSPUT0 start
target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
test message to put

Sample AMQSPUT0 end
End of application trigger.

__________________________________________________
Waiting for a trigger message

This time it didn't need that double triggering to get amqsput to show up
properly.



Any ideas of how to get it to start up in the background properly?





Peter Potkay
MQSeries Specialist
The Hartford Financial Services
[EMAIL PROTECTED]
x77906
IBM MQSeries Certified




This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return email and delete this communication and destroy all
copies.

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to