ctdbd: Set num_clients statistic from ctdb->num_clients
authorAmitay Isaacs <amitay@gmail.com>
Fri, 19 Apr 2013 03:29:04 +0000 (13:29 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Mon, 22 Apr 2013 04:21:49 +0000 (14:21 +1000)
commit02e349d158cfa5413e391066e098413f981c592b
treee2a9386c48a57496e3f4cd07bcbbdcdf56e7ef6b
parent905a5a6fdf69a79574fcfff272aaa9b292eac159
ctdbd: Set num_clients statistic from ctdb->num_clients

This fixes the problem of "ctdb statisticsreset" clearing the number of
clients even when there are active clients.

Values returned in statistics for frozen, recovering, memory_used are based on
the current state of CTDB and are not maintained as statistics.  This should
include num_clients as well.

Currently ctdb->num_clients is unused. So use that to track the number of
clients and fill in statistics field only when requested.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit dc4ca816630ed44b419108da53421331243fb8c7)
server/ctdb_control.c
server/ctdb_daemon.c