Qmail
[Top] [All Lists]

Re: multilog s16777215 limit

To: qmail@list.cr.yp.to
Subject: Re: multilog s16777215 limit
From: John Simpson <jms1@jms1.net>
Date: Tue, 28 Nov 2006 17:01:59 -0500
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
In-reply-to: <20061127171313.530984.8468acac@strangecode.com>
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <20061127171313.530984.8468acac@strangecode.com>
On 2006-11-27, at 2013, Quinn Comendant wrote:
I just learned that multilog has a maximum file size limit of 16777215 bytes. For me that hardly saves 5 hours of SMTP traffic. I'm looking for a way to save 24 hours of data rather than doing it by a filesize limit... any way to do this? Either a 24hours limit or a larger size limit? Yes, I know the logs are rolled back and I can cat them together, but I'm looking for convenience. 16 MB is a tiny log file.

this is a script that i run as a cron job every hour. it goes through /service/*/log/main and finds all of the "@*.[su]" files, runs them through tai64nlocal, and adds them to /var/log/ {service}.YYYY-MM-DD automatically... which gives me per-day log files for all of the services i manage using daemontools.

if you run it with the "-a" parameter, it sends an ALRM signal to each multilog process and waits two seconds before looking for "@*. [su]" files, so it can "force a cut-off at midnight" if you have a need for such a thing.

i also run all of my multilog processes with "n1024 s1048576". none of my services come anywhere close to 1GB per hour of log data, so i've never been an issue- although if i did have a high-traffic service, i would raise these parameters accordingly, or just run this script more often.

i know it's not as automatic as you would like, but it's already written, it works, and it's free (in the GPLv2 sense of the word.)

http://qmail.jms1.net/scripts/convert-multilog

--------------------------------------------------
| John M. Simpson - KG4ZOW - Programmer At Large |
| http://www.jms1.net/           <jms1@jms1.net> |
--------------------------------------------------
| Mac OS X proves that it's easier to make UNIX  |
| pretty than it is to make Windows secure.      |
--------------------------------------------------


Attachment: PGP.sig
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>