[
https://issues.apache.org/jira/browse/ZOOKEEPER-2422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15280275#comment-15280275
]
Alex Brasetvik commented on ZOOKEEPER-2422:
-------------------------------------------
It would be great if we could expose stats on the various memory pools, as well
as GC-stats.
These will make it easier to pinpoint/predict problems than just how much total
heap is left.
These can differ between different JVMs/-configurations, however.
Sample suggested output of mntr:
```
zk_version 3.6.0-SNAPSHOT--1, built on 10/21/2015 20:34 GMT
zk_avg_latency 0
zk_max_latency 0
zk_min_latency 0
zk_packets_received 6
zk_packets_sent 5
zk_num_alive_connections 1
zk_outstanding_requests 0
zk_server_state standalone
zk_znode_count 7
zk_watch_count 0
zk_ephemerals_count 0
zk_approximate_data_size 75
zk_max_memory 3817865216
zk_total_memory 257425408
zk_free_memory 220856512
zk_jvm_young_used_memory 36568896
zk_jvm_young_peak_used_memory 36568896
zk_jvm_young_max_memory 1409810432
zk_jvm_survivor_used_memory 0
zk_jvm_survivor_peak_used_memory 0
zk_jvm_survivor_max_memory 11010048
zk_jvm_old_used_memory 0
zk_jvm_old_peak_used_memory 0
zk_jvm_old_max_memory 2863136768
zk_jvm_threads_count 20
zk_jvm_threads_peak_count 20
zk_jvm_gc_young_count 0
zk_jvm_gc_young_time 0
zk_jvm_gc_old_count 0
zk_jvm_gc_old_time 0
zk_jvm_instance_id [email protected]
zk_jvm_start_time 1462979784010
zk_open_file_descriptor_count 97
zk_max_file_descriptor_count 10240
```
> Improve health reporting by adding heap stats
> ---------------------------------------------
>
> Key: ZOOKEEPER-2422
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2422
> Project: ZooKeeper
> Issue Type: Improvement
> Affects Versions: 3.4.8, 3.5.1, 3.6.0
> Reporter: Sergey Maslyakov
> Assignee: Sergey Maslyakov
> Fix For: 3.5.2, 3.6.0
>
> Attachments: zookeeper-2422-3.4.patch, zookeeper-2422-3.5.patch,
> zookeeper-2422-3.6.patch
>
>
> In order to improve remote monitoring of the ZooKeeper instance using tools
> like Icinga/NRPE, it is very desirable to expose JVM heap stats via a
> light-weight interface. The "mntr" 4lw is a good candidate for this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)