diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-09-02 12:47:07 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-09-02 12:47:07 +0000 |
commit | a9cd8b4f408038cc0254e16238a3f06a8d8642e1 (patch) | |
tree | a69812cfafabf38eb1ae05b4ec1a39ccd006e6c6 /usr.sbin | |
parent | 81085f102207cdc3bca81078a92f527ba109a302 (diff) |
Include mbox write errors in "show stats". Suggested by gilles.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/mda.c | 3 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpctl.c | 3 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/mda.c b/usr.sbin/smtpd/mda.c index 84ebe5821af..3405489dff5 100644 --- a/usr.sbin/smtpd/mda.c +++ b/usr.sbin/smtpd/mda.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mda.c,v 1.25 2009/09/02 11:11:10 jacekm Exp $ */ +/* $OpenBSD: mda.c,v 1.26 2009/09/02 12:47:06 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -160,6 +160,7 @@ mda_dispatch_parent(int sig, short event, void *p) sizeof(struct batch)); } else { /* XXX: remove junk from tmp/ in mdir case */ + env->stats->mda.write_error++; messagep->status |= S_MESSAGE_TEMPFAILURE; } diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index 02b03513003..562febd7ad7 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.34 2009/08/27 11:38:50 jacekm Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.35 2009/09/02 12:47:06 jacekm Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -270,6 +270,7 @@ show_stats_output(struct imsg *imsg) stats = imsg->data; + printf("mda.errors.write_system=%zd\n", stats->mda.write_error); printf("mta.sessions=%zd\n", stats->smtp.sessions); printf("mta.sessions.active=%zd\n", stats->mta.sessions_active); diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 17001345cd6..60ecd2e5ec2 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.137 2009/08/27 11:37:30 jacekm Exp $ */ +/* $OpenBSD: smtpd.h,v 1.138 2009/09/02 12:47:06 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -663,11 +663,16 @@ struct s_session { size_t delays; }; +struct s_mda { + size_t write_error; +}; + struct stats { struct s_parent parent; struct s_queue queue; struct s_runner runner; struct s_session mta; + struct s_mda mda; struct s_session smtp; }; |