From antipode@soup.thpoon.com  Sat Apr 22 13:19:16 2000
Return-Path: <antipode@soup.thpoon.com>
Received: from soup.thpoon.com (cr103675-a.bloor1.on.wave.home.com [24.114.152.71])
	by hub.freebsd.org (Postfix) with SMTP id 73DFF37B644
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 22 Apr 2000 13:19:14 -0700 (PDT)
	(envelope-from antipode@soup.thpoon.com)
Received: (qmail 44104 invoked by uid 1001); 22 Apr 2000 20:19:04 -0000
Message-Id: <20000422201904.44103.qmail@soup.thpoon.com>
Date: 22 Apr 2000 20:19:04 -0000
From: "Arcady Genkin"@soup.thpoon.com, antipode@thpoon.com
Sender: antipode@soup.thpoon.com
Reply-To: antipode@thpoon.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Dealing with ntpstats files in /var/log/ntpstats 
X-Send-Pr-Version: 3.2

>Number:         18164
>Category:       conf
>Synopsis:       /var/log/ntpstats fill with stat files by default
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    roberto
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          wish
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 22 13:20:01 PDT 2000
>Closed-Date:    Mon Apr 01 12:22:57 PST 2002
>Last-Modified:  Mon Apr 01 12:22:57 PST 2002
>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:

From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To: antipode@thpoon.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: conf/18164: Dealing with ntpstats files in /var/log/ntpstats 
Date: Sat, 22 Apr 2000 16:26:04 -0400 (EDT)

 <<On 22 Apr 2000 20:19:04 -0000, "Arcady Genkin"@thpoon.com, antipode@thpoon.com said:
 
 > 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.
 
 Hmmm.  If you actually care about these statistics, three days
 probably isn't nearly long enough to be interesting.  On the other
 hand, if you don't care, there's no point in saving them at all.
 Seems like an NTP configuration problem.
 
 -GAWollman
 
 

From: Arcady Genkin <a.genkin@utoronto.ca>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Subject: Re: conf/18164: Dealing with ntpstats files in /var/log/ntpstats
Date: 22 Apr 2000 16:46:19 -0400

 Garrett Wollman <wollman@khavrinen.lcs.mit.edu> writes:
 
 > > 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.
 > 
 > Hmmm.  If you actually care about these statistics, three days
 > probably isn't nearly long enough to be interesting.  On the other
 > hand, if you don't care, there's no point in saving them at all.
 > Seems like an NTP configuration problem.
 
 No, actually I couldn't care less. ;^) My working assumption was that
 they were saved for a reason, so it would be `polite' to keep at least
 3 days' worth of them. Just in case somebody *was* looking at them.
 
 Now, if there was *no* reason for saving them at all, then we can
 include "disable stats" in /etc/ntp.conf".
 
 [... 3 minutes later ...]
 You know what, I don't remember where I got my ntp.conf from? Does
 FreeBSD provide no default ntp.conf? I only found a blank file in
 contrib/ntp/scripts/support/conf.
 
 Well, if there is no default ntp.conf, then I guess it's up to the
 user to include "disable stats" in it if he wishes to... I have
 raised this PR by mistake then, probably.
 -- 
 Arcady Genkin                                 http://www.thpoon.com
 Nostalgia isn't what it used to be.
 
Responsible-Changed-From-To: freebsd-bugs->roberto 
Responsible-Changed-By: nbm 
Responsible-Changed-When: Fri Jul 14 06:56:57 PDT 2000 
Responsible-Changed-Why:  
It seems this partly involves no default ntp.conf - care to take a look? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18164 
State-Changed-From-To: open->closed 
State-Changed-By: roberto 
State-Changed-When: Mon Apr 1 12:19:59 PST 2002 
State-Changed-Why:  
As noted in the audit trail, there is no ntp.conf file installed by 
default. Users who create one with statistics are expected to 
clean them up as well. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18164 
>Unformatted:
