+

Search Tips   |   Advanced Search

(zos)

Use tracing on optimized local adapters

WebSphere Application Server for z/OS provides support for setting optimized local adapter trace levels to assist in application, connection, or server diagnosis. We can set the trace level to three levels to capture detailed, coarse, or no trace data. These are designated as trace levels 2, 1, and 0.

Dynamic trace support in optimized local adapters provides several ways to set or change existing trace levels without restarting the server, including:

  1. Predefine trace levels. Predefining trace levels readies you to capture registration and connection trace data as early as optimized local adapter initialization. We are also prepared to follow activity for connections that are not yet registered; when the indicated registrations are made, tracing automatically occurs. Predefine the trace levels as follows:

    1. Create a trace properties file in HFS. This file should be in EBCDIC and accessible by the WAS for z/OS daemon.

      The trace properties file syntax follows the WAS properties file syntax of keyword=parameter. In this case, the property has a syntax as follows:

        registration_name=trace_level

      where:

      registration_name is an alphanumeric string

      trace_level is 0, 1 or 2

      For clarity, we can use single or double quotation style syntax when indicating the registration name, for example:

        MYREGNAME=1 "CICSREG"=2 'SHORTREG'=0

      We can also group like-named registrations into one line by using asterisks as wildcard characters, for example:

        REGNAME*=1 *NAME=2 "REG*NAME"=0

      A leading # character indicates the start of a comment, unless it is within a quoted string.

      Important:

      • Any non-valid trace level is treated as 0. For example, REGNAME=ALL is treated as trace level 0.

      • A registration name of "*" is treated as the default trace level, for example, if *=1 is specified, the default for any new registrations is a coarse level of tracing.

      • The properties file can have a maximum of 1,024 trace specifications.

      The SETOLATRACEPROPS command issues a response message that displays how many trace definitions were processed for registrations other than system default.

    2. Create an environment variable WAS_DAEMON_ONLY_ola_trace_settings_file in the console.

    3. Set the variable as a string to the fully qualified path and file name of the trace properties file in HFS and activate the variable.

      If this environment variable is set and saved in the WAS configuration, the properties file is processed at server initialization. We can update the trace properties file and activate the new definitions by issuing the modify SETOLATRACEPROPS command and the new trace properties affect new registrations. The syntax is:

        F daemonname,SETOLATRACEPROPS

      Activating a trace settings properties file deactivates any currently active trace properties.

  2. Modify trace settings for existing connections. For current connections that use optimized local adapters, we can turn on or off tracing with the modify SETOLATRACE command. The command has these forms:
    F servername,SETOLATRACE=tracelevel,REGNAME=namestring
    F servername,SETOLATRACE=tracelevel,JOBNAME=namestring
    F servername,SETOLATRACE=tracelevel,RGE=hexaddress
    The trace level can be 0, 1, or 2 for, in order: no tracing, coarse level of tracing, and detailed tracing.

    Namestring specifies the registration name or job name for the existing registration to be modified. We can delimit the namestring with matching single or double quotation marks. Likewise, we can use an asterisk as a wildcard character to modify more than one similarly named job or registration. A lone asterisk affects every existing registration. We can turn off all tracing of current registrations by using either of these commands:

    F servername,SETOLATRACE=0,REGNAME=*
    F servername,SETOLATRACE=0,JOBNAME=*

    In cases where to target a specific registration by the address of the RGE in server controlled storage, we can use the RGE=hexaddress form of the command. The hex address is an unquoted string of hexidecimal numerals. This approach is probably one that the IBM support team would direct you to use.

    The SETOLATRACE command displays a response message that indicates how many registrations were affected.

  3. Specify trace settings at registration. We can request tracing in code that calls the BBOA1REG API to create the registration to the optimized local adapter. The interface to BBOA1REG contains a parameter called registerflags. The trace level settings for a registration can be modified by setting one or more of the following values into the registerflags parameter:

      reg_flag_trcmod EQU X'80000000' modify trace level reg_flag_trcmore EQU X'40000000' trace level=2 reg_flag_trcsome EQU X'20000000' trace level=1

    Set reg_flag_trcmod to modify the trace settings for the registration. If we do not set this flag, no change to the trace setting is made, and the system defaults or predefined trace settings that apply to the registration name or job name are used.

    Set either reg_flag_trcmore or reg_flag_trcsome if we want detailed tracing or coarse level tracing. Leaving both of them set to "off" forces no tracing no matter what pre-definitions or defaults are set.