ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Performance Monitoring » MQ Logs: Can MQ switch on date as well as on size

Post new topic  Reply to topic
 MQ Logs: Can MQ switch on date as well as on size « View previous topic :: View next topic » 
Author Message
fillyas
PostPosted: Wed Dec 05, 2007 2:19 am    Post subject: MQ Logs: Can MQ switch on date as well as on size Reply with quote

Newbie

Joined: 26 Aug 2007
Posts: 1
Location: Saudi Arabia

Hi,
MQ switches error logs on size with a default of 256K. Is it possible to generate a MQ log for each day? if can, kindly advise how to do it.

Thanks
Faz
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 05, 2007 3:04 am    Post subject: Re: MQ Logs: Can MQ switch on date as well as on size Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

fillyas wrote:
MQ switches error logs on size with a default of 256K. Is it possible to generate a MQ log for each day?


No. The queue logs switch as they fill, though log size is parameter driven. The error logs likewise though I don't think you can control the size on those.

Why would you want to segrigate error logs? I could understand a requirement to keep a log of the day's MQ messages (though you couldn't do that with this technique because of the log format) but why the errors?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Dec 05, 2007 3:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There's an old post somewhere that mentions an ENV variable or such for increasing the size (but not the number) of the error logs.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Dec 06, 2007 1:27 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

MQMAXERRORLOGSIZE is that environment variable the system's MQ error logs.
In MQ 6.0 the QM's error log size is kept in the qm.ini file or in MQExplorer / the registry on Windows.

Assuming your logs are big enough to hold a day's worth, just write a script that copies off the files each day to wherever you want to store them.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
JuulV
PostPosted: Sat Dec 08, 2007 8:07 am    Post subject: Reply with quote

Apprentice

Joined: 05 Sep 2007
Posts: 28
Location: Belgium

I assume this topic is only about WMQ ERROR LOGS, not about the WMQ RECOVERY LOGS...
And I also assume that you're running WMQ 6.x...

Having simplified things that much, let's now complicate matters...
First, WMQ actually maintains 3 different sets of ERROR logs concurrently (the actual location, i.e. path and directory name, varies slightly by operating system, but you should be able to locate all of them quite easily):
<WMQ_ROOT>\errors: contains errors not related to any particular queue manager; this directory also contains any FDC and DMP files that might be produced (by any WMQ related process, so from ANY queue manager);
<WMQ_ROOT>\@SYSTEM\errors: contains errors (from channels only?) if the target queue manager is unavailable or its name cannot be determined;
<WMQ_ROOT>\<QMgrName>\errors: contains errors related to this specific queue manager;

Next, for each set, WMQ maintains up to 3 log files, AMQERR01/02/03. New errors are always written to AMQERR01. When this file reaches its maximum size, the 02 file is first copied (renamed?) to 03 (destroying whatever might have been in the 03 file); next, the 01 file is copied (renamed?) to 02.

The default size for all error logs is 256KB, but since WMQ 6, you can change this value for QUEUE MANAGER ERROR LOGS (via WMQ/Explorer or in the qm.ini file), but there's no (documented) way to change the size for the two other sets!!!

The WMQ documentation also clearly states that QUEUE MANAGER ERROR LOGS are created when needed, but it doesn't say anything about what will happen if the other AMQERRnn files don't exist.

So, if you just want the queue manager error logs by day, things can be quite easy: you ensure that the max size is large enough to hold all the errors for the day, and some script automatically renames the AMQERR01.LOG file to something else just around midnight.

If you also want to keep the "global" and "system" error logs by day, things might become more complicated: you apparently can't set the size of these, so your procedure may also have to handle situations where data is in the 02 and 03 files... And if ever you'd have more than 756KB of error messages in a single day, data will be lost (let's hope you never will). And as the doc doesn't state what will happen if any such file doesn't exist, you might not be able to rename the files, but have to look for a moment without WMQ activity, or take the chance for fuzzy copies...
_________________
Juul Vanparijs
Senior Developer
Cressida Technology Ltd
Back to top
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Sat Dec 08, 2007 2:20 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

JuulV wrote:

...but there's no (documented) way to change the size for the two other sets!!!

Its kinda documented in these 2 links:
http://www-1.ibm.com/support/docview.wss?uid=swg21179310
http://www-1.ibm.com/support/docview.wss?rs=0&uid=swg21196078

It does work, we've been using it for a couple of years on Windows, Solaris and Linux.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
JuulV
PostPosted: Tue Dec 11, 2007 12:29 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Sep 2007
Posts: 28
Location: Belgium

Hi Peter,

Both of these articles seem to talk about setting the max size for the Queue Manager specific AMQERRnn files...

Will setting the MQMAXERRORLOGSIZE environment variable (at some global level, so that all internal WMQ processes see this variable) also affect the size of the global error logs?

And with WMQ 6, where the log file size can be set in the registry (Win) / qm.ini (Ux/lx), which value will take precedence?
_________________
Juul Vanparijs
Senior Developer
Cressida Technology Ltd
Back to top
View user's profile Send private message Visit poster's website
Nigelg
PostPosted: Tue Dec 11, 2007 2:46 pm    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

The global error logs (/var/mqm/errors) do not really have much interesting in them, and fill rather slowly compared to the qmgr error logs, which have all the qmgr and channel start/stop msgs, the log msgs, and so on, so it is not really necessary for the global logs to be made bigger.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Dec 13, 2007 4:57 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

JuulV wrote:

Will setting the MQMAXERRORLOGSIZE environment variable (at some global level, so that all internal WMQ processes see this variable) also affect the size of the global error logs?

And with WMQ 6, where the log file size can be set in the registry (Win) / qm.ini (Ux/lx), which value will take precedence?


In MQ 6.0 you control the QM logs by the qm.ini (or MQExplorer on Windows QM) settings. The environment variable now only applies to the global MQ error logs.

There is no conflict or precedence issue based on my experience. 2 different sets of MQ Error logs each independently controlled by 2 different methods.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Performance Monitoring » MQ Logs: Can MQ switch on date as well as on size
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.