Author |
Message
|
LearnMQSI |
Posted: Tue Aug 29, 2006 11:40 am Post subject: Update qm.ini file thru script |
|
|
 Centurion
Joined: 20 Aug 2002 Posts: 137
|
Hi Guys,
I have around 12 queue managers on my Solaris box and I have to update all 12 qm.ini files belongs to these 12 queue managers thru a shell script.
Can somebody shed some light where to start.
Thanx _________________ IBM Certified System Administrator - WebSphere MQ 5.3 |
|
Back to top |
|
 |
wschutz |
Posted: Tue Aug 29, 2006 11:48 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
What do you need to update in the qm.ini file? _________________ -wayne |
|
Back to top |
|
 |
LearnMQSI |
Posted: Tue Aug 29, 2006 12:02 pm Post subject: |
|
|
 Centurion
Joined: 20 Aug 2002 Posts: 137
|
Hi Wayne,
Thank you so much for your quick response. I need to update the CHANNEL stanza.
I also need to see if there is any default in qm.ini, if so than the CHANNEL stanza values need to setup different values.
Thank you again for your help!!! _________________ IBM Certified System Administrator - WebSphere MQ 5.3 |
|
Back to top |
|
 |
wschutz |
Posted: Tue Aug 29, 2006 12:08 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Sounds like an AWK script to me ..... _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 29, 2006 1:54 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Hrm.
Why bother with AWK?
On second reading... hrm. That doesn't seem to update the file... WELL, should just be a SMOP to adjust, right?
Still... why bother with a bird when a camel will do a better job. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Tue Aug 29, 2006 3:03 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
jefflowrey wrote: |
Hrm.
Why bother with AWK?
On second reading... hrm. That doesn't seem to update the file... WELL, should just be a SMOP to adjust, right?
Still... why bother with a bird when a camel will do a better job. |
Bird!!!!???? You mean a "slender loris"
http://www.oreilly.com/catalog/sed2/colophon.html _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 29, 2006 5:29 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'm sure Weinberger would be disappointed, but I meant auk. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Tue Aug 29, 2006 5:58 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Yes, Caspar would HAVE approved of linux, as you have indicated. _________________ -wayne |
|
Back to top |
|
 |
LearnMQSI |
Posted: Wed Aug 30, 2006 8:28 am Post subject: |
|
|
 Centurion
Joined: 20 Aug 2002 Posts: 137
|
Hi Guys,
Thank you so much for all your ideas and links. My following AWK script is able to display the Channel stanza but I'm not gettin how to update the channel stanza with the new values.
LogPath="/var/mqm/qmgrs/TESTQM/qm.ini"
if [ ! -r $LogPath ]
then
echo either Queue Manager or qm.ini File Does Not Exists
else
awk '$1 ~ /^MaxChannels/,/^MaxInitiators/ {print $0}' $LogPath
fi
Would you please help me out here.
Thanx in advance. _________________ IBM Certified System Administrator - WebSphere MQ 5.3 |
|
Back to top |
|
 |
bbburson |
Posted: Wed Aug 30, 2006 10:11 am Post subject: |
|
|
Partisan
Joined: 06 Jan 2004 Posts: 378 Location: Nowhere near a queue manager
|
I'd use awk to confirm the required line(s) are in the file, followed by sed to make changes to those lines or add new lines before or after them. |
|
Back to top |
|
 |
tleichen |
Posted: Wed Aug 30, 2006 10:35 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
I'm still trying to figure out what Caspar Weinberger has to do with Linux!?!?!  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
wschutz |
Posted: Wed Aug 30, 2006 11:01 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
tleichen wrote: |
I'm still trying to figure out what Caspar Weinberger has to do with Linux!?!?!  |
From Jeff's link:
Quote: |
Auks are birds of the family Alcidae in the order Charadriiformes. They are superficially similar to penguins due to their black-and-white colours |
_________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 30, 2006 11:01 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
tleichen wrote: |
I'm still trying to figure out what Caspar Weinberger has to do with Linux!?!?!  |
AWK is written by Aho, Weinberger and Kernigan. http://en.wikipedia.org/wiki/Awk
That's Peter Weinberger.
But Wayne thought he'd be funny. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|