BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} BBOUT extremely large on bb16e1
On Fri, 2006-03-24 at 21:37 +0000, Philip Clark wrote:
> I posted this earlier, but it hasn't appeared yet. Apologies if
> it shows up twice.
>
> On Sat, 2006-03-25 at 01:47, Joshua Au wrote:
> > Hi,
> >
> > Is there an available script that I could use for bb16e1 to rotate the
> > logs?
>
What we do is modify runbb.sh very slightly to include a 'rotate' option
after the stop/start ones:
rotate )
DATESTAMP=`$DATE "+%m-%d-%Y"`
$CP $BBHOME/BBOUT $BBHOME/BBOUT.$DATESTAMP
$CAT /dev/null > $BBHOME/BBOUT
gzip $BBHOME/BBOUT.$DATESTAMP
echo "Big Brother log rotated on $DATESTAMP"
$FIND $BBHOME -type f -name "BBOUT.*gz" -mtime +200
-exec $RM -f {} \;
exit 0
;;
Then simply in the BB users crontab we put:
1 0 1 * * $HOME/bb/runbb.sh rotate >/dev/null
to rotate the BBOUT once a month.
John.
--
---------------------------------------------------------------
John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914
E-mail: John.Horne@plymouth.ac.uk Fax: +44 (0)1752 233839
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index