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

StackOverflow https://stackoverflow.com/questions/9023412

  •  14-11-2019
  •  | 
  •  

Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top