case CTDB_CONTROL_PING:
CHECK_CONTROL_DATA_SIZE(0);
ctdb->status.controls.ping++;
- return ctdb->num_clients;
+ return ctdb->status.num_clients;
case CTDB_CONTROL_GET_DBNAME: {
uint32_t db_id;
static int ctdb_client_destructor(struct ctdb_client *client)
{
ctdb_reqid_remove(client->ctdb, client->client_id);
- client->ctdb->num_clients--;
+ client->ctdb->status.num_clients--;
close(client->fd);
client->fd = -1;
return 0;
client->ctdb = ctdb;
client->fd = fd;
client->client_id = ctdb_reqid_new(ctdb, client);
- ctdb->num_clients++;
+ ctdb->status.num_clients++;
client->queue = ctdb_queue_setup(ctdb, client, fd, CTDB_DS_ALIGNMENT,
ctdb_daemon_read_cb, client);
ctdb status information
*/
struct ctdb_status {
+ uint32_t num_clients;
uint32_t client_packets_sent;
uint32_t client_packets_recv;
uint32_t node_packets_sent;
uint32_t offset;
} fields[] = {
#define STATUS_FIELD(n) { #n, offsetof(struct ctdb_status, n) }
+ STATUS_FIELD(num_clients),
STATUS_FIELD(client_packets_sent),
STATUS_FIELD(client_packets_recv),
STATUS_FIELD(node_packets_sent),