Hi,

make sure that if you are using multilog that you pass the argument -t
This is needed, because the logs timestamps are in tai format (e.g.
@4003829some odd number)
-t makes sure that these numbers are first converted to localtime Format So
the Script can determine the day.
The Script uses the command tailocal. If this is named tai64nlocal on your
machine make a symlink or edit the code.

after the script has determined the date of the logentry it pipes it through
localtai, and converts it to a timestring that is suitable for qmailanalogs
matchup. Besides by after converting it gets passed through matchup right
away and is then packed into a gzipped archive.

And by the way make sure that you submit the -s switch. There is a bug in
the code close to unlink, which won't delete the old logfiles, but wil in
future releases. The -s switch will make sure that the logs stay in place.

After that you should be set.

Hope that helps. Let me know.

kind regards
Juergen Hoffmann

----- Original Message -----
From: "Shao Ming" <[EMAIL PROTECTED]>
To: "Jürgen Hoffmann" <[EMAIL PROTECTED]>
Sent: Friday, February 09, 2001 12:24 AM
Subject: Re: qmailloganalyzer


> Hi!
>
> first of all, I did make another change to your script.
> The script cough out the following error
>
> sh: localtai: command not found
>
> so I make a change to line 74
> $localtai   = "./localtai";
>
> I ran the script without any arguments.
>
> The system is Redhat Linux 6.2 and the perl version is as below ...
>
> # perl -v
>
> This is perl, version 5.005_03 built for i386-linux
>
> Copyright 1987-1999, Larry Wall
>
> Perl may be copied only under the terms of either the Artistic License or
> the
> GNU General Public License, which may be found in the Perl 5.0 source kit.
>
> Complete documentation for Perl, including FAQ lists, should be found on
> this system using `man perl' or `perldoc perl'.  If you have access to the
> Internet, point your browser at http://www.perl.com/, the Perl Home Page.
>
> The scripts did create lots of qmail-xxxxxxx.gz logs around in the same
> directory.
>
> cheers!
>
>
> ----- Original Message -----
> From: "Jürgen Hoffmann" <[EMAIL PROTECTED]>
> To: "Shao Ming" <[EMAIL PROTECTED]>
> Sent: Friday, February 09, 2001 7:07 AM
> Subject: Re: qmailloganalyzer
>
>
> > Hi,
> >
> > what arguments did you give to the script? match writes out pending
> message
> > on Dsecriptor five. I have not found a way to solve this. What Perl
> Version
> > are you using?
> >
> > kind regards
> >
> > Juergen Hoffmann
> >
> > ----- Original Message -----
> > From: "Shao Ming" <[EMAIL PROTECTED]>
> > To: "Jürgen Hoffmann" <[EMAIL PROTECTED]>
> > Sent: Friday, February 09, 2001 12:05 AM
> > Subject: Re: qmailloganalyzer
> >
> >
> > > Here some error I have encountered in my initial run.
> > >
> > > Not enough arguments for mkdir at ./qmailloganalyzer.pl line 78, near
> > > "$outputdir }"
> > > Not enough arguments for mkdir at ./qmailloganalyzer.pl line 182, near
> > > ""$outputdir/$year" }"
> > > Not enough arguments for mkdir at ./qmailloganalyzer.pl line 183, near
> > > ""$outputdir/$year/$month" }"
> > > Not enough arguments for mkdir at ./qmailloganalyzer.pl line 184, near
> > > ""$outputdir/$year/$month/$day" }"
> > > Not enough arguments for mkdir at ./qmailloganalyzer.pl line 222, near
> > > ""$outputdir/$year" }"
> > > Not enough arguments for mkdir at ./qmailloganalyzer.pl line 223, near
> > > ""$output}
> > >
> > > so I append the MODE 0777 behind the parameter.
> > >
> > > Now it run but give me the following error ...
> > >
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > > matchup: fatal: unable to write fd 5: file descriptor not open
> > >
> > > <had to CTRL-C to get out of the endless loop>
> > >
> > > Hope the above help ...
> > >
> > > cheers!
> > >
> > >
> > > ----- Original Message -----
> > > From: "Jürgen Hoffmann" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Friday, February 09, 2001 2:51 AM
> > > Subject: qmailloganalyzer
> > >
> > >
> > > > Hi all,
> > > >
> > > > I know this might not be the right list, but since I am using
multilog
> > > with
> > > > qmail + vpopmail and I could not find anything that would do good
> > > logparsing
> > > > I thought that I might be best of writing my own perl script which
> > > utilizes
> > > > qmailanalog to its full extent.
> > > >
> > > > The Script takes a logfile with tai format converts it to tailocal
to
> > > > determine the correct date. Afterwards pipes it back through
localtai
> to
> > > get
> > > > it back back to the taiformat that qmailanalog needs. Then passes it
> > > through
> > > > matchup and gzips all the files to a directory of your liking for
> > > archiving.
> > > > Then it uses all these archived logfiles and pipes them through the
> > > various
> > > > qmailanalog scripts zoverall, senders, etc. and outputs the result
to
> a
> > > > webdir of your liking.
> > > > It saves the result in static html pages in a hierarchichal
structure,
> > so
> > > > you get can view your results over the periods of time.
> > > >
> > > > command line options to the script are:
> > > > b - basename this is the prefix of the lognames if you don't like
> qmail
> > > set
> > > > it different (qmail-yyyymmdd.gz is default)
> > > > d - archive directory (defaults to ".")
> > > > s - do you want to save the source logs (default is "no")
> > > > t - pipe the logs through tailocal before parsing (default is "no")
> > > > z - compression (look at the source code (sorry) defaults to
standard
> > .gz)
> > > > m - path to qmailanalog binary files (defaults to
> > > > /usr/local/qmailanalog/bin)
> > > > o - outputdirectory (defaults to /var/www/maillog)
> > > >
> > > > You can see an example of the output at
> http://www.web-4-all.de/maillog
> > > >
> > > > AGAIN This is only for multilog.
> > > >
> > > > Please let me know if this software is useful to you and don't
> hesitate
> > to
> > > > contact me if you have any questions. I will post the script to the
> > qmail
> > > > mailing list later on, or maybe one of you guys can do it for me,
> since
> > I
> > > am
> > > > really busy at the moment.
> > > >
> > > > I will setup a website also which will be available via
> > > > http://qmaillog.byteaction.de by the end of the month.
> > > >
> > > > Planned features include graphs, Column Totals where column totals
> ought
> > > to
> > > > be.
> > > >
> > > > Any other feature requests?
> > > >
> > > > Ken feel free to distribute this with vpopmail if you want to.
> > > >
> > > > kind regards
> > > >
> > > > Juergen Hoffmann
> > > >
> > > > P.S. the qmailloganalyzer.css has to be copied to the root directory
> of
> > > your
> > > > webserver for it to work. If you do not use it the results will look
> > > crabby.
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Reply via email to