Author |
Message
|
knowhow |
Posted: Wed May 31, 2006 10:32 am Post subject: ipcs command |
|
|
Novice
Joined: 16 May 2006 Posts: 21
|
Hi,
I am trying to upgrade MQ5.2 in HP-UX V11. Can anyone please give me a complete ipcs command to remove the shared memory semaphores?
Thanks. |
|
Back to top |
|
 |
wschutz |
Posted: Wed May 31, 2006 10:39 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
vennela |
Posted: Wed May 31, 2006 11:10 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
|
Back to top |
|
 |
knowhow |
Posted: Wed May 31, 2006 11:28 am Post subject: |
|
|
Novice
Joined: 16 May 2006 Posts: 21
|
Thanks for the replies.
But one article says amqiclen is only really of use after a qmgr has ended abnormally or been killed...I am not going to shutdown the QMGR abnormally...So should I use amqiclen or not??
And in other article from Vennela, it says I should not use ipcs command if I have multiple QMGR's which I have 3 QMGR's in my environment.
I am not sure which command I should be using in this scenario. Any thoughts??
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 31, 2006 11:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You have to shutdown the queue managers normally to perform the upgrade, as far as I know.
Once the queue managers are shut down, then you should use ipcs to see if there are shared memory segments that need to be cleaned up.
Then you should use amqiclen to remove any of those shared memory segments.
Then you should perform the upgrade and start the queue managers again.
Also, the upgrade you are doing should be from version 5.2 to version 6! _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
knowhow |
Posted: Wed May 31, 2006 11:45 am Post subject: |
|
|
Novice
Joined: 16 May 2006 Posts: 21
|
I would really appreciate if you can provide ipcs command with syntax to clean up the shm segments.
And I guess "amqiclen -x -m QMGR" should remove shm segments right? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 31, 2006 11:49 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
'man ipcs'.
Use amqiclen instead of ipcs to remove the segments.
Heck, use amqiclen to list the segments. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
knowhow |
Posted: Wed May 31, 2006 12:06 pm Post subject: |
|
|
Novice
Joined: 16 May 2006 Posts: 21
|
Alright, Let me try and see how it goes. Thanks much for your replies guys... |
|
Back to top |
|
 |
wschutz |
Posted: Wed May 31, 2006 2:13 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
knowhow wrote: |
I would really appreciate if you can provide ipcs command with syntax to clean up the shm segments.
|
you should use amqiclen, but I would think that its "ipcrm" and not ipcs (unless hp is much diff than aix, solaris, and linux _________________ -wayne |
|
Back to top |
|
 |
vennela |
Posted: Wed May 31, 2006 3:20 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
It is ipcrm in HP too.
Code: |
ipcs | grep mqm | while read type id
do
ipcrm -$type $id
done
|
You can use amqiclen, but If all the QMGRs are shut down and then use ipcrm, like shown above |
|
Back to top |
|
 |
knowhow |
Posted: Thu Jun 01, 2006 5:46 am Post subject: |
|
|
Novice
Joined: 16 May 2006 Posts: 21
|
Got it...I used ipcrm instead of amqiclen and it worked. I tried amqiclen also after shutting down all the QM's but somehow it didn't work. I had to kill the shared memory segments and semaphores as well. I was able to upgrade the MQ using swinstall command after that.
Thanks. |
|
Back to top |
|
 |
SAFraser |
Posted: Thu Jun 01, 2006 8:04 am Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
Knowhow, I have not been able to successfully clean all IPCs on Solaris using amqiclen either. I always end up using ipcrm. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 01, 2006 6:42 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You need to use amqiclen multiple times using a different flag.
Usually what is left is just one or 2 entries. You can kill those with ipcrm.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Nigelg |
Posted: Thu Jun 01, 2006 10:28 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Vennela's script does not always work.
The output from ipcs is in fixed width columns, so if the ID fills its column there is no space between the type and the ID, and the ipcrm fails.
For completeness you probably need to filter the output with your tool of choice (awk) to extract the type and ID from the output line by position, not by field number. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
vennela |
Posted: Fri Jun 02, 2006 6:29 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Nigelg wrote: |
Vennela's script does not always work. |
That is not my script. It is mrlinux's script and I posted the thread above. Looks like he didn't look at it so I reposted it again.
I am pretty sure I wouldn't have written a better one any way. |
|
Back to top |
|
 |
|