| Author | Message | 
		
		  | krypton | 
			  
				|  Posted: Wed Aug 09, 2017 7:43 am    Post subject: MQ LINUX leftover IPC resources |   |  | 
		
		  |  Disciple
 
 
 Joined: 14 Mar 2010Posts: 186
 
 
 | 
			  
				| Hi, 
 we have 2 queue managers on our LINUX server and we have stopped both of them using normal "endmqm" command, we have also stopped listener using endmqlsr command, after that we ran the command  amqiclen to clean up IPC resources and I am still seeing some IPC resources.
 is that should be a cause of concern?
 
 Following is the output of command
 [mqm@hostname bin]$ ipcs -a
 
 ------ Shared Memory Segments --------
 key        shmid      owner      perms      bytes      nattch     status
 0x00039c05 23592996   mqm        666        8800       0
 0x00039bfe 859799589  mqm        666        8800       0
 
 ------ Semaphore Arrays --------
 key        semid      owner      perms      nsems
 0x00000000 131074     mqm        660        1
 0x00000000 163843     mqm        660        1
 0x00000000 196612     mqm        666        8
 0x00000000 294917     mqm        660        1
 0x00000000 327686     mqm        666        8
 
 ------ Message Queues --------
 key        msqid      owner      perms      used-bytes   messages
 
 
 ********* Our MQ details ***
 Name:        WebSphere MQ
 Version:     8.0.0.2
 Level:       p800-002-150217.2
 BuildType:   IKAP - (Production)
 Platform:    WebSphere MQ for Linux (x86-64 platform)
 Mode:        64-bit
 O/S:         Linux 2.6.32-696.6.3.el6.x86_64
 InstName:    Installation1
 InstDesc:
 Primary:     Yes
 InstPath:    /opt/mqm
 DataPath:    /var/mqm
 MaxCmdLevel: 801
 LicenseType: Production
 _________________
 Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Wed Aug 09, 2017 7:53 am    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| ... Did you check for other MQ prcesses? 
 Also, you should probably configure the listener to be started and stopped by the queue manager, and review whether amiclen is still useful.
 _________________
 chmod  -R ugo-wx /
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | krypton | 
			  
				|  Posted: Wed Aug 09, 2017 8:21 am    Post subject: |   |  | 
		
		  |  Disciple
 
 
 Joined: 14 Mar 2010Posts: 186
 
 
 | 
			  
				| 
   
	| Quote: |  
	| ... Did you check for other MQ prcesses? 
 |  
 Yes, we didn't find any other "mq" processes were running after stopping queue manager.
 _________________
 Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | bruce2359 | 
			  
				|  Posted: Wed Aug 09, 2017 10:08 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 05 Jan 2008Posts: 9486
 Location: US: west coast, almost. Otherwise, enroute.
 
 | 
			  
				| Why are you using amqiclen? _________________
 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 |  | 
		
		  |  | 
		
		  | gbaddeley | 
			  
				|  Posted: Wed Aug 09, 2017 7:49 pm    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 2538
 Location: Melbourne, Australia
 
 | 
			  
				| It should only be necessary to try using amqiclen if a queue manager has crashed badly and fails to start, or another process has reused a PID that was formerly is use by a crashed amq process. _________________
 Glenn
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Andyh | 
			  
				|  Posted: Thu Aug 10, 2017 4:19 am    Post subject: |   |  | 
		
		  | Master
 
 
 Joined: 29 Jul 2010Posts: 239
 
 
 | 
			  
				| Correction, it should NEVER be required for a customer to use amqiclen directly. strmqm includes similar logic to amqiclen and will automatically clean up any left over IPC resources from an earlier instance of the same queue manager. If strmqm chooses not to clean up such resources, because some process is still referencing those resources, then amqiclen shouldn't clean up those resources either. The test in strmqm/amqiclen is believed to be watertight in all supported situations.
 
 There are ways that it would be possible to break this logic (for example by manually deleting certain queue manager related files), but none of those actions would be 'supported' by IBM.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gbaddeley | 
			  
				|  Posted: Thu Aug 10, 2017 3:56 pm    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 2538
 Location: Melbourne, Australia
 
 | 
			  
				| Hi Andy, its good to hear that. I remember writing a script for MQ v5 that found and removed MQ's IPC resources, and then amqiclen came along in a later version. I have only used amqiclen in anger a couple of times over the last 5+ years, and that was on advice in an IBM PMR. MQ's handling of IPC resource cleanup has certainly improved a lot since the early days. _________________
 Glenn
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | krypton | 
			  
				|  Posted: Fri Aug 11, 2017 10:44 am    Post subject: |   |  | 
		
		  |  Disciple
 
 
 Joined: 14 Mar 2010Posts: 186
 
 
 | 
			  
				| Yes, IBM also say in this link  that we should not perform Manual actions on IPC resources. Then I guess, it was my bad to do this cleanup
 
 https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.0.1/com.ibm.mq.amqzag.doc/fa22720_.htm
 
 IPC resources allocated by WebSphere MQ are maintained automatically by the allocating queue managers. You are strongly recommended not to perform manual actions on or remove these IPC resources.
 _________________
 Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |