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:00:51 +0000 (14:00 +1000)
commitdc4ca816630ed44b419108da53421331243fb8c7
tree233198cf2dc0435238459fcb4b12e2ac37a1cb8d
parentbfed6a8d1771db3401d12b819204736c33acb312
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>
server/ctdb_control.c
server/ctdb_daemon.c