Hi folks
Has anyone ever wondered about the number of logfiles in /var/log/ntpstats. Those are
built and cycled by the ntpsimpl package. Unfortunately they don't seem to get removed
after a while, although this is suggested by /etc/cron.daily/ntpsimpl. Here is a
modified version which appears to work correctly in Bering 1.x
#!/bin/sh
# the default Debian ntp.conf enables logging of various statistics to the
# /var/log/ntpstats directory. the daemon automatically changes to a new
# datestamped set of files at midnight, so all we need to do is delete old
# ones, and compress the ones we're keeping so disk usage is controlled
LOGDIR=/var/log/ntpstats
if [ -d $LOGDIR ]
then
# only keep a week's depth of these
# beware, this is Bering 1.2 Busybox dialect
rm -f `find $LOGDIR -type f -mtime -7`;
# compress whatever is left to save space
filelist=`find $LOGDIR -name loopstats.\* -type f | grep -v .gz`;
[ "$filelist" != "" ] && gzip $filelist ;
filelist=`find $LOGDIR -name peerstats.\* -type f | grep -v .gz`;
[ "$filelist" != "" ] && gzip $filelist ;
fi
Have fun
Erich
THINK
P�ntenstrasse 39
8143 Stallikon
mailto:[EMAIL PROTECTED]
PGP Fingerprint: BC9A 25BC 3954 3BC8 C024 8D8A B7D4 FF9D 05B8 0A16
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html