> One other thing now. I want to use multilog to log on > machines not running supervise, because we just want > simple set up and I want to be able to parse the log > files through either qmailanalog or qmail-mrtg (any > recommendations here?). Is this easy to do? Sure, just replace 'splogger' in your qmail-start invocation (/var/qmail/rc in the INSTALL directions) with the appropriate 'multilog' line. qmailanalog won't correctly handle the new timestamps that the newest multilog uses, but there are ways to work around that - I've attached two relevant messages. -- gowen -- Greg Owen -- [EMAIL PROTECTED]
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.
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