[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] Truncate, rotate or archive history file?
- Date: Wed, 1 Feb 2006 19:59:38 +0000
- From: Santanu Das <santanu@xxxxxxxxxxxxxxxxx>
- Subject: Re: [Condor-users] Truncate, rotate or archive history file?
One of my friends advise me this:
Create a file, say condorhistory in /etc/logrotate.d/
If you want to force a rotation now rather than waiting 1 week.
and then edit: /var/lib/logrotate.status
and change the date for this file to say the year 2004
Then run: /etc/cron.daily/logrotate
again or just wait one week. Hope that helps.
On 1 Feb 2006, at 18:10, 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)
Daniel K. Forrest Laboratory for Molecular and
forrest@xxxxxxxxxxxxx Computational Genomics
(608) 262 - 9479 University of Wisconsin, Madison
Condor-users mailing list