Hi all,
I want to hijack this thread a little because it sounds like
OP has similar problem to mine.
I'm rotating logs with newsyslog and for example for web logs
I keep 12 logs available (actually it looks like count=12 keeps 13
files available but anyway that's not my problem..), rotated monthly so I
have logs from present moment to one year back like this:
# ls access_log* | sort -n -k 2 -t .
access_log
access_log.0.gz
access_log.1.gz
access_log.2.gz
access_log.3.gz
access_log.4.gz
access_log.5.gz
access_log.6.gz
access_log.7.gz
access_log.8.gz
access_log.9.gz
access_log.10.gz
access_log.11.gz
access_log.12.gz
The newsyslog.conf looks like this:
/path/access_log vhost3:wheel 640 12 * $M1D0 Z
My problem is that when I want to produce something based on those
files, it is very hard to know the time range of the actual contents.
Any pointers? I would rather keep using the newsyslog from base
than install anything from ports, as someone suggested syslog-ng already.
I'm using www/visitors to produce something meaningful from those
logs, and I would like to generate stats just once for a certain
time period so I can later see stats further than one year that newsyslog
keeps.
--
Antti Harri