Page 1 of 1

Remove log entries

Posted: Sat Apr 22, 2017 3:14 pm
by Nagac
Hi

I want to remove all job log entries created 5 days before through command prompt.

I know we can use CLEAR.FILE RT_LOG<Job Number> to remove whole log entries for job, but can some one suggest how to remove only unnecessary entries. DS Director allows to do these but we are not allowed to login.

Also, please advise if i can run CLEAR.FILE for whole project?

Thanks

Re: remove log

Posted: Sat Apr 22, 2017 3:46 pm
by chulett
Nagac wrote:Also, please advise if i can run CLEAR.FILE for whole project?
As in all at once? No, not that I've ever seen. It is strictly one by one.

For your "unnecessary" ones I suppose you could write a script to check the directory age and then run CLEAR.FILE on the ones that meet your criteria. Make sure you are aware that clearing the log like that will also remove the Auto Purge rules entry for it... or at least that was how it worked in the past, perhaps that is no longer the case.

Posted: Sat Apr 22, 2017 7:08 pm
by PaulVL
Well, if you absolutely want to chop it at 5 days max, then I would set the project limit to 5 days, then create a short script that does a reset on each job that is not currently running.

A reset will put an entry into the job log.
The job will auto purge based upon 5 days.

After your script runs, you now have the option to reset the auto purge duration. Keep in mind that you failed to purge any job that was currently running since the purge happens at the start of the job, not in the middle.