From owner-freebsd-questions Fri Nov 14 09:59:48 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA18457 for questions-outgoing; Fri, 14 Nov 1997 09:59:48 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from www.richcon.com (dave.richcon.com [207.174.22.199]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA18441 for ; Fri, 14 Nov 1997 09:59:40 -0800 (PST) (envelope-from dave@richcon.com) Received: from barney.du.edu (SL-52.ducomm.du.edu [130.253.6.52]) by www.richcon.com (8.8.5/8.8.5) with SMTP id KAA14772 for ; Fri, 14 Nov 1997 10:54:07 -0700 (MST) Message-ID: <346C821C.1224@richcon.com> Date: Fri, 14 Nov 1997 09:53:48 -0700 From: Dave Richards Reply-To: dave@richcon.com Organization: Richards Consulting X-Mailer: Mozilla 3.01Gold (Win95; I) MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: newsyslog and apache - logfiles changing their location... References: <346BDADD.1AFC@illumen.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, I work with an ISP here in Denver CO. We run Apache on FreeBSD as our primary web server. Recently we've began logging traffic from select client web sites and I've used 'newsyslog' to tell the system to turn over the log files monthly. I started using newsyslog for this purpose on November 11th, 3 days ago, and then rebooted after I was finished. Ever since installation, we've seen strange behavior from newsyslog.. it seems like the system cannot decide which logfile to write to, and has switched back and forth two times thus far between * and *.0 Here's some more info: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bash$ ls -l total 122 -rw-rw-r-- 1 root www 26628 Nov 14 10:36 illumen.com-access_log -rw-r--r-- 1 root www 34381 Nov 12 15:12 illumen.com-access_log.0 bash$ after I reload their web page... bash$ ls -l total 124 -rw-rw-r-- 1 root www 27729 Nov 14 10:40 illumen.com-access_log -rw-r--r-- 1 root www 34381 Nov 12 15:12 illumen.com-access_log.0 bash$ GREAT! this is how it should work.. but the first couple days after newsyslog was instituted, the log was mysteriously and without doubt being written to *.0 for all our websites, while the main logfiles (such as illumen.com-access_log) was 'dead in the water' and just sat there with a single line: "Nov 11 14:00:00 mail newsyslog[375]: logfile turned over" while all transfers were being logged to illumen.com-access_log.0 This alone tested my reasoning, since Apache was told to specifically use illumen.com-access_log (with no .0 extension) as its Transfer logfile. Here are relevant file sections: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ my /etc/crontab entry: # rotate log files every hour, if necessary 0 * * * * root /usr/sbin/newsyslog my /etc/newsyslog.conf, set up for a monthly (30-day) rotation of the logfiles # logfilename owner.group mode count size time [ZB] # Rotate logfiles monthly for our web clients /httpd/htdocs/afninc/logs/afninc.com-access_log 664 12 * 720 /httpd/htdocs/illumen/logs/illumen.com-access_log 664 12 * 720 /httpd/htdocs/zb/logs/ziggyziggy.com-access_log 664 12 * 720 /httpd/htdocs/garlic/logs/garlicgarlic.com-access_log 664 12 * 720 /httpd/htdocs/homeport/logs/thehomeport.com-access_log 664 12 * 720 my (Apache) /httpd/conf/httpd.conf file entry: TransferLog /httpd/htdocs/illumen/logs/illumen.com-access_log None of the above files or filepaths have been changed or muddled with since newsyslog was instituted. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Has anyone else seen this sort of flakiness out of newsyslog-Apache? Thanks for any insights. > Enrique Krajmalnik (ekraj@illumen.net) wrote: > > > > Dave, I really do not understand when the log files are supposed to turn > > over. It look slike the log files that are getting updated now do not > > have the .0 extension. > Ok, I saw it too.. this is really weird, considering yesterday it was writing to the other ones.. I'll check freebsd's mailing list archive to see if anyone else has seen this kind of behavior. In the meantime, lets see if it flips logging back to the .0 again. If all goes well it will continue to write to the orginal logfile and stop screwing with us. Dave ****************************************************** David A Richards CNE, Network Consultant Email mailto:dave@richcon.com Phone (303)-639-5657