Capturing trace data through environment variables

In order to capture trace information using environment variables, the trace environment variables GSK_TRACE and GSK_TRACE_FILE must be exported before the start of the SSL application.

Note: Start of changeThe GSK_TRACE and GSK_TRACE_FILE environment variables should only be specified or exported by the SSL application when it is necessary to obtain diagnostic information. These environment variables must not be specified within a CEEPRMxx file as this results in all System SSL applications to be traced that are running on the system.End of change
  • GSK_TRACE

    Specifies a bit mask enabling System SSL trace options. No trace option is enabled if the bit mask is 0 and all trace options are enabled if the bit mask is 0xffff. The bit mask can be specified as a decimal (nnn), octal (0nnnn) or hexadecimal (0xhh) value.

    These trace options are available:
    • 0x01 = Trace function entry
    • 0x02 = Trace function exit
    • 0x04 = Trace errors
    • 0x08 = Include informational messages
    • 0x10 = Include EBCDIC data dumps
    • 0x20 = Include ASCII data dumps
  • GSK_TRACE_FILE

    Specifies the name of the trace file and defaults to /tmp/gskssl.%.trc. The trace file is not used if the GSK_TRACE environment variable is not defined or is set to 0.

    The current process identifier is included as part of the trace file name when the name contains a percent sign (%). For example, if GSK_TRACE_FILE is set to /tmp/gskssl.%.trc and the current process identifier is 247, then the trace file name is /tmp/gskssl.247.trc.

Note: Care needs to be taken if the application being traced is multi-processed. If multiple processes write to the same trace file, file corruption might occur. To allow trace information to be obtained, the trace file name specified should contain a '%' character in the file name. This allows the process identifier to be placed within the file name and each process to write to its own trace file.

It is suggested that if the default trace file value is not being used, the trace file name always contain a '%' character. This eliminates the need to know whether the application being traced is multi-processed or not.

Once the trace file is produced, it must be formatted. To format the file, use the System SSL gsktrace command as follows:

gsktrace input_trace_file > output_trace_file