Author |
Message
|
lyntongrice |
Posted: Tue Oct 24, 2023 10:56 am Post subject: Linear Logging (Automatic) IBM MQ Log not reduced? |
|
|
Acolyte
Joined: 26 Sep 2010 Posts: 70
|
Hi all,
We had linear logging in our system where the log management was originally set to manual. The log folder on the server subsequently got to like 90% capacity so we changed the log stanza in the "qm.ini" file to be automatic and restarted the queue manager.
My understanding from the following like was:
https://www.ibm.com/docs/en/ibm-mq/9.2?topic=reference-reset-qmgr-reset-queue-manager
"In general, when using automatic management of log files, you should leave it up to the queue manager to reduce the number of log extents as necessary."
And if I look at:
https://www.ibm.com/docs/en/ibm-mq/9.0?topic=qmini-log-stanza-file
"Automatic
Log extents are managed automatically by the queue manager. Specifying this option means that the queue manager is able to reuse or delete log extents as soon as they are no longer required for recovery. No allowance is made for archiving."
So the logs are still growing slightly after changing the log stanza to automatic (and restarting the qm)
I also issue the below:
RESET QMGR TYPE(REDUCELOG) REDUCE(MAX)
But that just returned saying
AMQ8925W: IBM MQ Log not reduced
Is this normal behaviour until the queue manager reaches a certain percentage of disk used or do I need to further clean up / do some manual activity like shown in:
https://www.ibm.com/docs/en/ibm-mq/9.3?topic=files-determining-superfluous-log-linear-logging-only
BTW: Do not have OS access and will check MQ version but it is greater than 9.1 for sure
Thanks so much for the help, much appreciated
Lynton |
|
Back to top |
|
 |
Andyh |
Posted: Wed Oct 25, 2023 12:19 am Post subject: |
|
|
Master
Joined: 29 Jul 2010 Posts: 239
|
Setting log management to automatic requests the queue manger to take over the management of extents no longer required for either media or restart recovery.
The qeueu manager ALWAYS manages the logs needed for restart recovery (constrained by the number of primary and secondary extents), but the scheduling of media images can be manager either by the QMgr, or by the user. The default is for the scheduling of media images to be managed by the user. The QMgr will bespitting out messages to AMQERRnn.LOG showing which extents are required for media and which extents are required for restart recovery.
See the qmgr attributes IMGSCHED, IMGINTVL and IMGLOGLN.
If you ask the QMgr to also take over media image management then that activity tends to get spread out over time. Some users prefer to schedule the images themselves at a time when they expect the workload to be light. The queue manager is better placed to make good decisions to minimise the total overhead of media imaging (as it is constantly aware of the state of all of the queues), but it does bring the risk of media images being scheduled at relatively prime times. |
|
Back to top |
|
 |
lyntongrice |
Posted: Thu Oct 26, 2023 12:28 am Post subject: |
|
|
Acolyte
Joined: 26 Sep 2010 Posts: 70
|
Hi Andy,
Thanks for the feedback on this, much appreciated.
I do agree that manual media management makes more sense to not have daily operation potentially distrupted with auto media management.
BTW: I presume for manual media management all one does is issue the below command to get the log file names in use and then as per the link below one can:
"....In this case, you can archive any log file with a number less than the RECLOG value, and you can delete any log file with a number less than both the RECLOG and MEDIALOG values."
DISPLAY QMSTATUS MEDIALOG.
https://www.ibm.com/docs/en/ibm-mq/9.1?topic=files-determining-superfluous-log-linear-logging-only
Thanks again for the help
Lynton |
|
Back to top |
|
 |
Andyh |
Posted: Thu Oct 26, 2023 1:29 am Post subject: |
|
|
Master
Joined: 29 Jul 2010 Posts: 239
|
If you are using MQ log management then you shouldn't need to delete any log extents. MQ will typically reuse old log extents and that helps significantly reduce the overhead of using linear logging. If you NEED to reduce the amount of log space in use you'd be better to use the RESET QMGR TYPE( REDUCELOG) command. |
|
Back to top |
|
 |
lyntongrice |
Posted: Thu Oct 26, 2023 1:41 am Post subject: |
|
|
Acolyte
Joined: 26 Sep 2010 Posts: 70
|
Hi Andy,
Thanks for the response, I had originally issued that command but got the below response:
RESET QMGR TYPE(REDUCELOG) REDUCE(MAX)
AMQ8925W: IBM MQ Log not reduced
The area I am not 100% sure on if I have over 4000 active mq logs into the "active" folder and am not sure if that is "normal" or if I need to manually delete some of the based on the DISPLAY QMSTATUS command to see what is needed and what is not really needed log wise?
Thanks again
Lynton |
|
Back to top |
|
 |
Andyh |
Posted: Thu Oct 26, 2023 2:56 am Post subject: |
|
|
Master
Joined: 29 Jul 2010 Posts: 239
|
What does "DIS QMSTATUS LOG" show ? |
|
Back to top |
|
 |
lyntongrice |
Posted: Thu Oct 26, 2023 3:18 am Post subject: |
|
|
Acolyte
Joined: 26 Sep 2010 Posts: 70
|
Hi there,
Thanks for the help, it shows the following (changed QM name below only):
DIS QMSTATUS LOG
1 : DIS QMSTATUS LOG
AMQ8705I: Display Queue Manager Status Details.
QMNAME(QM1) STATUS(RUNNING)
ARCHLOG( ) ARCHSZ(0)
CURRLOG(S0004388.LOG) LOGINUSE(41)
LOGPATH(/MQHA/log/QM1/active/) LOGUTIL(46)
MEDIALOG(S0000000.LOG) MEDIASZ(17556)
RECLOG(S0004388.LOG) RECSZ(1)
REUSESZ(0) |
|
Back to top |
|
 |
Andyh |
Posted: Thu Oct 26, 2023 4:29 am Post subject: |
|
|
Master
Joined: 29 Jul 2010 Posts: 239
|
MEDIALOG(S0000000.LOG) shows that a complete media image has never completed for this queue manager. As no media image is available ALL of the logs are still required in order that media recovery would be possible, were it ever needed.
As discussed earlier in this thread you can either ask the queue manager to schedule the images, or you can manually run rcdmqimg at times that suit you best. |
|
Back to top |
|
 |
lyntongrice |
Posted: Thu Oct 26, 2023 4:57 am Post subject: |
|
|
Acolyte
Joined: 26 Sep 2010 Posts: 70
|
Thanks for the clarity on this, much appreciated  |
|
Back to top |
|
 |
|