Previous Topic Next topic Print topic


To Enable CTF Tracing

  1. Set the MFTRACE_CONFIG environment variable to point to the ctf.cfg configuration file, before you invoke the application. For example:
    export MFTRACE_CONFIG=/home/usr/ctf/ctf.cfg
  2. Set the MFTRACE_LOGS environment variable to specify the location in which to create the CTF trace files. If MFTRACE_LOGS is not set, the current folder is used.
  3. Edit the configuration file to specify the information to trace, for example:
    mftrace.dest = binfile
    mftrace.emitter.binfile#location  = /home/usr/logs
    mftrace.level.mf.rts              = info
    mftrace.comp.mf.rts#pgm           = true
    mftrace.comp.mf.rts#pgmload       = true
    mftrace.comp.mf.rts#syspgm        = true
    Note: If the location of the trace file is specified in the configuration file, as shown above, it overrides the MFTRACE_LOGS setting.
  4. Run the application from the environment you set up.

If you are using a JVM environment, you can also configure CTF tracing by using an mfjvm.ctf file, ensuring it is stored on the program's classpath. The format of this file is the same as the ctf.cfg file and is typically used when tracing web applications is required.

You can ensure the file is on the classpath by:
  • Specifying the path name to the directory the file is stored in, using the standard JVM CLASSPATH system variable.
  • Placing it in the root of a .jar file that is itself on the classpath.
  • Placing it in the WEB-INF/classes directory of a web services .war file.
Note: If the MFTRACE_CONFIG variable is also set, that is used in preference to this method.
Previous Topic Next topic Print topic