Author |
Message
|
Sam Uppu |
Posted: Thu Apr 23, 2009 10:35 am Post subject: Triggering |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
I am on MQ version 6, OS: Solaris
I am trying to implement triggering for an application queue. Here are teh steps what I followed:
1. define application queue with attributes TRIGGER, PROCESS(PROCESS_TEST), INITQ(INITQ), TRIGTYPE(EVERY)
2. Define process(PROCESS_TEST) APPLICID(scriptname)
3. Define init queue, INITQ
3. Run the trigger monitor:
runmqtrm -m QM1 -q INITQ > /tmp/out
4. The triggering is working as long as my putty session is open. When I close my putty, the triggering is turned off.
Not sure how to set the trigger monitor running all the time. Am I missing anything anywhere?.
Thanks Guys. |
|
Back to top |
|
 |
jeevan |
Posted: Thu Apr 23, 2009 10:43 am Post subject: Re: Triggering |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
Sam Uppu wrote: |
I am on MQ version 6, OS: Solaris
I am trying to implement triggering for an application queue. Here are teh steps what I followed:
1. define application queue with attributes TRIGGER, PROCESS(PROCESS_TEST), INITQ(INITQ), TRIGTYPE(EVERY)
2. Define process(PROCESS_TEST) APPLICID(scriptname)
3. Define init queue, INITQ
3. Run the trigger monitor:
runmqtrm -m QM1 -q INITQ > /tmp/out
4. The triggering is working as long as my putty session is open. When I close my putty, the triggering is turned off.
Not sure how to set the trigger monitor running all the time. Am I missing anything anywhere?.
Thanks Guys. |
I think you need to add nohup at the beg of the command and & at the end
The nohup utility invokes the named command with the arguments supplied. When the command is invoked, nohup arranges for the SIGHUP signal to be ignored by the process. |
|
Back to top |
|
 |
Sam Uppu |
Posted: Thu Apr 23, 2009 10:54 am Post subject: Re: Triggering |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
jeevan wrote: |
I think you need to add nohup at the beg of the command and & at the end
|
you mean like this:
nohup runmqtrm -m QM1 -q INITQ > /tmp/out &
Thanks.
Last edited by Sam Uppu on Thu Apr 23, 2009 12:03 pm; edited 1 time in total |
|
Back to top |
|
 |
JosephGramig |
Posted: Thu Apr 23, 2009 11:37 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Or make it a service in the QMGR... |
|
Back to top |
|
 |
sumit |
Posted: Thu Apr 23, 2009 11:56 pm Post subject: Re: Triggering |
|
|
Partisan
Joined: 19 Jan 2006 Posts: 398
|
Sam Uppu wrote: |
you mean like this:
nohup runmqtrm -m QM1 -q INITQ > /tmp/out &
|
Yes, and & at the end will run the process in backgroud which is independent of user login. _________________ Regards
Sumit |
|
Back to top |
|
 |
Sam Uppu |
Posted: Fri Apr 24, 2009 5:56 am Post subject: Re: Triggering |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
sumit wrote: |
Sam Uppu wrote: |
you mean like this:
nohup runmqtrm -m QM1 -q INITQ > /tmp/out &
|
Yes, and & at the end will run the process in backgroud which is independent of user login. |
This is not working for me. |
|
Back to top |
|
 |
Sam Uppu |
Posted: Fri Apr 24, 2009 5:57 am Post subject: |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
JosephGramig wrote: |
Or make it a service in the QMGR... |
This is working for me....thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 24, 2009 5:59 am Post subject: Re: Triggering |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Sam Uppu wrote: |
This is not working for me. |
In what way?
Your fastest method of resolution will be to ping the Solaris admin/support function at your site. The nohup/& combination is a standard OS way of launching a background task, the fact you're launching a WMQ app is irrelevant. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 24, 2009 6:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Sam Uppu wrote: |
JosephGramig wrote: |
Or make it a service in the QMGR... |
This is working for me....thanks. |
Or running it from the queue manager; that would be quite fast as well...  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Sam Uppu |
Posted: Fri Apr 24, 2009 8:22 am Post subject: Re: Triggering |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
Vitor wrote: |
Sam Uppu wrote: |
This is not working for me. |
In what way?
Your fastest method of resolution will be to ping the Solaris admin/support function at your site. The nohup/& combination is a standard OS way of launching a background task, the fact you're launching a WMQ app is irrelevant. |
I am not saying nohup is not working. Its throwing script errors when I use nohup and the same script is working when I define a service for the script.
I have seen in the MQ sys admin guide saying define a service to run a process in background and it will comeup along with the QMgr startup.
DEFINE SERVICE(S1) +
CONTROL(QMGR) +
SERVTYPE(SERVER) +
STARTCMD(’+MQ_INSTALL_PATH+/bin/runqmtrm’) +
STARTARG(’-m +QMNAME+ -q ACCOUNTS.INITIATION.QUEUE’) + STOPCMD(’+MQ_INSTALL_PATH+/bin/amqsstop’)
Not sure whether runmqtrm will go down/up along with the QMgr down/up. Or else everytime when the QMgr goes down/up need a manual nohup runmqtrm.
Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 24, 2009 8:31 am Post subject: Re: Triggering |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Sam Uppu wrote: |
Not sure whether runmqtrm will go down/up along with the QMgr down/up. |
That's the point of the service.
Sam Uppu wrote: |
Or else everytime when the QMgr goes down/up need a manual nohup runmqtrm.
|
No. Look up nohup in any Unix reference. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|