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.
- 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.
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