Qmail
[Top] [All Lists]

Re: tai64n date format

To: qmail@list.cr.yp.to
Subject: Re: tai64n date format
From: "Vahid Moghaddasi" <vahid.moghaddasi@gmail.com>
Date: Sun, 1 Apr 2007 18:19:52 -0400
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
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZdGv3X3SbyDG6TN2QyaXoRMksATqWoADe7FEUAg1MgcKlcbIbt6EavRCPJPMwpaXVy4U9mWUlKKe7eiA/tZJErH9cfc1yYGmm7C9q92iqHPnRf8aWmjLq2ohjvZ5apHm8Flrs/js+UfRieCV4JrG1MfjoAls9AgpDnqLKjVrJyY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=V/ek+6YArl2lILqx00SM16opm4hlyytjqB6fkx8lVy3TpNbWbj1TM7tYmJj1GLw/FydQxVTKAU/e0e+yo0Rg5v1AjBmC+ohIbtm0uVcPLSYzGxIT5H7hxfQ1HWO3NEdzqgdH7Eq9Y5qfnIlgWAlC8iGBFTKY50yK2QQyJBwzyiI=
Domainkey-status: good (test mode)
In-reply-to: <20070401215106.rdrpfzm6abysx4oa@m.safari.iki.fi>
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <a3bd4fe00704011052n1132c340k1320805947292f73@mail.gmail.com> <20070401181250.GA11214@odin.dempsky.org> <a3bd4fe00704011137s6186d8c6v60f5c4d200fb47ad@mail.gmail.com> <20070401185119.gvx5onvbvokzrjsm@m.safari.iki.fi> <a3bd4fe00704011420l1edac314q10c5b1d703713505@mail.gmail.com> <20070401215106.rdrpfzm6abysx4oa@m.safari.iki.fi>
On 4/1/07, Sami Farin <safari-qmail@safari.iki.fi> wrote:

Why don't you just do "svc -h /whatever/daemon/log" at 00:00 and
process the latest @* files?

That is exactly what I do now and works on most servers but some of
our servers still have a few thousand mails in the queue at midnight
waiting for delivery.

By looking at the filename, you can figure out when
it was created.  If you used too small sNNN option,
current might contain only part of latest 24h logs.
After HUP multilog start writing to a new current (in case latest
current was > 0 bytes).

Based on the date in the filename, I move the old log files to other
directories after the HUP but that file may contain the delivery log
for more one day (what ever was written to log after midnight).


> the lines for today's date in the file.out file.
> I need to do this so I can run different reports on mail delivery.

Obviously those commands I posted are not optimized for speed.
Why don't you just feed log files to tai64nlocal and
grep for the date?  Or does the program which reads
file.out expect tai64 ?

I am using qmailanalog, that only wants TAI format in the log I suppose.

In any case, it's easy to write a program
which takes as parameter date (e.g. 20070401) and reads
tai64 log lines from stdin and only spits out lines which
match date 20070401 ...

That is what I need, a program that gives me the TAI date of whatever
regular date I input. e.g. "TAIDATE=`someprogram 2007-04-01` ; cat
qmail/current | grep $TAIDATE
Thanks,

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