1

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.

Developer
  • 27
  • 1
  • 10

1 Answers1

2

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.

Gray
  • 115,027
  • 24
  • 293
  • 354
Bela Ban
  • 271
  • 1
  • 1
  • Thanks Bela. I used option 2 to get statistics. However in production environment due to limitations I cannot use probe.sh So got the statistics from Protocol using dumpStats() method and logged them to file when required within the code. – Developer Feb 03 '12 at 18:22
  • After I got the statistics, I wanted to retrieve the number of message and bytes going to and from a particular protocol layer in the stack. Not all layers provide this information. How can I get this information? – Developer Feb 04 '12 at 00:34