Stuart Young writes:
 > At 05:27 8/01/99 -0000, Russell Nelson wrote:
 > >Is anybody using MRTG to track the performance of qmail?  Any code
 > >they wish to share?
 > 
 > Aside from that, how are you planning on extracting performance info for
 > qmail?

I was figuring on using qmail-analog with a filter that sucked out the 
last five minute's worth of data.  Something like this:

#!/usr/bin/perl

$stop = $^T;
$seconds = 5*60 - $stop % (5*60);
$seconds = 0 if ($seconds == 5*60);
$stop -= $seconds;
$start = $stop - 5*60;

open(QA, "|/usr/local/bin/qmailanalog/matchup >out.$$ 5>pending.mrtg") or die;
open(P, "<pending.mrtg") or die;
while(<P>) print QA;
close(P);
while(<>) {
    split;
    next if ($_[0] < $start || $_[0] >= $stop);
    print QA;
}

Then you'd run one of the z* programs, and reformat the output for
MRTG's sake.

-- 
-russ nelson <[EMAIL PROTECTED]>  http://crynwr.com/~nelson
Crynwr supports Open Source(tm) Software| PGPok |   There is good evidence
521 Pleasant Valley Rd. | +1 315 268 1925 voice |   that freedom is the
Potsdam, NY 13676-3213  | +1 315 268 9201 FAX   |   cause of world peace.

Reply via email to