Author |
Message
|
pranav_kavi |
Posted: Mon Jan 09, 2006 3:59 am Post subject: Stop & reset trigger of a q managr |
|
|
Novice
Joined: 15 Nov 2005 Posts: 16 Location: Bangalore
|
Hi all,
I am in the process of developing a chat server on Linux platform in a small scale.MQ Objects are used for communication purpose.Currently,I have encountered a situation of resetting(stop & restart) a trigger of a particular active queue managr.Planning to perform the operation through a shell script but havent got an idea as to what commands to use.
I request help to tackle this problem.
thanx,
rgards,
kavitha _________________ kavitha r |
|
Back to top |
|
 |
wschutz |
Posted: Mon Jan 09, 2006 4:08 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Do you need to reset the trigger on a queue?
(echo "alter ql(x) notrigger" | runmqsc ; echo "alter ql(x) trigger" | runmqsc )
or restart the trigger monitor? _________________ -wayne |
|
Back to top |
|
 |
pranav_kavi |
Posted: Mon Jan 09, 2006 4:14 am Post subject: Stop & reset trigger of a q managr |
|
|
Novice
Joined: 15 Nov 2005 Posts: 16 Location: Bangalore
|
hi all,
thanx for the previous reply, but my problem is in stop and restarting a particular trigger monitor through a shell script
any help would be appriciated
thanx,
rgards,
kavitha _________________ kavitha r |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 09, 2006 4:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can start a trigger monitor by using the appropriate command that you have looked up in the documentation.
You can stop a trigger monitor by get disabling the Init Queue using PCF (I think). And then re-enable it for getting using PCF when you're ready to start the trigger monitor again.
The format of the PCF commands to do this is fully documented. In the manuals. That are in the online Info center. That are on IBM's website.
Good luck! _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pranav_kavi |
Posted: Mon Jan 09, 2006 11:08 pm Post subject: Stop & reset trigger of a q managr |
|
|
Novice
Joined: 15 Nov 2005 Posts: 16 Location: Bangalore
|
Thanx alot for the reply.the trigger was restarted by disabling GET property of the init queue,but currently we have come across a new problem.
The following is the process called when thers a trigger: (C executable)
int main()
{
system("/home/sindhu/BuddyList/c1get c1_q c1");
system("/bin/sh /home/sindhu/BuddyList/restart.sh");
return(0);
}//end main
In restart.sh,the trigger monitor is restarted in the 1st step and then a Qt executable(List) is calld.The code is:
runmqsc c1 << EOF
alter qlocal(SYSTEM.DEFAULT.INITIATION.QUEUE) get(disabled)
EOF
/bin/doexec /home/sindhu/BuddyList/List
The trigger termination message is displayed at terminal only after i close the Qt executable(List).But the requirement is to terminate the trigger monitor completely and then load the Qt executable.
Pls help.
rgards,
kavitha _________________ kavitha r |
|
Back to top |
|
 |
mqtypo |
Posted: Tue Jan 10, 2006 12:41 am Post subject: |
|
|
Newbie
Joined: 07 Nov 2005 Posts: 5
|
The trigger monitor is servicing the last trigger msg, has called your program to execute restart.sh, and is now waiting for your process to end before going back to reading the init queue. Only then will it terminate, when it finds that the initq is get-disabled.
You could call your app asynchronously, i.e. by putting an & in the ENVDATA of the process, so the trigger monitor does not wait for the called process to end before going back to read the initq. That wulkd cause the trigger monitor to end as soon as your mqsc command is issued. |
|
Back to top |
|
 |
pranav_kavi |
Posted: Tue Jan 10, 2006 1:29 am Post subject: Stop & reset trigger of a q managr |
|
|
Novice
Joined: 15 Nov 2005 Posts: 16 Location: Bangalore
|
Thanx alot...the problem is solved.
rgards,
kavitha  _________________ kavitha r |
|
Back to top |
|
 |
|