On Thu, Oct 14, 1999 at 04:17:33AM +0200, Markus Stumpf wrote:
> On Wed, Oct 13, 1999 at 03:43:37PM -0700, Dongping Deng wrote:
> > Is the number of "qmail-remote" a rough measure of the current concurrent
> > deliveries?
>
> Yes.
> But it may be easier to have a look at your logfile. Watch out for lines
> like
> status: local 1/120 remote 3/120
> That tells the number of current deliveries and the max values. In this
> example there is currently 1 local of 120 max and 3 remote of 120 max
And if you are using daemontools-logging, you might want to watch your
concurrency levels with mrtg as well.
Here's a script that looks up the latest status line and reports local and
remote concurrency to mrtg:
----------------------
#!/usr/bin/perl
# qmail-mrtg-concurrency
# mrtg-script for logging qmail concurrency levels
# 1999-10-09, [EMAIL PROTECTED], http://x42.com/
# Share and enjoy
use strict;
my ($qmail_log_dir) = (@ARGV);
chop($qmail_log_dir) if $qmail_log_dir =~ m#/$#;
my ($lastfile);
opendir(DIR, $qmail_log_dir) or die;
@_ = sort readdir(DIR);
for (;;)
{
$_ = pop(@_);
die "No log files at all." unless $_;
next unless s/^\@//;
$lastfile = "$qmail_log_dir/\@$_";
last;
}
closedir(DIR);
my $status = rep " status: " $lastfile | tail -1;
if ($status =~ m#local (\d+)/\d+ remote (\d+)#)
{
print "$1\n$2\n";
}
else
{
print "0\n\0\n";
}
----------------------
In mrtg.cfg:
#-------------------------------------------------------------------
Title[concurrency]: example.com - qmail concurrency
MaxBytes[concurrency]: 1000
AbsMax[concurrency]: 10000
Options[concurrency]: gauge
Target[concurrency]: /usr/local/bin/qmail-mrtg-concurrency
/var/log/qmail/send
PageTop[concurrency]: <H1>example.com - qmail
concurrency</H1>
ShortLegend[concurrency]: Concurrency
YLegend[concurrency]: Concurrency
Legend1[concurrency]: Concurrency
LegendI[concurrency]: Local:
LegendO[concurrency]: Remote:
WithPeak[concurrency]: ymwd
#-------------------------------------------------------------------
--
magnus
-- MOST useless 1998 * http://x42.com/