Eric,

Actually, I am using MRTG.  Correct me if I am wrong, by default, MRTG will
pick up required information every 5 minutes and it has it's own set of
data.  It's not necessary for MRTG to read the old data in order to generate
charts.  As long as we don't change the current file, MRTG should have
enough time to read the required files.

But you are right, we don't need to have such feature (moving /renaming log
files) in qmlog.  qmlog should only be a log browser.  Of course, if it's
not much trouble, I will prefer to have the option to define directory. :)

Thanks again.

Best regards,
Bill


On 11/24/06, Eric Shubes <[EMAIL PROTECTED]> wrote:

Eric "Shubes" wrote:
> I'm working on enhancing qmlog and log handling in general. In
particular,
> I'm thinking of renaming the @40*.s logs to a human readable format.
>
> I'm wondering if this will wreak havoc with anything, mrtg in
particular.
> The web site that's listed in the rpm for qmailmrtg-toaster is defunct.
Can
> someone tell me off hand when/how mrtg gets its stats? Does it use only
the
> 'current' file, or does it use *.s files?

Ok, I'll answer my own post. qmailmrtg apparently uses all of the *.s
files
in an intelligent way, so it's a bad idea to do anything to them like
renaming them. Fine by me.

BillK, I'm guessing you don't need/use mrtg graphs, as I'm thinking that
your archiving methods would screw them up. For qmlog enhancements, I'm
thinking that it's best to leave the log files as they are, which means
there won't be an option for specifying log file locations. Do you really
need to move them around? I'd like to know why you think this is
necessary.
If you have a way to do this without breaking mrtg graphs, I'm all ears.

BTW, I wrote a little scriptlet to copy these files to a human readable
name. I don't recommend using it, but if you want to make copies with
human
readable names, you might find it handy. It goes something like this:

for savelog in `find /var/log/qmail -name "*.s"`; do
tempname=`basename $savelog | tai64nlocal | sed 's/ /_/'`
archfile=${tempname%\.[0-9]*\.s}.a
if [ ! -f `dirname $savelog`/$archfile ]; then
   cp $savelog `dirname $savelog`/$archfile
fi
done

You can change this to put the copy in any directory you'd like. As it is,
it puts them in the same directory as the logs.

--
-Eric 'shubes'

---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to