Any useful utilities to clean up old log files?

Post Reply
MarioRubbo
Posts: 44
Joined: Wed Nov 04, 2009 3:50 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2007

Any useful utilities to clean up old log files?

Post 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.
kpk
MVP
Posts: 214
Joined: Tue Nov 11, 2008 11:57 pm
OLAP Product: TM1, CX
Version: TM1 7x 8x 9x 10x CX 9.5 10.1
Excel Version: XP 2003 2007 2010
Location: Hungary

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

Post 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
Best Regards,
Peter
User avatar
rkaif
Community Contributor
Posts: 328
Joined: Fri Sep 05, 2008 6:58 pm
OLAP Product: IBM Cognos TM1
Version: 9.1 or later
Excel Version: 2003 or later

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

Post 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!
Cheers!
Rizwan Kaif
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

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

Post 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.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
User avatar
rkaif
Community Contributor
Posts: 328
Joined: Fri Sep 05, 2008 6:58 pm
OLAP Product: IBM Cognos TM1
Version: 9.1 or later
Excel Version: 2003 or later

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

Post 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.
Cheers!
Rizwan Kaif
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

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

Post 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.
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Post Reply