I have a patch for the 3.4.x line that adds some simple heap stats into the "mntr" 4lw response. I use it to monitor the memory utilization by the service to have an early warning that the instance is about to fail. Would the community/maintainers be interested in this contribution? If so, I can open a JIRA issue and then submit a patch with it. Please let me know if there is interest in this patch.
This is how the proposed change looks like (see the yellow highlight below): [evolvah@vp-backup-1 zookeeper-3.4.8]$ echo mntr | nc localhost 2181 zk_version 3.4.8-1740158, built on 04/20/2016 16:14 GMT zk_avg_latency 0 zk_max_latency 0 zk_min_latency 0 zk_packets_received 1 zk_packets_sent 0 zk_num_alive_connections 1 zk_outstanding_requests 0 zk_server_state standalone zk_znode_count 4 zk_watch_count 0 zk_ephemerals_count 0 zk_approximate_data_size 27 zk_max_memory 894959616 zk_total_memory 60293120 zk_free_memory 50368208 zk_open_file_descriptor_count 25 zk_max_file_descriptor_count 1048576
