Red Hat Training

A Red Hat training course is available for Red Hat JBoss Operations Network

6.5.3. Using the Agent debug Prompt Command

Debug logging can be enabled using the debug command in the agent command prompt (Section 6.2.1, “Opening the Agent Command Prompt”).
Using the --enable option enables the log4j debug log.
> debug --enable
log4j:WARN No appenders could be found for logger (org.rhq.core.pc.measurement.MeasurementCollectorRunner).
log4j:WARN Please initialize the log4j system properly.
Switched to log file [log4j-debug.xml]. Root log level is [DEBUG]
To enable debug logging specifically for server-agent communication layers, set the --comm option to true.
> debug --comm=true 
Agent-server communications tracing has been enabled.
You may set the following, additional configuration settings
to collect more detailed trace data. You can set these
using the setconfig prompt command. Please refer to the
documentation for more information on these settings. The
values you see here are the current settings:
The debug command can also be used to check all of the agent threads, to the server and to the system management handlers, using the --threaddump option. This prints the information for each thread, whether the thread is running or any errors that the agent is encountering, per thread. For example:
> debug --threaddump
"DestroyJavaVM" Id=47 RUNNABLE

"RHQ Agent Prompt Input Thread" Id=46 RUNNABLE

"EventManager.sender-2" Id=49 TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@17d7c01
        at sun.misc.Unsafe.park(Native Method)
        -  waiting on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@17d7c01
        at java.util.concurrent.locks.LockSupport.parkNanos(
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(
        at java.util.concurrent.DelayQueue.take(
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(
        at java.util.concurrent.ThreadPoolExecutor.getTask(
        at java.util.concurrent.ThreadPoolExecutor.runWorker(