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, MANAGER01 is stopped.
endmqm MANAGER01
Waiting for queue manager 'MANAGER01' to end.
Quiesce request accepted. The queue manager will stop when all outstanding work
is complete.
The dspmq command can be used to determine if the queue manager has "ended normally".
QMNAME(MANAGER01) STATUS(Ended normally)
However, even when the dspmq command returns "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