Just in case this is of any use to anyone else out there, I've been
using a quick little PERL program to clean up my tcpserver logs which
are output to syslog (no, I don't use multilog, because I send all my
logs to a remote server over our network and don't keep them locally for
long).

I use:

cat /var/log/maillog \
  | qmail-syslog-cleanup.pl \
  | matchup \
  > /tmp/qmail-log-matched.dat

... and then process that file with the various z* programs from
qmailanalog.

qmail-syslog-cleanup.pl:
#!/usr/bin/perl

while (<>)
{
 if (/tcpserver/) {
  s/(.*: )(\d*\.\d* .*)/$2/;
  print $_;
 }
}

Incidentally, if anyone has a better/faster version, feel free to tell
me.

--
Michael T. Babcock (PGP: 0xBE6C1895)
http://www.fibrespeed.net/~mbabcock/



Reply via email to