| Author | 
		  Message
		 | 
		
		  | leot | 
		  
		    
			  
				 Posted: Tue Jul 08, 2003 2:04 pm    Post subject: Discovering listeners for a queue manager | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 21 Apr 2002 Posts: 24 Location: NYC 
  | 
		  
		    
			  
				Is there an MQSC command, or other command-line utility, to find what listeners are running, and on what ports, for a queue manager? An MQSC command DISPLAY QMGR does not seem to include this information.
 
 
- Leo | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tillywern | 
		  
		    
			  
				 Posted: Tue Jul 08, 2003 2:24 pm    Post subject: UNIX | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 28 Jan 2003 Posts: 109 Location: Colorado 
  | 
		  
		    
			  
				| At least on UNIX you can probably look in /etc/services and /etc/inetd.conf  if you are letting inetd manage the incomming traffic.   Also on UNIX if you started the listener as a daemon you should be able to look in the process table. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | inder | 
		  
		    
			  
				 Posted: Tue Jul 08, 2003 7:30 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 24 Mar 2003 Posts: 49 Location: USA 
  | 
		  
		    
			  
				On windows you can check about listners using MQservices Management console and on Unix you can check with the command 
 
ps-aef |grep runmqlsr  
 
 
regards
 
Inder | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | leot | 
		  
		    
			  
				 Posted: Wed Jul 09, 2003 3:13 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 21 Apr 2002 Posts: 24 Location: NYC 
  | 
		  
		    
			  
				Thanks!
 
 
Management Console is out, because on NT any listeners started from the command line will NOT be visible in MQSeries Explorer (it was mentioned already on this forum; the reason is that the process of starting listener via Explorer actually writes that fact somewhere, and only because of this the Explorer can show you the listener - it does not actually go to OS for that). And since all of our MQ setup is scripted (is there anyone out there who actually does all the configuration _manually_?   Of course, I know, there is...), the Console option is not an option.
 
 
I also figured I can use netstat on both, Unix and NT.
 
Unix: netstat -apt|grep runmqlsr will display all TCP ports that are associated with runmqlsr.
 
NT: netstat -a -p tcp |findstr runmqlsr
 
 
Although, it is sort of counter-intuitive that one can start and stop MQ listeners by using MQ-specific commands, but has to go to OS-level commands to find out which listeners are currently running?!
 
 
- Leonid | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | leot | 
		  
		    
			  
				 Posted: Wed Jul 09, 2003 3:18 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 21 Apr 2002 Posts: 24 Location: NYC 
  | 
		  
		    
			  
				Correction to my previous post: 
 
 
One _cannot_ use findstr with netstat output on NT - it does not produce process names...
 
 
Sorry about that.
 
 
- Leonid | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | SnowDragon | 
		  
		    
			  
				 Posted: Mon Jun 21, 2004 7:10 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Guest
 
 
 
 
 
  | 
		  
		    
			  
				On MQ 5.3 for windows you can actualy map a QM to its listener port number via the registry. Have a look at:
 
 
HKLM\SOFTWARE\IBM\MQSeries\CurrentVersion\Configuration\Services
 
 
You will see subkeys for each QM you have on the machine. Lets say I have a QM_X subkey, then it should have a subkey called "Listener" and that subkey has a DWORD value for the port number.
 
 
So full path will be:
 
HKLM\SOFTWARE\IBM\MQSeries\CurrentVersion\Configuration\Services\QM_X\Port
 
 
I really wish MQ would give a normal interface to this via MQSC...
 
 
Hope this will help anyone. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |