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 » General IBM MQ Support » mq error log rotation

Post new topic  Reply to topic Goto page Previous  1, 2
 mq error log rotation « View previous topic :: View next topic » 
Author Message
tczielke
PostPosted: Sat Mar 17, 2018 5:27 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

rekarm01 added some helpful information from the manual on how this works and how it changed at 9.0.4. I wanted to also just highlight the following for Linux/Unix.

1) On Linux (probably most other Unix systems, too) a file is identified by its inode, not its hard link. A name like /var/mqm/qmgrs/QM1/errors/AMQERR01.LOG is really a hard link to that inode, and is not what uniquely identifies the file. You can have multiple hard links to the same inode. So it is possible to have two hard links AMQERR01.LOG and MONKEY both pointing to the same inode 1234 and 1234 is what really truly identifies the file, not AMQERR01.LOG. If you do writes to both the hard links of AMQERR01.LOG and MONKEY, they both get written to the inode 1234.

2) A file will not be removed by Linux (and probably other Unix systems, too) until all hard links are removed to the inode AND no processes have that inode open. This is one reason why the rm (remove) command is called rm and not del. You are not deleting a file when you run the rm command. You are removing a hard link to the inode. Let's say there is only one hard link (e.g. AMQERR01.LOG) to the inode 1234. You can do a "rm AMQERR01.LOG" and remove the hard link, but as long as a process has inode 1234 open, that inode will never be deleted by the operating system.

You need to take the above into consideration when desigining any application to read the AMQ error logs. With the 9.0.4 approach, it sounds like you could get yourself into a situation where a long running process that is reading the AMQ error logs could prevent the underlying file inode for AMQERR03.LOG from being deleted by the operating system, if you are not careful with your design.
_________________
Working with MQ since 2010.
Back to top
View user's profile Send private message
Andyh
PostPosted: Sun Mar 18, 2018 12:44 pm    Post subject: Reply with quote

Master

Joined: 29 Jul 2010
Posts: 237

The mechanism used by the distributed code base to rotate the error log files changed in V9.0.4, to a more standard 'rename' style implementation. This was partly to support 3rd party tools that were assuming this style of rollover.

MQ 9.0.5 makes further, more significant, changes to the error log capabilities,
see https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.con.doc/q019020_.htm for more detail.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Wed Mar 21, 2018 2:22 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

crashdog wrote:
The knowledge center was the first place that I checked, ... But the KC does not describe anything on how the error log files are rotated.

Re-read my previous post. The links I provided seemed to describe in detail how MQ rotates log files. What's missing?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » General IBM MQ Support » mq error log rotation
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.