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 » WebSphere Message Broker (ACE) Support » file node archive housekeeping

Post new topic  Reply to topic
 file node archive housekeeping « View previous topic :: View next topic » 
Author Message
zpat
PostPosted: Mon Apr 04, 2011 6:11 am    Post subject: file node archive housekeeping Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I think I am right to say that the file nodes in WMB 6.1 or 7 do not perform any housekeeping on the files that are archived locally?

It would be preferably if WMB file nodes supported an option to retain the archived files only for "nn" days. If this was selected then the broker would delete the files older than this whenever the next file was added to the local archive.

Otherwise we are obliged to use a process external to the broker to perform this housekeeping process (and also to keep an eye on developers in case they have forgotten to consider this!).
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Apr 04, 2011 6:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

There is an automatic mechanism available that self-cleans and is configurable per environment:

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html

To use this, perform your file output from a Compute node or a JCN rather than a FileNode.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Apr 04, 2011 6:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There are hundreds of different ways to manage this simply without changing anything about current Broker coding practices.

Admins should be determining the locations of production file operations anyway, regardless of what developers have done or not done. So in production, all of the locations that Broker is going to read from or write to should be known before deployment, and a suitable tool or dead simple shell script can be employed.

Broker does not take any action on files in mqsiarchive after it has finished with them. If you would like this to change, you should raise a requirement.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Apr 04, 2011 6:34 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

OK, any Hursley developer reading this - feel free to add this to the WMB 8 requirements list!

(Yes I know there is a proper way to submit a requirement).
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Apr 04, 2011 7:50 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Here is the dead simpl shell script
Code:

find /path/to/files* -mtime +5 -exec rm {} \;

Where 5 is the number of days to age the directory contents.

Put that in a file and then setup a cron job to execute it on a daily basis.

A simple google search for
Code:

 linux purge old files


Would have answered your problem in less times than it has takes for someone to read this post.
If the script is still a mystery then go here http://www.howtogeek.com/howto/ubuntu/delete-files-older-than-x-days-on-linux/
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Apr 04, 2011 9:23 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I have a script, but thanks for the info. I didn't actually say that I couldn't do it so your comment about the time taken to look it up is a little uncalled for.

It would be better integrated into WMB, for one thing I have to run the script on all the HA or MI instance hosts that the broker might fail over to (and make sure it copes OK when the broker filesystem is not mounted).

Also the configuration of aging should really be in the application (or at least in a WMB configurable service) and not in my script..!
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Apr 04, 2011 9:35 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I have to disagree with you on the matter of the aging being integrated into broker.
This is IMHO firmly outside the scope of broker functionality.
That is not to say that it can't already be done from inside broker.
If you take the Job Execition Node Support pack and add it to your broker config it is very easy to add to a control flow.

If I were to want one thing added to Broker 8, it would be something like the Job Execution Node.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Apr 04, 2011 9:51 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

It wouldn't be compulsory to use it. And I don't think IBM are going to add just one new WMB feature at a time!

But to take a mainframe analogy, if you choose to define a GDG then it automatically handles the generations - you don't need to run a batch job overnight to do it.

I like systems to be self-managing to reduce the number of inter-dependencies. MQ is much like that - you don't need to run any overnight jobs. Expirying messages expire by themselves etc.

Files have many limitations and annoyances that messages don't have and this is one of them. It could be coded so that "n" generations are kept a bit like a GDG.

Log4 logs can be made self managing and everything should be capable of such set up, otherwise what can go wrong, will go wrong.
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 » WebSphere Message Broker (ACE) Support » file node archive housekeeping
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.