[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Truncate, rotate or archive history file?


Thanks for this. Now I know that I don't have to take special measure (HUPing daemons, etc), I'll just do a logrotate config file.

Thanks for your help,

On Wed, 1 Feb 2006, Daniel Forrest wrote:


Our HISTORY files on each of our Condor nodes is getting large. Is
there some way to safely truncate and archive this file without
shutting down a daemon, or configure it to be done automatically?

You can just "mv" it to a new name, a new file will be created.

What I do is keep a hard link to "history" named "history.YYYYMM".
At the start of the month I can simply delete "history".  In this case
I also create a new "history" myself so I can make a new hard link.

I do this automatically with a cron job:

0 0 1 * * cd /exports/condor/spool && rm history && touch history && ln history $(date +history.\%Y\%m)

Chris Green, MiniBooNE / LANL. Email greenc@xxxxxxxx
Tel: (630) 840-2167. Fax: (630) 840-3867