i want to know port number of Queue manager on my server.how to find it? What is the command to find it in message queueing
-
Possible duplicate of [How to find MQ listener port on AIX?](https://stackoverflow.com/questions/13747278/how-to-find-mq-listener-port-on-aix) – Rohan Pillai Apr 04 '18 at 13:30
-
Possible duplicate of [find port number of IBM MQ Queue Manager](https://stackoverflow.com/questions/48255390/find-port-number-of-ibm-mq-queue-manager) – JoshMc Apr 04 '18 at 15:54
-
Neither of the possible duplicate answers address the question if the listener is already running - both were about people who didn't realise that a listener wasn't automatically started when the queue manager was created. – Morag Hughson Apr 05 '18 at 10:38
2 Answers
If the two listed possible duplicate answers don't address your question, I assume that you do already have a listener running on your queue manager (i.e. someone else set it up) and you just need to know what port they used.
Easiest way to find that is to use the following MQSC command:-
DISPLAY LSSTATUS(*) ALL
This will show you all the running listeners (yes a queue manager can have more than one listening port) and will also show you the port number it is listening on. If you alternatively use the following MQSC command:-
DISPLAY LISTENER(*) ALL
you may not find the actual port in use, because any definition with PORT(0) will use the default port number from the qm.ini file which is normally 1414 but might be another number. The first command always shows the actual port in use and thus is recommended for finding the port number for the queue manager.
To do the same thing using MQ Explorer, from the right mouse-click context menu on the Listener object folder, select Status...
This will bring up a window showing all the running listeners, (the equivalent of the MQSC command DISPLAY LSSTTATUS
). You can see the port number in the second column.

- 7,255
- 15
- 44
To be more clear, I didn't find a way to get the port number using the MQ Explorer. I was able to use the command line for this purpose:
- Open a command line in the Windows server
- run
dspmq -o installation
and CD to the folder where MQ is installed. - run
runmqsc <name-of-mq-mgr>
- Now you can enter the command
DISPLAY LSSTATUS(*) ALL
I am posting this answer as I wanted to find the same info, and it took me a little while to find it (under right-click MQ Manager Item/Properties/TCP Port).
Then, it took me also a little while to figure out how to use the MQ Command-Line from the Windows server.

- 738
- 1
- 16
- 42
-
1Sorry to hear you couldn't find a way to do the equivalent in MQ Explorer - I have updated my answer to show how to do the same thing in MQ Explorer as I had already described using MQSC. – Morag Hughson May 19 '23 at 00:33
-
1P.S. right-click MQ Manager Item/Properties/TCP Port is only the default port to be used if a listener object that does not specify a port number is used. – Morag Hughson May 19 '23 at 00:34