IBM Support

Generating IBM MQ managed file transfer trace on Linux, UNIX, Windows, IBM i and z/OS

Question & Answer


Question

How do I generate an IBM MQ trace of managed file transfer commands on Linux, UNIX, Windows, IBM i and z/OS systems in order to investigate a problem?

Cause

Traces can capture the root cause of many MQ managed file transfer problems. It is important to limit how long tracing is active in order to avoid affecting performance or generating excessively large trace files and filling up your disk. For other MQ traces refer to:





Answer


Multiple Installations

MQ supports multiple installations on Linux, UNIX and Windows systems. Each installation has its own independent commands, so you must be careful to trace the right installation. For example, if you are tracing a managed file transfer command associated with Installation1, then you must use the setmqenv command to switch to Installation1 before attempting to start or modify a trace.



If your machine has multiple MQ installations, you must use the setmqenv command from any one of them in order to set up your environment properly. It doesn't matter which setmqenv you use, but the arguments are important. Please note that the installation names and paths may differ from these examples:


    Setting your environment for Installation1 on Linux and UNIX

    sh> . /opt/mqm80/bin/setmqenv -n Installation1

    Setting your environment for a coordination queue manager on Windows

    C:\> "C:\Program Files\IBM\MQ\bin\setmqenv" -m COORDQMNAME





Tracing a Running Managed File Transfer Agent



In IBM MQ V8.0, WebSphere MQ V7.5 and WebSphere MQ File Transfer Edition V7.0 it is possible to generate trace of a running managed file transfer agent without restarting it. Replace AGENTNAME in these instructions with the name of the agent you wish to trace.


  1. If you have multiple MQ installations, use setmqenv to select the correct one.


  2. Turn on tracing for the running managed file transfer agent. Note that the syntax is different in WebSphere MQ File Transfer Edition V7.0.2 and earlier. For example:

    1. Tracing a running agent on Linux, UNIX, Windows and the IBM i Qshell


      fteSetAgentTraceLevel -traceAgent =all AGENTNAME

      V7.0.2 and earlier: Tracing a running agent on Linux, UNIX, Windows and in the IBM i Qshell


      fteSetAgentTraceLevel -traceLevel all AGENTNAME


  3. Reproduce the problem while the managed file transfer agent tracing is active, making every attempt to keep the trace as short as possible.


  4. As soon as the problem has occurred, stop tracing immediately! If you wait to stop the trace you will consume more disk space, or the information that IBM Support needs may be lost or overwritten. Note that the syntax for stopping the trace is different in WebSphere MQ File Transfer Edition V7.0.2 and earlier:

    1. Stopping trace of a running agent on Linux, UNIX, Windows and the IBM i Qshell

      fteSetAgentTraceLevel -traceAgent =off AGENTNAME

      V7.0.2 and earlier: Stopping trace of a running agent on Linux, UNIX, Windows and the IBM i Qshell


      fteSetAgentTraceLevel -traceLevel off AGENTNAME




Tracing a Running Managed File Transfer Logger


In IBM MQ V8.0 and WebSphere MQ V7.5 it is possible to generate trace of a running managed file transfer logger without restarting it. For WebSphere MQ File Transfer Edition V7.0 you must stop the logger and follow the generic instructions below instead. Replace LOGGERNAME in these instructions with the name of the logger you wish to trace.




  1. If you have multiple MQ installations, use setmqenv to select the correct one.


  2. Turn on tracing for the running managed file transfer logger. For example:

    1. Tracing a running logger on Linux, UNIX, Windows and the IBM i Qshell


      fteSetLoggerTraceLevel -traceLogger =all LOGGERNAME


  3. Reproduce the problem while the managed file transfer logger tracing is active, making every attempt to keep the trace as short as possible.


  4. As soon as the problem has occurred, stop tracing immediately! If you wait to stop the trace you will consume more disk space, or the information that IBM Support needs may be lost or overwritten:

    1. Stopping trace of a running logger on Linux, UNIX, Windows and the IBM i Qshell


      fteSetloggerTraceLevel -traceLogger =off LOGGERNAME




Tracing Any Managed File Transfer Command


Every managed file transfer command may be traced at startup, including managed file transfer agents and loggers. Follow the instructions below, replacing AGENTNAME with the name of the agent that you wish to trace in the examples.




  1. If you have multiple MQ installations, use setmqenv to select the correct one.


  2. If you are running WebSphere MQ File Transfer Edition V7.0.2 or earlier, you must perform one additional step if you want to trace the fteStartDatabaseLogger command. Set the FTE_JVM_PROPERTIES environment variable as shown below:

    1. V7.0.2 and earlier: Preparing to trace fteStartDatabaseLogger on Linux and UNIX


      sh> export FTE_JVM_PROPERTIES="-Dcom.ibm.mq.integrateJMSTrace=true"

      V7.0.2 and earlier: Preparing to trace fteStartDatabaseLogger on Windows


      C:\> SET FTE_JVM_PROPERTIES="-Dcom.ibm.mq.integrateJMSTrace=true"

      V7.0.2 and earlier: Preparing to trace fteStartDatabaseLogger in the IBM i Qshell


      ===> export FTE_JVM_PROPERTIES="-Dcom.ibm.mq.integrateJMSTrace=true"


  3. Generate a trace of your managed file transfer command by adding the -trace parameter. The trace will by default be written to the current directory, but if you are running V7.0.4.1 or later you can use the -tracePath parameter to select a different directory for the trace. Try to save the output of the command for IBM Support. For example:

    1. Tracing the ftePingAgent command on Linux and UNIX


      sh> ftePingAgent -trace =all -tracePath /var/mqm/trace AGENTNAME | tee /tmp/ftePingAgent.output.txt

      Tracing the fteStartDatabaseLogger command on Linux and UNIX


      sh> fteStartDatabaseLogger -trace =all -tracePath /var/mqm/trace AGENTNAME | tee /tmp/fteStartDatabaseLogger.output.txt

      Tracing the fteModifyAgent command on Windows


      C:\> fteModifyAgent -trace =all -agentName AGENTNAME -s > %TEMP%\fteModifyAgent.output.txt

      Tracing the fteStartAgent command in the IBM i Qshell


      ===> fteStartAgent -trace =all -tracePath /QIBM/UserData/mqm/trace AGENTNAME | tee /tmp/fteStartAgent.output.txt


  4. Reproduce the problem while the managed file transfer command tracing is active, making every attempt to keep the trace as short as possible.


  5. As soon as the problem has occurred, stop tracing immediately! For most commands the trace will stop automatically when the command returns, but managed file transfer agents and loggers continue running after their start command has completed. Follow the instructions above to turn off agent trace, and if you are running WebSphere MQ V7.5 or later you can follow the these instructions to turn off logger trace. If you are running WebSphere MQ File Transfer Edition V7.0, you must stop the database logger to turn off its trace:

    1. V7.0: Stopping a traced database logger on Linux, UNIX, Windows and the IBM i Qshell


      fteStopDatabaseLogger LOGGERNAME


  6. If the command you finished tracing is fteStartDatabaseLogger and you are running WebSphere MQ File Transfer Edition V7.0.2 or earlier, remove the FTE_JVM_PROPERTIES environment variable. For example:

    1. V7.0.2 and earlier: Cleaning up after a trace of fteStartDatabaseLogger on Linux and UNIX


      sh> unset FTE_JVM_PROPERTIES

      V7.0.2 and earlier: Cleaning up after a trace of fteStartDatabaseLogger on Windows


      C:\> SET FTE_JVM_PROPERTIES=

      V7.0.2 and earlier: Cleaning up after a trace of fteStartDatabaseLogger in the IBM i Qshell


      ===> unset FTE_JVM_PROPERTIES



    Additional Information




    [{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Problem Determination","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"9.0;8.0;7.5;7.0.4;7.0.3;7.0.2;7.0.1;7.0","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

    Product Synonym

    WebSphere MQ File Transfer Edition WMQFTE WMQ FTE

Document Information

Modified date:
22 June 2018

UID

swg21673116