From: Venky Shankar Date: Mon, 6 Aug 2018 07:20:35 +0000 (-0400) Subject: mds: add counter for tracking cap non-responding clients X-Git-Tag: v14.0.1~486^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f2de92712a98568b0d07a795f1158868caae550;p=ceph.git mds: add counter for tracking cap non-responding clients Signed-off-by: Venky Shankar --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 21e59f263f99..27252fa8364a 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -107,6 +107,8 @@ void Server::create_logger() plb.add_u64_counter(l_mdss_handle_client_session, "handle_client_session", "Client session messages", "hcs", PerfCountersBuilder::PRIO_INTERESTING); + plb.add_u64_counter(l_mdss_cap_revoke_eviction, "cap_revoke_eviction", + "Cap Revoke Client Eviction", "cre", PerfCountersBuilder::PRIO_INTERESTING); // fop latencies are useful plb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL); @@ -842,8 +844,12 @@ void Server::evict_cap_revoke_non_responders() { << client << dendl; std::stringstream ss; - mds->evict_client(client.v, false, g_conf()->mds_session_blacklist_on_evict, - ss, nullptr); + bool evicted = mds->evict_client(client.v, false, + g_conf()->mds_session_blacklist_on_evict, + ss, nullptr); + if (evicted && logger) { + logger->inc(l_mdss_cap_revoke_eviction); + } } } diff --git a/src/mds/Server.h b/src/mds/Server.h index 36bbbbbe51c1..44521d7477de 100644 --- a/src/mds/Server.h +++ b/src/mds/Server.h @@ -71,6 +71,7 @@ enum { l_mdss_req_setxattr_latency, l_mdss_req_symlink_latency, l_mdss_req_unlink_latency, + l_mdss_cap_revoke_eviction, l_mdss_last, };