| Author | 
		  Message
		 | 
		
		  | KeeferG | 
		  
		    
			  
				 Posted: Thu Nov 25, 2004 6:19 am    Post subject: (resolved) Steps invloved in stopping a QM | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 15 Oct 2004 Posts: 215 Location: Basingstoke, UK 
  | 
		  
		    
			  
				Hi. I need to do a staged shutdown of a queue manager.
 
 
Stage 1 is to stop messages new being sent to the queue manager.
 
Stage 2 is for the local apps to finish processing the data.
 
Stage 3 is to shut down the queue manager.
 
 
All the queues are unique so a suspend wont prevent the messages being sent.
 
 
I just want to confirm if the following steps sound right.
 
 
1) Manualy stop the CLUSRCVR channels
 
2) Wait for all queues to empty
 
3) endmqm 
 
 
I guess start up would be the reverse
 
1) strmqm
 
2) manually start the CLUSRCVR channels.
 
 
Does anyone else have any other suggestions.
 
 
Cheers _________________ Keith Guttridge
 
-----------------
 
Using MQ since 1995 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | PeterPotkay | 
		  
		    
			  
				 Posted: Thu Nov 25, 2004 7:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 15 May 2001 Posts: 7723
  
  | 
		  
		    
			  
				This is how I would do it too. _________________ Peter Potkay
 
Keep Calm and MQ On | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | csmith28 | 
		  
		    
			  
				 Posted: Thu Nov 25, 2004 2:52 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 15 Jul 2003 Posts: 1196 Location: Arizona 
  | 
		  
		    
			  
				Assuming you are working on a Unix Platform and the MQManager you are shutting down is the only one on the Server, once the endmqm completes, as root I would do the following:
 
   
	| Code: | 
   
  
	
 
# ipcs | grep mqm
 
m    524297 0x0014a804 --rw-rw-rw-      mqm      mqm
 
m    393226 0x00146008 --rw-rw----      mqm      mqm
 
s   1966092 0x0014b80a --ra-ra----      mqm      mqm
 
s    131085 0x0014a013 --ra-ra-ra-      mqm      mqm
 
 
# ipcrm -m 524297 -m 393226
 
# ipcrm -s 19066092 -s 131085
 
 | 
   
 
 
m = shared memory segment
 
s = semaphore
 
 
If there are multiple MQManagers on the server use the following:
 
   
	| Code: | 
   
  
	
 
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.
 
 
During a graceful shutdown this is not always necessary but I usually do it anyway just to ensure that the MQManager gets a clean start. _________________ Yes, I am an agent of Satan but my duties are largely ceremonial.
  Last edited by csmith28 on Fri Nov 26, 2004 7:39 am; edited 1 time in total | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | KeeferG | 
		  
		    
			  
				 Posted: Fri Nov 26, 2004 1:56 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 15 Oct 2004 Posts: 215 Location: Basingstoke, UK 
  | 
		  
		    
			  
				Thanks guys. _________________ Keith Guttridge
 
-----------------
 
Using MQ since 1995 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Shalini | 
		  
		    
			  
				 Posted: Mon Nov 29, 2004 2:01 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Master
 
 Joined: 30 Apr 2002 Posts: 224 Location: India 
  | 
		  
		    
			  
				Hi All,
 
 
   
	| Quote: | 
   
  
	amqiclen -m MQMgrName -vix 
 
 | 
   
 
 
 
Just curious to know Do we have same option in Windows 2000/NT???
 
 
   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JasonE | 
		  
		    
			  
				 Posted: Mon Nov 29, 2004 4:27 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 03 Nov 2003 Posts: 1220 Location: Hursley 
  | 
		  
		    
			  
				| There is no need - Windows doesnt suffer the same type of problem | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | csmith28 | 
		  
		    
			  
				 Posted: Mon Nov 29, 2004 3:48 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 15 Jul 2003 Posts: 1196 Location: Arizona 
  | 
		  
		    
			  
				
   
	| JasonE wrote: | 
   
  
	| There is no need - Windows doesnt suffer the same type of problem | 
   
 
 
 
Problem?  Well OK if you say so....
 
 
But then I guess Windows 2000/NT has enough problems without having to worry about shared memory.    _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JasonE | 
		  
		    
			  
				 Posted: Tue Nov 30, 2004 1:36 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 03 Nov 2003 Posts: 1220 Location: Hursley 
  | 
		  
		    
			  
				Such as...?   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dgolding | 
		  
		    
			  
				 Posted: Tue Nov 30, 2004 8:16 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 16 May 2001 Posts: 668 Location: Switzerland 
  | 
		  
		    
			  
				Well, it IS handicapped by running on an inferior operating system    
 
 
I saw a comment from a Microsoft engineer once, on the stability of an experimental version of Windows, "We're seeing uptimes of weeks, sometimes months, crazy numbers"
 
 
Except if you work on a Unix platform, where the yearly reboot is an unnecessary ritual | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | csmith28 | 
		  
		    
			  
				 Posted: Tue Nov 30, 2004 8:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 15 Jul 2003 Posts: 1196 Location: Arizona 
  | 
		  
		    
			  
				
   
	| dgolding wrote: | 
   
  
	Well, it IS handicapped by running on an inferior operating system    
 
 
I saw a comment from a Microsoft engineer once, on the stability of an experimental version of Windows, "We're seeing uptimes of weeks, sometimes months, crazy numbers"
 
 
Except if you work on a Unix platform, where the yearly reboot is an unnecessary ritual | 
   
 
 
 
Months    , that is crazy talk.  I wonder if the Microsoft Servers that stay up that long running LongBow have an application loaded on them... _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |