Bill Kwok wrote: > 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.
You're right in that mrtg has its own data. That's great. I'm getting clearer now understanding when/how mrtg gets its data. It would seem to me that it would need to look at the most recent *.s saved log just once to pick up the tail end, if the log had 'rolled' since the last time mrtg ran. It appears that cron runs mrtg every 5 minutes as you said, so any *.s file older than, say, 10 minutes would safely be finished as input to mrtg. > 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. This is true. I was thinking, though, that it would be nice to have a log archival facility too. That way logs would be archived in a consistent way on all toasters (using qtp). Then we wouldn't need an option to specify directories. qmlog would know where to go to find them. > Of course, if > it's not much trouble, I will prefer to have the option to define > directory. :) I'm hoping that you (and we) won't need it. ;) > Thanks again. > > Best regards, > Bill > > > On 11/24/06, *Eric Shubes* <[EMAIL PROTECTED] <mailto:[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' > -- -Eric 'shubes' --------------------------------------------------------------------- QmailToaster hosted by: VR Hosted <http://www.vr.org> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
