[UNIX, Linux, Windows, IBM i]

Collecting a Managed File Transfer agent trace dynamically

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

  1. 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
  2. Reproduce the issue.
  3. 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.

  1. 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.

  2. 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.

  3. Stop the agent, by running the fteStopAgent command.
  4. Start the agent, by running the fteStartAgent command.
  5. 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.
  6. Reproduce the issue.
  7. 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.