FW: qmailanalog and multilog
Not using the patches from www.qmail.org, but this works for me Script to convert to a format qmailanalog likes #!/usr/bin/perl while () { if (my($s,$t,$rest)=/^\@.(\w{15})(\w{8})(.*)/) { $s = hex($s); $t = hex($t); $t =~ s/500$//; $_ = "$s.$t$rest\n"; } } continue { print; } exit 0; Script to process the logs and mail to me #!/bin/sh PATH=/usr/local/qmailanalog/bin:/var/qmail/bin:/bin:/usr/bin QMAILLOG="/tmp/q.$$" QMAILTMP="/tmp/r.$$" umask 077 cat /var/log/qmail/@* $QMAILTMP cat /var/log/qmail/current $QMAILTMP cat $QMAILTMP | tai64n2time | matchup $QMAILLOG 5/dev/null DATE=`date +'%a %d %b'` (echo "To: [EMAIL PROTECTED]" echo "From: [EMAIL PROTECTED]" echo "Subject: Qmail daily report $DATE" echo "" zoverall $QMAILLOG) | qmail-inject rm -f $QMAILLOG rm -f $QMAILTMP -Original Message- From: kbo [mailto:kbo]On Behalf Of Ken Jones Sent: Wednesday, June 07, 2000 3:29 PM To: [EMAIL PROTECTED] Subject: qmailanalog and multilog Does anyone have a patch to qmailanalog to read the new multilog time format? Ken Jones inter7
qmailanalog and multilog
Does anyone have a patch to qmailanalog to read the new multilog time format? Ken Jones inter7
Re: qmailanalog and multilog
On 07-Jun-2000, Ken Jones wrote: Does anyone have a patch to qmailanalog to read the new multilog time format? It's not a patch like you want, but in case you want to know how to make it work: I use a C program called tai64nfrac found on qmail.org to filter the log before feeding to qmailanalog's matchup. Ronny
Re: qmailanalog and multilog
Ken Jones writes: Does anyone have a patch to qmailanalog to read the new multilog time format? There's two (2) patches to create a program which accepts multilog time format (tai64n) and rewrites it into fractional seconds (taifrac) format. They're listed on www.qmail.org. -- -russ nelson [EMAIL PROTECTED] http://russnelson.com Crynwr sells support for free software | PGPok | "Ask not what your country 521 Pleasant Valley Rd. | +1 315 268 1925 voice | can force other people to Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | do for you..." -Perry M.