Page 1 of 1

Any useful utilities to clean up old log files?

Posted: Mon Jul 05, 2010 1:42 pm
by MarioRubbo
Hello everyone:
Working on my first real, long-term TM1 engagement and I'm noticing some maintenance issues. E.g. The log directory continues to grow and eat up space. Does anyone have any best-practice utilities/suggestions for maintaining the log directory: e.g. batch file to bring down server every night and delete all log files, etc.

Re: Any useful utilities to clean up old log files?

Posted: Mon Jul 05, 2010 2:17 pm
by kpk
Hello,

Some hints:
1. You can set a LoggingDirectory= parameter in the cfg file to avoid tons of log files in your model directory.
2. You can turn the logging off temporary for selected cubes in TI processes to avoid useless logs.
3. You can turn the logging off permanently for selected cubes from a TI process or from the Server Explorer (Cubes > Security Assignments ...).
4. You can zip/rar the old log files efficiently.

Regards,
Peter

Re: Any useful utilities to clean up old log files?

Posted: Mon Jul 05, 2010 4:32 pm
by rkaif
Mario,

I agree with Peter.

You can set the LoggingDirectory parameter in the TM1S.CFG file and assign a different folder/drive where your log files will be stored.

Then you can use simple DOS Batch (*.BAT) files to copy/delete these log files every night. If you want to archive these files instead of deleting them (Recommended practice)You can also use WinZip command line utility (free utility) to compress your log file. Syntax will look like:

Code: Select all

DOS> Winzip32.exe -a -p -r <target location\ZIPfilename> "<source location\*.*>"
You can put the above DOS command in a BAT file and then you can either use Windows Scheduler or TM1 Chore to run this BAT file at a specific time automatically.

Hope this helps!

Re: Any useful utilities to clean up old log files?

Posted: Mon Jul 05, 2010 8:53 pm
by Alan Kirk
rkaif wrote: You can set the LoggingDirectory parameter in the TM1S.CFG file and assign a different folder/drive where your log files will be stored.

Then you can use simple DOS Batch (*.BAT) files to copy/delete these log files every night.
I completely agree with sending the log files to their own directory (and Peter's other suggestions), but not so much with archiving them every night. The log files are used when you use the View Transaction Log... feature to search for the user who made a particular entry. If you're OK with being able to search for only one day's worth of entries (or if you do as we do and load the logs into a database so that we can search on multiple criteria, as we often have to), then it's not a problem. Otherwise I'd suggest planning your archiving based on how much you expect to need to search.

Re: Any useful utilities to clean up old log files?

Posted: Mon Jul 05, 2010 10:05 pm
by rkaif
I agree with Alan. I think I miss some point in my last post.

The Administrator has to decide how much Transaction History (Log file) is required by the company. Recommended practice should be to keep the log files at least for certain period. If not, then Archiving them will be the second option. I personally think Archiving any files is better then deleting them. Archives may help if you want to see the previous entries for any odd reason.

You can choose not to archive and just delete the Logs. But once again it all depends on your company policy & requirement.

Re: Any useful utilities to clean up old log files?

Posted: Tue Jul 06, 2010 8:29 am
by Steve Vincent
We archive them monthly but keep a minimum of one rolling month of logs in the server directory should we need quick access to some recent transaction history. On a number of occasions we have needed to trawl thru old logs to see why data had changed, so we never delete them.