Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Nov 1997 09:53:48 -0700
From:      Dave Richards <dave@richcon.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   newsyslog and apache - logfiles changing their location...
Message-ID:  <346C821C.1224@richcon.com>
References:  <346BDADD.1AFC@illumen.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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