dovecot-2.2: stats: If process was used for multiple sessions, s...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Aug 6 09:18:20 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/46c34f3a73a0
changeset: 18918:46c34f3a73a0
user: Timo Sirainen <tss at iki.fi>
date: Thu Aug 06 12:17:45 2015 +0300
description:
stats: If process was used for multiple sessions, some of the fields weren't set correctly.
For example the second user's disk_output was increased at startup by the
same amount as what the previous user's last disk_output value was.
diffstat:
src/plugins/stats/stats-plugin.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r 233802591cfb -r 46c34f3a73a0 src/plugins/stats/stats-plugin.c
--- a/src/plugins/stats/stats-plugin.c Tue Aug 04 11:31:17 2015 +0300
+++ b/src/plugins/stats/stats-plugin.c Thu Aug 06 12:17:45 2015 +0300
@@ -440,6 +440,11 @@
suser->to_stats_timeout =
timeout_add(suser->refresh_secs*1000,
session_stats_refresh_timeout, user);
+ /* fill the initial values. this is necessary for the process-global
+ values (e.g. getrusage()) if the process is reused for multiple
+ users. otherwise the next user will start with the previous one's
+ last values. */
+ mail_user_stats_fill(user, suser->pre_io_stats);
}
static struct mail_storage_hooks stats_mail_storage_hooks = {
More information about the dovecot-cvs
mailing list