Author |
Message
|
zpat |
Posted: Mon Apr 04, 2011 6:11 am Post subject: file node archive housekeeping |
|
|
 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 |
|
 |
lancelotlinc |
Posted: Mon Apr 04, 2011 6:22 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Mon Apr 04, 2011 6:26 am Post subject: |
|
|
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 |
|
 |
zpat |
Posted: Mon Apr 04, 2011 6:34 am Post subject: |
|
|
 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 |
|
 |
smdavies99 |
Posted: Mon Apr 04, 2011 7:50 am Post subject: |
|
|
 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 |
|
 |
zpat |
Posted: Mon Apr 04, 2011 9:23 am Post subject: |
|
|
 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 |
|
 |
smdavies99 |
Posted: Mon Apr 04, 2011 9:35 am Post subject: |
|
|
 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 |
|
 |
zpat |
Posted: Mon Apr 04, 2011 9:51 am Post subject: |
|
|
 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 |
|
 |
|