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 » Messaging and Integration Technologies FAQ » Removing shared memory resources on Unix

Post new topic  Reply to topic
 Removing shared memory resources on Unix « View previous topic :: View next topic » 
Author Message
royr
PostPosted: Sun Aug 19, 2001 2:02 am    Post subject: Reply with quote

Acolyte

Joined: 30 Jun 2001
Posts: 65
Location: Israel

This is required after the queue manager has ended abnormally and before it's restarted.

This command removes all shared memory resources and semaphores that belong to user mqm:

Code:

ipcs -a | grep mqm | awk '{printf( "-%s %s ", $1, $2 )}' | xargs ipcrm



[ This Message was edited by: royr on 2001-08-27 01:35 ]
Back to top
View user's profile Send private message
john_bazeley
PostPosted: Sun Aug 26, 2001 7:33 pm    Post subject: Reply with quote

Newbie

Joined: 25 Aug 2001
Posts: 6
Location: New Zealand

If you do this when you've got more than 1 QM, or things like client trigger monitors running on the same box, you'll be in big trouble.
Back to top
View user's profile Send private message
kriersd
PostPosted: Thu Nov 07, 2002 11:56 am    Post subject: Reply with quote

Master

Joined: 22 Jul 2002
Posts: 209
Location: IA, USA

Code:

If you do this when you've got more than 1 QM, or things like client trigger monitors running on the same box, you'll be in big trouble


So, Is there a way to identify which mqm shared memory resources and semaphores belong to a given queue manager. I would like to find out how to clean up the remaining shared resources for just one of the queue managers running on the server.
_________________
Dave Krier

IBM WebSphere MQ Workflow V3.4 Solution Designer
Back to top
View user's profile Send private message
bower5932
PostPosted: Mon Nov 11, 2002 11:52 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Try looking at the amqiclen utility. However, I don't believe it is documented and I think it has a disclaimer about only running it if directed by IBM support. You can run it with amqiclen -help to get a brief usage message. The program will hang unless you pipe in the mqs.ini file:

amqiclen -v -c -m QmgrName < /var/mqm/mqs.ini
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kriersd
PostPosted: Thu Dec 05, 2002 8:59 am    Post subject: Reply with quote

Master

Joined: 22 Jul 2002
Posts: 209
Location: IA, USA

NOTE -c only does a check... It does NOT remove any resources.

amqiclen -v -c -m qmgrname < /var/mqm/mqs.ini
.
-v = verbose
-c = check only (does not ipcrm anything)
-m = only to clear up named queue manager
_________________
Dave Krier

IBM WebSphere MQ Workflow V3.4 Solution Designer
Back to top
View user's profile Send private message
csmith28
PostPosted: Wed Dec 22, 2004 3:07 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1197
Location: Arizona

amqiclen -m MQMgrName -vix
Usage: ./amqiclen {-c | -x} -c = check -x = destroy
[-m <qmgr> | -s] -m = queue manager. -s = system subpool
[-p <prefix>] qmgrs directory Prefix (/var/mqm)
[-q] queue manager subpool
[-i] IPCC subpool
[-o] persistent queue manager subpool
[-t] trace control
[-F] Force (deleted active segments)
[-v] verbose
[-h] headings
[-d] display remaining resources

The options in detail are:

-c: check IPC only, do not remove
-x: remove IPC. Only IPC owned by mqm is removed.
Note that these options are mutually exclusive; one or the other must be
selected.

-m QMGR: check/remove IPC on qmgr QMGR
-s: check/remove IPC in the system subpool, i.e. the qmgr @SYSTEM
-p prefix: search for qmgr data in directory prefix (default /var/mqm)
-q: IPC in qmgr subpool only, i.e. shm/sem dirs in the qmgrs/QMGR dir
-i: IPC in IPCC subpool only, i.e. shm/sem dirs in the qmgrs/QMGR/@ipcc dir
-o: IPC in qmpersist subpool only, i.e. shm/sem dirs in the
qmgrs/QMGR/@qmpersist dir directory. The directories are shmem esem isem
msem ssem
-t: Trace control shm/sem, keyed from /var/mqm/errors
-F: Force removal. Normal operation is not to remove IPC which is in
use. This is determined by checking the processes using a semaphore, or
the number of processes attached to a shared memory segment. This flag
bypasses these checks
-v: Where appropriate, print output showing the progress of the utility
-h: Print headings in the output
-d: Run the commands ipcs -m and ipcs -s

Further notes
In the above I refer to "IPC .. keyed from files..". This means that the
key of a semaphore set or shared memory segment is derived from the
inode of a file or directory in the MQ directory tree.
Note that the -m | -s flags are not mandatory. If both flags are
omitted, amqiclen checks (removes) IPC from all directories found in the
prefix/qmgrs

The arguments conform to the usual UNIX rules for parsing the command
line. The options may be specified separately, e.g. amqiclen -c -v -h -t
-m QMGR, or they may be concatenated until an option is reached that
requires a further argument, e.g. amqiclen -cvhtmQMGR has the same effect.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
Nigelg
PostPosted: Wed Dec 22, 2004 11:17 pm    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

The input redirect from /var/mqm/mqs.ini is old syntax, and is no longer required.
amqiclen is fully supported by IBM, and you can raise defects/APARs against the utility.
Back to top
View user's profile Send private message
positional
PostPosted: Wed Dec 14, 2005 10:32 am    Post subject: amqiclen utility Reply with quote

Newbie

Joined: 14 Dec 2005
Posts: 4

Hello,

Is there any way to run amqiclen utility or any other non- IBM utility that cleans shared memory segments/semaphores without stopping a queue manager?

Thanks in advance.

Mark
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Dec 14, 2005 11:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You wouldn't want to remove MQ shared memory for a running queue manager.

You'd probably crash the QM.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
positional
PostPosted: Wed Dec 14, 2005 11:22 am    Post subject: Reply with quote

Newbie

Joined: 14 Dec 2005
Posts: 4

Good point. Thanks, Jeff
Back to top
View user's profile Send private message
Tdak
PostPosted: Tue Jul 01, 2008 2:54 am    Post subject: Reply with quote

Novice

Joined: 30 Jun 2008
Posts: 18
Location: South Africa

Which command can I use on Windows????

positional wrote:
Good point. Thanks, Jeff
Back to top
View user's profile Send private message MSN Messenger
sebastianhirt
PostPosted: Wed Jul 02, 2008 2:00 am    Post subject: Reply with quote

Yatiri

Joined: 07 Jun 2004
Posts: 620
Location: Germany

If I am not completely wrong, you don't need one on Windows, because there are no semaphores
Back to top
View user's profile Send private message
rachakonda_v
PostPosted: Mon Mar 31, 2014 7:54 am    Post subject: HOW TO RECOVER SYSTEM.ADMIN.ACCOUNTING QUEUE IN UNIX Reply with quote

Newbie

Joined: 14 Jun 2012
Posts: 7

I want to recover SYSTEM.ADMIN.ACCOUNTING.QUEUE in MQ by using UNIX server.

I gave command "rcrmqobj -m QUEUE MANAGER NAME -t SYSTEM.ADMIN.ACCOUNTING QUEUE"

But it's throwing an error - AMQ7027 " -Arguments supplied for RCRMQOBJ are not valid
- AMQ7024 " Arguments supplied -t is not valid

Can any one help me on this issue, its' urgent.

Thanks.
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Mon Mar 31, 2014 8:02 am    Post subject: Re: HOW TO RECOVER SYSTEM.ADMIN.ACCOUNTING QUEUE IN UNIX Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

rachakonda_v wrote:
I want to recover SYSTEM.ADMIN.ACCOUNTING.QUEUE in MQ by using UNIX server.

I gave command "rcrmqobj -m QUEUE MANAGER NAME -t SYSTEM.ADMIN.ACCOUNTING QUEUE"

But it's throwing an error - AMQ7027 " -Arguments supplied for RCRMQOBJ are not valid
- AMQ7024 " Arguments supplied -t is not valid

Can any one help me on this issue, its' urgent.

Thanks.

-t is type, and SYSTEM.ADMIN.ACCOUNTING.QUEUE is not a type, it's the name of an object type...

...read the examples given in the Info Centre for that command.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Mar 31, 2014 8:04 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

First, please don't use a years-old post; rather, create a new one.

Second, go to google, and research the syntax and parameters for the rcrmqobj supplied control program. You are incorrectly specifying the -t switch.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Messaging and Integration Technologies FAQ » Removing shared memory resources on Unix
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.