Tracing MFT commands
We can trace any of the Managed File Transfer commands to help with problem determination from the command line.
Purpose
Use the -trace parameter for any MFT command to enable trace at a specified level. The trace files produced are located in your current working directory unless the -tracePath parameter is included to identify a different directory.
Because running trace can affect your performance significantly and can produce a large amount of trace data, run trace with care and only when necessary. Typically, enable trace only when asked to do so by the IBM service representative.
We can set further trace properties, for example trace file size and the number of trace files to keep, in the agent.properties file. These properties are described in Advanced agent properties.
Syntax
Parameters
- -trace (classes=level)
- Required. Level to set the trace and which classes to apply the trace to. Specify the following
format:
classes=level
For example:com.ibm.wmqfte=all
which traces all Managed File Transfer classes.Specify a colon-separated list of class specifications that we want the level of trace to apply to. If we do not specify this parameter, the trace level is applied to all agent classes.
If (classes) start with a plus sign (+), the list of trace classes following the plus sign are added to any existing trace classes currently being traced.
The valid trace level options are as follows and are listed in ascending order of trace file size and detail:- off
- Switches the agent trace off but continues to write information to the log files. This is the default option.
- flow
- Captures data for trace points associated with processing flow in the agent.
- moderate
- Captures a moderate amount of diagnostic information in the trace.
- verbose
- Captures a verbose amount of diagnostic information in the trace.
- all
- Sets agent trace to run on all agent classes.
- -tracePath (directory path)
- Optional. Specify the directory that we want the trace to be written to. For example,
c:\temp. If we do not specify this parameter, the value is
the directory that the command was issued from. For example, on z/OS :
/u/smith/fte/wmqmft/mqft/logs/MQPV/loggers/BFGLG1/logs/
This parameter is valid only when the -trace parameter is specified.
Example
In this example the trace level is set to all, meaning that all of the classes belonging to AGENT.NAME are traced for the fteStartAgent command: Note: When the agent is started, the trace goes to mft_config/logscoordination_qmgr/agents/agentfteStartAgent -trace com.ibm.wmqfte=all -tracePath /u/mft/trace AGENT.NAMEIn this example the trace level is set to moderate for the com.ibm.wmqfte.common classes for the agent AGENT.NAME. A moderate amount of trace is captured for the ftePingAgent command:
ftePingAgent -trace com.ibm.wmqfte.common=moderate AGENT.NAMEIn this example the trace level is set to moderate for the com.ibm.wmqfte.common classes for the agent AGENT.NAME, and the trace is written to the c\$user directory. A moderate amount of trace is captured for the ftePingAgent command:
ftePingAgent -trace com.ibm.wmqfte.common=moderate -tracePath c:\$user AGENT.NAMEParent topic: MFT commands