summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-05-30 16:30:34 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-05-30 16:30:34 +0000
commitdbea9681d7cab14d00e97e47aee7096c6a6a0002 (patch)
tree19acd4c12cdcae41b3c951629299f2f627d45489 /usr.sbin/smtpd
parent72dc61e90e95b2d6dfcf03458c6827626c937da8 (diff)
- increment stats.mta.sessions_active when session is allocated in mta
- reorder alphabetically and add mta to the statistics
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/mta.c4
-rw-r--r--usr.sbin/smtpd/smtpctl.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c
index 3d94b971f9c..a208028105f 100644
--- a/usr.sbin/smtpd/mta.c
+++ b/usr.sbin/smtpd/mta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta.c,v 1.50 2009/05/27 13:14:18 jacekm Exp $ */
+/* $OpenBSD: mta.c,v 1.51 2009/05/30 16:30:33 gilles Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -371,6 +371,8 @@ mta_dispatch_runner(int sig, short event, void *p)
TAILQ_INIT(&batchp->messages);
SPLAY_INSERT(batchtree, &env->batch_queue, batchp);
+ env->stats->mta.sessions_active++;
+
break;
}
case IMSG_BATCH_APPEND: {
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index 65dd4302bb0..cf71c5c168d 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.28 2009/05/27 13:09:07 jacekm Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.29 2009/05/30 16:30:33 gilles Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -270,6 +270,9 @@ show_stats_output(struct imsg *imsg)
stats = imsg->data;
+ printf("mta.sessions=%zd\n", stats->smtp.sessions);
+ printf("mta.sessions.active=%zd\n", stats->mta.sessions_active);
+
printf("parent.uptime=%d\n", time(NULL) - stats->parent.start);
printf("queue.inserts.local=%zd\n", stats->queue.inserts_local);