MQ middleware startup and shutdown Generally speaking, we use the mqm user to start and stop, if the root user is required to start and stop, then the root user needs to be included in the mqm user group. 1. Start of MQ #su-mqm $ strmqm QMgrName If the default queue manager is started, the name of the queue manager can be ignored after strmqm. After stopping the queue manager in an unexpected situation, the startup may fail. At this time, you can check whether any IPC resources have not been released since the last stop. If so, please delete it. For the deletion method, refer to the following: "Clean up all remaining inside the system. Semaphores and shared memory "section. 2. Shutdown of MQ Under normal circumstances, we use the following command to stop mq $ endmqm -i QMgrName if stop or shutdown fails, you can use the following steps: Step 1): $ endmqm -p QMgrName If you can not stop, continue to step 2. Step 2): Kill the relevant process, clean up the semaphores and shared memory A remaining in the system , find the queue manager program process (here QmgrName is the queue manager name, please modify according to your needs) # ps -ef | grep QMgrName uses the kill command to terminate the process found. The process that cannot be stopped can be terminated with kill -9. The order of terminating the process is as follows (non-existing processes can be ignored): kill amqpcsea Command server kill amqhasmx recorder kill amqharmx log formatter (LINEAR log only) kill amqzllp0 checkpoint processor kill amqzlaa0 Queue manager agent kill amqzxma0 process controller kill amqrrmfa library process (used for clusters) B. Clean up all the semaphores and shared memory (its owner and group are mqm) remaining in the system with one command: # ipcs | grep mqm | awk '{printf "ipcrm-% s% s \ n", $ 1, $ 2}' | sh two methods to clear: # ipcs -s | grep mqm | awk '{print $ 2}' | xargs -i ipcrm -s {} # ipcs -m | grep mqm | awk '{print $ 2}' | xargs -i ipcrm -m {} How to clear N commands: # ipcs -s | grpe mqm # ipcrm -s ID found # ipcs -m | grpe mqm # ipcrm -m ID found