In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will share with you about the daily maintenance operations of MQ. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
I. start and stop of MQ
Starting / stopping with the root user requires the root user to be included in the mqm group.
1. The startup of MQ
Strmqm QMgrName
If you start the default queue manager, you can ignore the queue manager name 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. Please refer to "C. clean up all semaphores and shared memory remaining in the system" below.
2. Shutdown of MQ
In general, we use "endmqm-I QMgrName" to stop mq. If the stop fails, you can use the following steps:
Step 1:endmqm-p QMgrName, if you can't stop, proceed to step 2
Step 2: kill the process and clean up the semaphores and shared memory left inside the system
a. Find the queue manager program process
Ps-ef | grep QMgrName
b. Use the kill command to terminate the program processes found in 1 >. Processes that cannot be stopped can be terminated with kill-9 in the following order (processes that do not exist can be ignored):
Kill amqpcsea command server
Kill amqhasmx recorder
Kill amqharmx log formatter (LINEAR logs only)
Kill amqzllp0 checkpoint processor
Kill amqzlaa0 queue Manager Agent
Kill amqzxma0 processing controller
Kill amqrrmfa library process (for clustering)
c. Clean up all semaphores and shared memory left inside the system (its owner and group are mqm)
Ipcs-s | grep mqm | awk'{print $2}'| xargs-I ipcrm-s {}
Ipcs-m | grep mqm | awk'{print $2}'| xargs-I ipcrm-m {}
II. Check the running status of MQ and common operations
1. Check the running status of queue manager
For MQ version 5.2 or later, execute the following command to check the queue manager running status: dspmq
In the display result, QMNAME represents the name of the MQ queue manager, and STATUS represents the current running status.
The running states are as follows:
Starting is starting
Running is running
Ending is stopping.
Ended normally has been terminated normally.
Ended immediately has been terminated immediately.
Ended preemtively has been forcibly terminated
Abnormal termination of Ended unexpectively
Note: status check must be done using the dspmq command after stopping MQ
Example of dspmq query results:
QMNAME (QM00) STATUS (Running)
2. Check the running status of the channel and the start / stop channel
Runmqsc
Dis chl (*); view all channel definitions
Dis chs (*); check the status of all channels. If the status of the channel is not queried, or an error AMQ8420: Channel Status not found is reported, please start the channel.
Dis chs (ChannelName); check the status of the channel ChannelName
The channel states are as follows:
STARTING is starting
BINDING is binding
INITIALIZING is initializing
RUNNING is normal.
STOPPING is stopping
RETRYING retry
PAUSED wait
STOPPED has stopped
REQUESTING request
Start chl (ChannelName); boot channel
Stop chl (ChannelName); stop channel
Reset channel (ChannelName); resets the channel sequence number. When the channels of the local and other MQ queue managers fail to start normally, check the log and find that the channel sequence number is inconsistent. In this case, you need to stop the sender channel and reset the channel count between the sender and receiver. After the reset, the communication can be resumed by starting the channel.
3. Check the status of channel monitoring and start / stop monitoring
Runmqsc
Dis listner (*); view the channel listening definition
Dis lsstatu (listnerName); check the monitoring status
Start lstr (listnerName); start listening
Stop lstr (listnerName); stop listening
4. View queue depth
Runmqsc
Dis Q (*); view the properties of all types of queues
Dis qlocal (QName); view the properties of all local queues
Queue depth attribute is: CURDEPTH
5. View the dead letter queue
Dis qlocal (DEADQName)
III. Daily maintenance projects
1. To monitor the usage of file system / var/mqm, it is recommended that it not exceed 80%.
2. Regularly report MQ system errors, backup and clean up MQ system error records
When you encounter a problem, check to see if a new FDC file is generated in the / var/mqm/errors directory, and if so, check the reason. In addition, check the MQ error log in this directory regularly.
3. Check whether the number of logs is growing.
Use the command cd to move to the directory where the MQ log is located (/ var/mqm/log/QMgrName/active/), and use the ls-l | wc command to count.
4. Check the MQ queue manager error log
Check / var/mqm/qmgrs/QMgrName/errors/AMQERR0n.LOG first when the system is not working properly
Error messages are always placed in AMQERR01 after they are generated, and the AMQERR02 and AMQERR03 files are used to save historical error messages.
Thank you for reading! This is the end of this article on "what are the daily maintenance operations of MQ?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.