Bug 534339 - (RHQ-1145) Add logging to the agent comms layer to flag really big messages
Add logging to the agent comms layer to flag really big messages
Status: CLOSED NEXTRELEASE
Product: RHQ Project
Classification: Other
Component: Communications Subsystem (Show other bugs)
unspecified
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: John Mazzitelli
http://jira.rhq-project.org/browse/RH...
: Task
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-19 19:47 EST by Charles Crouch
Modified: 2015-02-01 18:24 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Charles Crouch 2008-11-19 19:47:00 EST
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.
Comment 1 John Mazzitelli 2008-11-19 22:16:19 EST
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.
Comment 2 John Mazzitelli 2008-11-20 00:11:21 EST
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).
Comment 3 John Mazzitelli 2008-11-20 00:13:01 EST
svn rev 2041.
Comment 4 Red Hat Bugzilla 2009-11-10 15:24:53 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1145

Note You need to log in before you can comment on or make changes to this bug.