Re: qmailanalog usage
Brett Leeder <[EMAIL PROTECTED]> wrote: > > Hi Charles, This qlogselect app from qlogtools doesn't appear to be in the > latest release of qlogtools. Someone else noticed that last week. All I have around is an i386 RPM of qlogtools-3.0-1; if that will do, you can grab it at http://www.qcc.sk.ca/~charlesc/software/rpms/qlogtools-3.0-1.i386.rpm . In the meantime, post a note to the author on his bgware mailing list. See untroubled.org for the subscription address. Charles -- --- Charles Cazabon<[EMAIL PROTECTED]> GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ ---
Re: qmailanalog usage
> Mark Douglas wrote: > > I'm trying to figure out how I should get the stats I want out of > qmailanalog, along with some other things I'd like to do. My main > issue is, if I wanted to do a daily log rotation, would it be feasible > to do the following (using multilog): Set my logfile size to 100MB; at > end of day, have a cron job run that copies the "current" file to > another, dated file; echo > /var/log/qmail/current to empty out the > log file and start fresh. I realize it's not pretty, but the real > issue is, would it cause problems? > > Thanks, > > Mark Douglas - Architecture > Sympatico-Lycos Inc. > All your base are belong to us! Make your time! There is a patch written by William Baxter for multilog that causes it to rotate logs ASAP upon receiving SIGHUP. You can find it at http://www.superscript.com/patches/multilog.c.hup Mike
Re: qmailanalog usage
Charles Cazabon wrote: > Mark Douglas <[EMAIL PROTECTED]> wrote: > > I'm trying to figure out how I should get the stats I want out of > > qmailanalog, along with some other things I'd like to do. My main issue is, > > if I wanted to do a daily log rotation, would it be feasible to do the > > following (using multilog): Set my logfile size to 100MB; at end of day, > > have a cron job run that copies the "current" file to another, dated file; > > echo > /var/log/qmail/current to empty out the log file and start fresh. I > > realize it's not pretty, but the real issue is, would it cause problems? > > Yes -- each message has multiple log lines associated with it. You'll likely > get some messages which cross over your arbitrary per-night boundaries. qmail > won't be able to include those messages in its analysis if you just analyze > one log at a time. > > However, it's probably going to have a negligible impact on the overall > statistics. I posted a shell script to this list last week which does exactly > what you want, suitable for use as a nightly cron job. And because it uses > qlogselect from Bruce Guenter's qlogtools package, you don't need to rotate > the scripts nightly to split the statistics up per-day -- qlogselect will > automatically extract the log entries for a time period you specify. The > script filters it down to one day. > > Charles > -- > Hi Charles, This qlogselect app from qlogtools doesn't appear to be in the latest release of qlogtools. I recently downloaded the src code from http://untroubled.org/qlogtools/ and found that there was a man page for qlogselect but nothing else. When I compiled that package I ended up with no qlogselect app, and no mention of it in the Makefile either. Is it supposed to be part of that package or do I need to get it from elsewhere? Brett
Re: qmailanalog usage
Why not let logrotated handle your log rotation, daily if you so desire, and call qmailanalog from a postrotate block on maillog.2? We have a similar setup here, but we're rotating weekly. There's a little perl script that calls qmailanalog and sends its output to a dated file (mail-report-mm-dd-ccyy.txt). About an hour later, another script comes along and adds a pointer to the new file to the reports index. It's only been in place for a few weeks, but it seems to be working fine. That actually reminds me of another question I've been thinking about. Now that I have these nifty statistics, I'd like to know how to interpret them. Sure, I know what 'delivery attempts' means, but what's a good number for that? How high is too high when it comes to average qtime? Is there a document somewhere that outlines that? Perhaps it's not even relevant - after all, the qmailanalog report seems to say more about the servers I'm sending to than my server. cheers, Todd At 08:23 PM 6/25/01, Mark Douglas wrote: >I'm trying to figure out how I should get the stats I want out of >qmailanalog, along with some other things I'd like to do. My main >issue is, if I wanted to do a daily log rotation, would it be feasible >to do the following (using multilog): Set my logfile size to 100MB; at >end of day, have a cron job run that copies the "current" file to >another, dated file; echo > /var/log/qmail/current to empty out the >log file and start fresh. I realize it's not pretty, but the real >issue is, would it cause problems? > >Thanks, > >Mark Douglas - Architecture >Sympatico-Lycos Inc. >All your base are belong to us! Make your time!
Re: qmailanalog usage
On Mon, Jun 25, 2001 at 06:56:47PM -0600, Charles Cazabon wrote: [snip] > Yes -- each message has multiple log lines associated with it. You'll likely > get some messages which cross over your arbitrary per-night boundaries. qmail > won't be able to include those messages in its analysis if you just analyze > one log at a time. That's why qmailanalog wants to write to an fd (I think 5) and read from another (I think 6). It saves state of all uncompleted messages to this fd, and expects this saved state to be passed to it on this other fd. I probably have the fd numbers wrong, but the drift is that qmailanalog can do this just fine without losing *any* messages. Greetz, Peter -- Against Free Sex! http://www.dataloss.nl/Megahard_en.html
Re: qmailanalog usage
Mark Douglas <[EMAIL PROTECTED]> wrote: > I'm trying to figure out how I should get the stats I want out of > qmailanalog, along with some other things I'd like to do. My main issue is, > if I wanted to do a daily log rotation, would it be feasible to do the > following (using multilog): Set my logfile size to 100MB; at end of day, > have a cron job run that copies the "current" file to another, dated file; > echo > /var/log/qmail/current to empty out the log file and start fresh. I > realize it's not pretty, but the real issue is, would it cause problems? Yes -- each message has multiple log lines associated with it. You'll likely get some messages which cross over your arbitrary per-night boundaries. qmail won't be able to include those messages in its analysis if you just analyze one log at a time. However, it's probably going to have a negligible impact on the overall statistics. I posted a shell script to this list last week which does exactly what you want, suitable for use as a nightly cron job. And because it uses qlogselect from Bruce Guenter's qlogtools package, you don't need to rotate the scripts nightly to split the statistics up per-day -- qlogselect will automatically extract the log entries for a time period you specify. The script filters it down to one day. Charles -- --- Charles Cazabon<[EMAIL PROTECTED]> GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ ---
qmailanalog usage
Title: qmailanalog usage I'm trying to figure out how I should get the stats I want out of qmailanalog, along with some other things I'd like to do. My main issue is, if I wanted to do a daily log rotation, would it be feasible to do the following (using multilog): Set my logfile size to 100MB; at end of day, have a cron job run that copies the "current" file to another, dated file; echo > /var/log/qmail/current to empty out the log file and start fresh. I realize it's not pretty, but the real issue is, would it cause problems? Thanks, Mark Douglas - Architecture Sympatico-Lycos Inc. All your base are belong to us! Make your time!