}
@Override
public CommandResponse run(ZooKeeperServer zkServer, Map<String, String> kwargs) {
ZKDatabase zkdb = zkServer.getZKDatabase();
ServerStats stats = zkServer.serverStats();
CommandResponse response = initializeResponse();
response.put("version", Version.getFullVersion());
response.put("avg_latency", stats.getAvgLatency());
response.put("max_latency", stats.getMaxLatency());
response.put("min_latency", stats.getMinLatency());
response.put("packets_received", stats.getPacketsReceived());
response.put("packets_sent", stats.getPacketsSent());
response.put("num_alive_connections", stats.getNumAliveClientConnections());
response.put("outstanding_requests", stats.getOutstandingRequests());
response.put("server_state", stats.getServerState());
response.put("znode_count", zkdb.getNodeCount());
response.put("watch_count", zkdb.getDataTree().getWatchCount());
response.put("ephemerals_count", zkdb.getDataTree().getEphemeralsCount());
response.put("approximate_data_size", zkdb.getDataTree().approximateDataSize());