Skip site navigation (1)Skip section navigation (2)
Date:      22 Apr 2000 20:19:04 -0000
From:      "Arcady Genkin"@soup.thpoon.com, antipode@thpoon.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   conf/18164: Dealing with ntpstats files in /var/log/ntpstats 
Message-ID:  <20000422201904.44103.qmail@soup.thpoon.com>

next in thread | raw e-mail | index | archive | help

>Number:         18164
>Category:       conf
>Synopsis:       /var/log/ntpstats fill with stat files by default
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          wish
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 22 13:20:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Arcady Genkin
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
N/A
>Environment:

FreeBSD 4.0, stock ntpdate.

>Description:

By default, if "xntpd_enable" is set to "YES" in rc.conf, divectory
/var/log/ntpstats fills with stat files quite rapidly.

In four months this directory accumulated over 7 megabytes of files, which
is close to half size of my /var/partition (20 Mb, which should be sufficient
IMHO).

I think that there should be a script "clean-ntpstats" in /etc/periodic/daily
that would clean up this directory, removing files that are older than, say
three days.

>How-To-Repeat:

Set "xntpd_enable" to YES in /etc/rc.conf.

>Fix:

Place this script in /etc/periodic/daily:

--------------8<--------------8<---------------

#!/bin/sh 
# 
# /etc/periodic/daily/160.clean-ntpstats 
# 
 
if [ -d /var/log/ntpstats ] ; then 
        echo "" 
        echo "Removing stale files from /var/log/ntpstats:" 
 
        cd /var/log/ntpstats && find * -atime +3 -delete 
fi


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000422201904.44103.qmail>