From 66fd36d51fb456140d25cfe7a73b50ff899db6d6 Mon Sep 17 00:00:00 2001 From: liuchang0812 Date: Mon, 2 Jan 2017 15:53:03 +0800 Subject: [PATCH] mgr: Make stats period configurable Fixes: http://tracker.ceph.com/issues/17449 Signed-off-by: liuchang0812 --- src/common/config_opts.h | 1 + src/mgr/DaemonServer.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index cbaa937d563..8f6e62c21a2 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -1592,6 +1592,7 @@ OPTION(mgr_module_path, OPT_STR, CEPH_PKGLIBDIR "/mgr") // where to load python OPTION(mgr_modules, OPT_STR, "rest") // Which modules to load OPTION(mgr_data, OPT_STR, "/var/lib/ceph/mgr/$cluster-$id") // where to find keyring etc OPTION(mgr_beacon_period, OPT_INT, 5) // How frequently to send beacon +OPTION(mgr_stats_period, OPT_INT, 5) // How frequently to send stats OPTION(mon_mgr_digest_period, OPT_INT, 5) // How frequently to send digests OPTION(mon_mgr_beacon_grace, OPT_INT, 30) // How long to wait to failover diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 3b8def2f6e4..57d115269cc 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -165,7 +165,7 @@ bool DaemonServer::handle_open(MMgrOpen *m) << m->daemon_name << dendl; auto configure = new MMgrConfigure(); - configure->stats_period = 5; + configure->stats_period = g_conf->mgr_stats_period; m->get_connection()->send_message(configure); if (daemon_state.exists(key)) { -- 2.39.5