Mailing List Archive

Log rotating?
Hi guys,

Just a quick question: does conserver rotate any of its own logs, or should
we use our own log rotating scripts?

Thanks!

--
Bruce Z. Lysik <eldrik@logrus.com> http://www.logrus.com/~eldrik
Re: Log rotating? [ In reply to ]
>Just a quick question: does conserver rotate any of its own logs, or should
>we use our own log rotating scripts?

It does not roll its own.

I store my "live" log files in /var/adm/consoles/current. I run the
attached cs.swap script at the start of each month. It creates a new
archive area (/var/adm/consoles/archive/YYYY-MM-DD) and renames the live
log files into the archive area. Then it pre-creates each new log file
with a little message that the swap happened (and showing a timestamp
of when the log file begins):

+++ console1.cc.purdue.edu console log swap: 2002-06-01 08:12:21

Then it HUP's conserver to cause it to switch to the new files. Finally,
it goes through the archived files and appends a message like the above
to show when the file was terminated, and then it gzip's them.

Like most of my script coding, you can set the DEBUG environment variable
to "print" (or "echo") as you run the script to see what it would do:

DEBUG=print cs.log console log swap

In other words, make sure you test this before running it for real. I
don't trust my own code. You shouldn't either :-).

>Bruce Z. Lysik

John R. Jackson, Technical Software Specialist, jrj@purdue.edu
Re: Log rotating? [ In reply to ]
In message <200206281737.g5SHbFan022322@gandalf.cc.purdue.edu> you write: