Bootstrap FreeKB - IBM MQ - Stop queue manager using the endmqm command
IBM MQ - Stop queue manager using the endmqm command

Updated:   |  IBM MQ articles

These examples are based on Linux. Switch to the mqm user.

su - mqm


The endmqm command can be used to stop a queue manager. In this example, the queue manager named MANAGER01 will be stopped.

endmqm MANAGER01


Something like this should be displayed.

Waiting for queue manager 'MANAGER01' to end.
Quiesce request accepted. The queue manager will stop when all outstanding work
is complete.


The queue managers AMQERR01.log should have something like this when the queue manager starts to shut down.

AMQ9542W: Queue manager is ending.


And then the following once the queue manager has completed it's shutdown.

AMQ8004I: IBM MQ queue manager 'MANAGER01' ended.


The dspmq command can be used to check the status of the queue manager. While the queue manager is stopping, the status should be "ending immediately".

QMNAME(MANAGER01)    STATUS(Ending immediately)


Once stopped, the status should be "ended normally".

QMNAME(MANAGER01)    STATUS(Ended normally)


Or the qmstatus command can be used to show the queue manager status.

echo "display qmstatus" | runmqsc MANAGER01
. . .
QMNAME(MANAGER01)                       STATUS(Ended normally)


However, even when the dspmq or qmstatus commands return "Ended normally", the systemctl command or service commands may show that the queue manager service was not killed.

Job for example.service failed because the control process exited with error code. See "systemctl status example.service" and "journalctl -xe" for details.


If your system is using systemd, use the systemctl command to stop queue manager.

systemctl stop MANAGER01
systemctl status MANAGER01


If your system is using init, use the chkconfig and service commands to stop the queue manager.

service MANAGER01 stop
service MANAGER01 status


Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee


Add a Comment

Please enter cb4378 in the box below so that we can be sure you are a human.