Activating and managing tracing for JVM servers

You can activate JVM server tracing by turning on SJ and AP component tracing. Small amounts of trace are written to the internal trace table, but Java also writes out logging information to a unique file in zFS for each JVM server. This file does not wrap so you must manage its size in zFS.

About this task

JVM server tracing does not use auxiliary or GTF tracing. CICS writes some information to the internal trace table. However, most diagnostic information is logged by Java and written to a file in zFS. This file is uniquely named for each JVM server. The default file name has the format applid.jvmserver.dfhjvmtrc and is created by CICS in the working directory of the JVM when you enable the JVMSERVER resource. You can change the name and location of the trace file in the JVM profile. If you delete or rename the trace file when the JVM server is running, CICS does not re-create the file and the logging information is not written to another file.

Procedure

  1. Use the CETR transaction to activate tracing for the JVM server.
    You can use two components to produce tracing and logging information for a JVM server:
    • Select the SJ component to trace the actions taken by CICS to start and stop the JVM server. The JVM logs diagnostic information in the zFS file.
    • Select the AP component to trace the installation of OSGi bundles.
  2. Set the tracing level for the SJ and AP components:
    • SJ level 0 produces tracing for exceptions only, such as errors during the initialization of the JVM server or problems in the OSGi framework. SJ level 1 and level 2 produces more CICS tracing from the SJ domain. This tracing is written to the internal trace table.
    • SJ level 3 produces additional logging from the JVM, such as warning and information messages in the OSGi framework. This information is written to the trace file in zFS.
    • SJ level 4 and AP level 2 produce debug information from CICS and the JVM, which provides much more detailed information about the JVM server processing. This information is written to the trace file in zFS.
  3. View the tracing results in the applid.jvmserver.dfhjvmtrc file.
    Each trace entry has a date and time stamp. You can change the name and the location of this trace file by using the JVMTRACE profile option.
  4. To manage the size of the file, you can delete old entries.
    If you disable the JVMSERVER resource, you can delete the file or rename the file if you want to retain the information separately. When you enable the JVMSERVER resource, CICS appends trace entries to the trace file if it already exists and creates a file in zFS if a trace file does not exist.