Coming out of RHQ-1131 it would be good to know if there are any other api's we are calling from the agent that could potentially ship a ton of data across the wire. I guess JBossRemotingRemoteCommunicator would be the place to do this, either by serializing every Command we send out or doing something more fancy: http://www.jroller.org/maxim/entry/again_about_determining_size_of http://weblogs.java.net/blog/mister__m/archive/2007/01/measuring_the_s.html Maybe there is even some JBoss remoting setting you could turn on to show you this. Either way we would obviously want to only run with this enabled during our testing.
I can easily add this to my current command tracing facility: http://support.rhq-project.org/display/RHQ/Design-DebuggingCommunications I'll add some addition ideas on that page on how to log message sizes and perhaps log special messages when sizes exceed a certain amount.
adding two new system properties you can enable to trace sizes. From that wiki: rhq.trace-command-size-threshold : If set, this is the maximum size of commands that can flow into and out of the comm layer without generating a warning message in the log. If a command is larger than this value (defined in bytes), a WARN level message will be logged in logs/command-trace.log. If this is set, this also will generate ERROR level messages if the command is not serializable. rhq.trace-command-response-size-threshold : If set, this is the maximum size of command responses that can flow into and out of the comm layer without generating a warning message in the log. If a command response is larger than this value (defined in bytes), a WARN level message will be logged in logs/command-trace.log. If this is set, this also will generate ERROR level messages if the response is not serializable. If you want to see all sizes of all messages, just set those sys props to 0 (thus, no matter what size the message is, they will be over the threshold and thus be logged). If you only want to see outgoing command sizes, just set the command-size-threshold prop and not the response one. If you only want to see commands larger than 1M, set the command-size-threshold to 1000000. Note you can set these either from agent command line (-D...) or from the agent prompt (setconfig) - see the wiki for more. Use setconfig to turn the size threshold logging on and off during agent run time (changing the prop values takes immediate effect).
svn rev 2041.
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1145