[torqueusers] Rotating Log Compile Option

garrick at speculation.org garrick at speculation.org
Fri Jun 2 14:06:34 MDT 2006


On Fri, Jun 02, 2006 at 04:51:45PM +0200, Ronny T. Lampert alleged:
> >  *I would like to chime in on this, if this is implemented please make
> > an option (perhaps the default), to keep all logs.  Job/server history
> > is valuable in debugging, not to mention metric generation for use of
> > the system.
> 
> The following works like a charm; why complicate the torque code (further) ?

I agree.  This is easily handled externally however the admin sees fit.

 
> Put into /etc/cron.daily/clean_torque_logs.sh, chmod +x it:
> 
> # clean SPBS logfiles
> # 744 == keep 1 month back
> # keep accounting info 1488 == 2 months
> # -m mtime
> DEST=/usr/local/torque-home
> /usr/sbin/tmpwatch -m -d 744 $DEST/{server,mom,sched}_logs
> /usr/sbin/tmpwatch -m -d 744 $DEST/server_priv/accounting
> 
> Cheers,
> Ronny
> 
> PS: Put this into a contrib/ dir maybe, Garrick?

Sure.

I assume tmpwatch is linux-specific, so maybe something more portable?

  find $DEST/{server,mom,sched}_logs $DEST/server_priv/accounting \
    -mtime +$DAYS -exec rm -f '{}' \;




More information about the torqueusers mailing list