ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Automatic startup of quemanager on aix

Post new topic  Reply to topic
 Automatic startup of quemanager on aix « View previous topic :: View next topic » 
Author Message
jpeela
PostPosted: Thu Feb 08, 2007 8:19 pm    Post subject: Automatic startup of quemanager on aix Reply with quote

Centurion

Joined: 23 Jan 2006
Posts: 139

Hi all,

I need to set up an automatic startup.I m not sure whether to add a startup stanza in mqs.ini file.Can some one help in this .
environment: AIX5.2, WMQ 5.3.7.

And one more thing I need, though not appropriate place to ask hope I would get help.How to run a process as a back ground on the aix machine.
There is an aplication program writer.sh that should run as abackground process.
I have enterd path/writer.sh &, but that is not running as back ground process.
Also tried nohup path/writer.sh & ,that helped neither.
can some one suggest me some thing.
_________________
Jogi
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
prince_mq
PostPosted: Fri Feb 09, 2007 1:27 am    Post subject: Reply with quote

Voyager

Joined: 10 Aug 2006
Posts: 76

nohup path/writer.sh &

AFAIK, the above should work..

what is the message you are getting when you type the above command.

can you please paste it here?
Back to top
View user's profile Send private message
JT
PostPosted: Fri Feb 09, 2007 1:57 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Check the contents of nohup.out
Back to top
View user's profile Send private message
csmith28
PostPosted: Fri Feb 09, 2007 3:53 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

Take the following script and name it something like rc.MQSeries. You'll have to change the MQManager name.

Put and executable version of it in /etc/rc.d/init.d. Then create two links in /etc/rc.d/rc3.d on named S50MQSeries and another name K60MQSeries.

This will stop (on a normal shutdown process) and restart the MQManager at run level 3.

Code:
#!/bin/ksh
#ident  "@(#)MQSeries   1.8     93/07/27 SMI"   /* SVr4.0 1.3.3.1       */

#       MQSeries control
case $1 in
'start')
        echo "MQSeries: Starting MQSeries (Queue Manager )";
       /bin/su - mqm -c "/usr/mqm/bin/strmqm TAX06" &
       /bin/sleep 20
        echo "MQSeries: Starting MQSeries (Channel Initiator)";
       /bin/su - mqm -c "/usr/mqm/bin/runmqchi -m TAX06" &
       /bin/sleep 5
        echo "MQSeries: Starting MQSeries (Channel Listener)";
       /bin/su - mqm -c "/usr/mqm/bin/runmqlsr -t TCP -m TAX06 -p 1413" &
       /bin/sleep 5
        ;;

'stop')
        echo "MQSeries: Stopping MQSeries (Queue Manager )";
       /bin/su - mqm -c "/usr/mqm/bin/endmqm -c TAX06"
       /bin/sleep 20
        echo "MQSeries: Stopping MQSeries (Channel Listener)";
       /bin/su - mqm -c "/usr/mqm/bin/endmqlsr -m TAX06";
       /bin/sleep 20
        ;;


*)
        echo "usage: /etc/rc.MQSeries {start|stop}"
        ;;
esac


Note if this is WMQ5.2 or 5.3 you will probably want to add couple lines to the script to start and stop the command server.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
jpeela
PostPosted: Tue Feb 13, 2007 5:10 am    Post subject: Reply with quote

Centurion

Joined: 23 Jan 2006
Posts: 139

HI all,
I thank one and all.
JT,

Quote:
Check the contents of nohup.out


permissions denied . and there is no file even in the $HOME.

prince_mq,


Quote:
nohup path/writer.sh &

AFAIK, the above should work..


Ya it worked here is the output

$ nohup /mqm/UMQAACPUJPINT/bin/run_file_writer.sh > writer.log &
[1] 19932

ofcource some errors because of there is no free space for the appication to log data.

csmith28,

few things I would like to know.
here are the changes to the file you have sent

#!/bin/ksh
#ident "@(#)MQSeries 1.8 93/07/27 SMI" /* SVr4.0 1.3.3.1 */

# MQSeries control
case $1 in
'start')
echo "MQSeries: Starting MQSeries (Queue Manager )";
/bin/su - mqm -c "/usr/mqm/bin/strmqm QMACP.UJP.INT.REG.MBK" &
/bin/sleep 20
echo "MQSeries: Starting MQSeries (Channel Initiator)";
/bin/su - mqm -c "/usr/mqm/bin/runmqchi -m QMACP.UJP.INT.REG.MBK" &
/bin/sleep 5
echo "MQSeries: Starting MQSeries (Channel Listener)";
/bin/su - mqm -c "/usr/mqm/bin/runmqlsr -t TCP -m QMACP.UJP.INT.REG.MBK -p 5590" &
/bin/sleep 5
/bin/su - mqm -c "/usr/mqm/bin/strmqcsv -m QMACP.UJP.INT.REG.MBK" &
/bin/sleep 20
;;

'stop')
echo "MQSeries: Stopping MQSeries (Queue Manager )";
/bin/su - mqm -c "/usr/mqm/bin/endmqm -c QMACP.UJP.INT.REG.MBK"
/bin/sleep 20
echo "MQSeries: Stopping MQSeries (Channel Listener)";
/bin/su - mqm -c "/usr/mqm/bin/endmqlsr -m QMACP.UJP.INT.REG.MBK";
/bin/sleep 20
/bin/su - mqm -c "/usr/mqm/bin/endmqcsv -m QMACP.UJP.INT.REG.MBK" &
/bin/sleep 20
;;


*)
echo "usage: /etc/rc.MQSeries {start|stop}"
;;
esac


Quote:
You'll have to change the MQManager name.

changed and even the listener

Quote:
Note if this is WMQ5.2 or 5.3 you will probably want to add couple lines to the script to start and stop the command server.

So I added those last two lines each in each case.So should this be fine?


Quote:
Put and executable version of it in /etc/rc.d/init.d. Then create two links in /etc/rc.d/rc3.d on named S50MQSeries and another name K60MQSeries

Inorder to confirm with you not done that yet,after giving execution permissions to this file, Ill place it in the said path.
So Im waiting for your confirmation.

Thanks in advance.
_________________
Jogi
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
jsware
PostPosted: Tue Feb 13, 2007 7:48 am    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

prince_mq wrote:
nohup path/writer.sh &

AFAIK, the above should work..

what is the message you are getting when you type the above command.

can you please paste it here?
Unfortunately nohup on AIX does not start stuff as a daemon that you can log off from.

If you attempt to log off, you still get "there are running jobs" messages. To do this, rename your writer.sh to writerd.sh and create a writer.sh that executes "nohup ./writerd.sh&"

The writer.sh script ends detaching your writerd.sh script from your terminal. A "ps -ef |grep writer" will show that the parent process of writerd.sh is not PID 1. Additionally, the "jobs" command will not show any jobs. You can log off and the writerd.sh script will still be running.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
jpeela
PostPosted: Thu Feb 15, 2007 7:51 pm    Post subject: Reply with quote

Centurion

Joined: 23 Jan 2006
Posts: 139

Hi all,

scottj2512,

Ya that did worked.


csmith28,

Still no confirmation from you.
I have done all what you have asked me to.
But still the queue manager didinot start automatically.
Does the soft links that are created in the /etc/rc.d/rc3.d should be invoked from else where like initialization files.
awaiting your reply.

Thanks in advance
_________________
Jogi
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Gaya3
PostPosted: Thu Feb 15, 2007 11:17 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

Hi

Create a script which accepts input parameter as queue manager.

1. Check the queue manager is existing in the node
2. Check any endmqm is being executed if it is, come out
3. start the command server
4. Start the queue manager
Enter to check this in crontab and keep it in boot up module.

You can modiy according to you

Thanks and Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
jpeela
PostPosted: Fri Feb 16, 2007 4:09 am    Post subject: Reply with quote

Centurion

Joined: 23 Jan 2006
Posts: 139

Hi Gayatri,

We have done similar thing as csmith28 has advised.But we had no use can you suggest the reasons , im just waiting for csmith28's reply.

Thanks in advance.
_________________
Jogi
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
fjb_saper
PostPosted: Sat Feb 17, 2007 7:04 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

What you want to do is create a script that will be executed by the root user.

This script calls a script that YOU (mqadmin) control with su - mqm.

Now this allows you to start automatically which ever qmgr you want, and this may be quite different from all the qmgrs on the box.
Add a qmgr -- not a problem. YOU controll the second to nth level script.

Ours startup /shutdown scripts for MQ cascade up to 4 levels...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jpeela
PostPosted: Sun Feb 18, 2007 9:54 pm    Post subject: Reply with quote

Centurion

Joined: 23 Jan 2006
Posts: 139

hi fjb_saper,

Actually this should work fine, i have done evrything as smith asked me to do and i have put the executable file in the /etc/rc.d/init.d under root user ,created the symbolic links in the /etc/rc.d/rc3.d with those names sugested by smith.but one of the links are not found now.I tried recreating once again but didnot help.any suggessions.

thanks in advance.
_________________
Jogi
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
fjb_saper
PostPosted: Mon Feb 19, 2007 5:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

jpeela wrote:
hi fjb_saper,

Actually this should work fine, i have done evrything as smith asked me to do and i have put the executable file in the /etc/rc.d/init.d under root user ,created the symbolic links in the /etc/rc.d/rc3.d with those names sugested by smith.but one of the links are not found now.I tried recreating once again but didnot help.any suggessions.

thanks in advance.

Enlist the help from the Unix Admin
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Automatic startup of quemanager on aix
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.