The fteSetAgentTraceLevel command allows trace to be collected from a
running agent. This can be very useful if IBM®
Support need to see a trace from an agent that cannot be stopped.
About this task
To collect a trace from an agent using the fteSetAgentTraceLevel command, complete the following steps.
Procedure
-
Turn on trace for the agent by running the following command:
fteSetAgentTraceLevel -traceAgent classes=level agent_name
Note: The
-traceAgent parameter determines the internal classes and packages that
are to be traced. Unless otherwise specified by your
IBM Support representative, set this property to the value
com.ibm.wmqfte=all.
An example command might look like this for an agent named
AGENT1:
fteSetAgentTraceLevel -traceAgent com.ibm.wmqfte=all AGENT1
- Reproduce the issue.
- Turn off trace for the agent by running the following command:
fteSetAgentTraceLevel -traceAgent =off agent_name
If an agent is busy, the trace files might wrap quickly and overwrite the information
needed to investigate the issue. If this is so, schedule some time to stop the agent then proceed as
detailed in the following steps. If you cannot stop the agent for a short period of time, contact
your IBM Support representative and discuss
alternative trace specifications to use, to reduce the amount of trace data that is being
generated.
- Locate the agent.properties file for the agent that needs to be
traced.
The agent.properties file can be found in the
MQ_DATA_PATH/mqft/config/coordination_qmgr_name/agents/agent_name
directory.
- Edit the file and add entries for the following properties:
traceFiles=number_of_trace_files_to_use
traceSize=size_of_each_trace_file_in_MB
The traceFiles and traceSize properties are used to
control the amount of trace data that is collected.
The default value of the traceFiles property is 5, and the
traceSize property has the default value of 20MB. This means that if you turn
on trace dynamically, and you have not set the properties, the agent writes trace information to 5
wrapping trace files, each with a maximum size of 20MB.
You should set these properties to large values, to collect as much trace data as possible.
For example, to collect 1GB of wrapping trace, add the following lines to the
agent.properties file:
traceFiles=5
traceSize=200
This results in the agent writing trace data to a maximum of 5 files, where each file
has a size of 200MB.
For more information on these agent properties, see The MFT
agent.properties file.
- Stop the agent, by running the fteStopAgent command.
- Start the agent, by running the fteStartAgent command.
- Enable trace for the agent, by running the following command:
fteSetAgentTraceLevel -traceAgent classes=level agent_name
Unless otherwise specified by your IBM Support representative, set the
-traceAgent property to the value
com.ibm.wmqfte=all.
- Reproduce the issue.
- Turn trace off on the agent by running the following command:
fteSetAgentTraceLevel -traceAgent =off agent_name
Results
The resultant trace files are written to the
MQ_DATA_PATH/mqft/logs/coordination_qmgr_name/agents/agent_name/logs/trace%PID%
directory, where %PID% is the process identifier for the agent.