Getting the Hazelcast map size in MB or KB via jmx monitoring

479 views
Skip to first unread message

Rahul Dahiya

unread,
Sep 15, 2014, 6:39:25 AM9/15/14
to haze...@googlegroups.com
Hi,

I am monitoring HazelCast 2.6.9 via JMX. I am trying to extract the size of each and every map using cmdline-jmxclient-0.10.3.jar available at http://crawler.archive.org/cmdline-jmxclient/downloads.html ( documentation at : http://crawler.archive.org/cmdline-jmxclient/index.html). I am able to get the size of each map as in number of records present in the map using the following command:

java -jar /home/impadmin/Desktop/test/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:8282 com.hazelcast:Cluster=_hzInstance,name=Users,type=Map Size


I am trying to retrieve the size of map as in KB's and MB's. I did search on net about it but couldn't find a way to extract the map size in KB's or MB's. Please help. Any other options to retrieve the size in KB's are also appreciated.

Thanks in advance,

--Rahul   

Emrah Kocaman

unread,
Sep 15, 2014, 8:19:38 AM9/15/14
to haze...@googlegroups.com
Hi Rahul,

You can use localOwnedEntryMemoryCost method. This gives the size of the map in bytes.
To discover all methods you can use jconsole or jmc. 

For example below map is 17888709 bytes, (17888709/1024)/1024 -> 17.06 MB

Inline image 1

Best,

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/1c9e7f33-5664-4ce8-b53d-62c130fb43e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages