Developer
Developer

Reputation: 27

How to get message statistics sent/received between members when using JGroups (TCP/UDP)?

I am using JGroups TCP protocol to maintain cluster. I have been trying to get some statistics of number of messages sent and received and size of each message to create some reports. Is there a way I can capture this information?

Thanks in advance.

Upvotes: 1

Views: 1247

Answers (1)

Bela Ban
Bela Ban

Reputation: 271

JGroups exposes most of this via JMX. You can access this information in 2 ways:

  1. Run jconsole and attach to the running process. To do that, you have to set some JMX specific system properties when starting the process. Plus, you have to register the JGroups channel, e.g. use JmxConfigurator.registerChannel() to do this.

  2. Use probe.sh, e.g. probe.sh jmx=NAKACK.xmit_table dumps all attributes in NAKACK that start with xmit_table. There is more info on probe.sh in the manual at jgroups.org.

Cheers.

Upvotes: 2

Related Questions