Running System Diagnostics

The diagnostic command, trace, enables you to run system diagnostics and troubleshoot operational problems. Use the trace command with the appropriate parameter listed in the following table to enable and disable runtime traces within the Process Manager, Command Manager, and Session Manager components of the software. For Session Manager traces, you can run a trace for a specific node.

The Command Manager trace is turned on immediately for the client that issued the trace command. After the trace command is issued, all clients that make connections are also traced. Session Manager traces go into effect immediately.

The trace command has the following parameters:

Parameter Description Value
cmgr To trace the Command Manager. level=0 |1 | 2 | 4

file=name

level—Specifies the level of detail displayed in the trace output. The default is 4.

0—Terminates the trace.
1—Is the basic level that provides function entry and function exit.
2—Includes level 1 plus function arguments.
4—Enables a full trace. Basic diagnostic information, such as values of internal data structures at key points in the execution flow, are displayed.

file—Specifies the name of a file where the trace output is directed. If you do not specify a file name, the file is created in the IBM® Connect:Direct® working directory with the file name CMGR.TRC. The length of the name value is unlimited.

comm To trace the data sent to and received from a remote IBM Connect:Direct system within the Session Manager. You can set this trace independently from or in conjunction with the smgr trace.

If you run both the comm and smgr traces, trace output for both traces is directed to the file name of the trace last specified.

level=0 |1 | 2 | 4

file=name

level—Specifies the level of detail displayed in the trace output. The default is 4.

0—Terminates the trace.
1—Is the basic level that provides function entry and function exit.
2—Includes level 1 plus function arguments.
4—Enables a full trace that provides basic diagnostic information, such as values of internal data structures at key points in the execution flow.

file—Specifies the name of a file where the trace output is directed. If you do not specify a file name, the file is created in the IBM Connect:Direct working directory with the file name COMM.TRC. The length of the name value is unlimited. The default file name is COMM.TRC.

pmgr To trace the Process Manager. level=0 |1 | 2 | 4

file=name

level—Specifies the level of detail displayed in the trace output. The default is 4.

0—Terminates the trace.
1—Is the basic level that provides function entry and function exit.
2—Includes level 1 plus function arguments.
4—Enables a full trace that provides basic diagnostic information, such as values of internal data structures at key points in the execution flow.

file—Specifies the name of a file where the trace output is directed. If you do not specify a file name, the file is created in the IBM Connect:Direct working directory with the file name PMGR.TRC. The length of the name value is unlimited.

smgr To run the trace for Session Managers created after issuing the trace command. Currently executing Session Managers are unaffected.

If you run both the comm and smgr traces, trace output for both traces is directed to the file name of the trace last specified.

level=0 |1 | 2 | 4

snode | pnode | tnode

file=name

level—Specifies the level of detail displayed in the trace output. The default is 4.

0—Terminates the trace.
1—Is the basic level that provides function entry and function exit.
2—Includes level 1 plus function arguments.
4—Enables a full trace that provides basic diagnostic information, such as values of internal data structures at key points in the execution flow.

snode—Specifies to trace only the SNODE SMGR.

pnode—Specifies to trace only the PNODE SMGR.

tnode—Identifies the node on which to perform the trace. If you want to gather trace information for more than one node, identify more than one node in this parameter.

file—Specifies the name of a file where the trace output is directed. If you do not specify a file name, the file is created in the IBM Connect:Direct working directory with the file name SMGR.TRC. The length of the name value is unlimited. The default file name is SMGR.TRC.

The following sample trace command performs a level 2 trace on the Session Manager for the node called ath3500ry and writes the output to the file Smgp.trc:

trace smgr pnode tnode=ath3500ry level=2 file=Smgp.trc;
In case there is an issue in startup of cdpmgr itself, the diagnostics can be captured by enabling cdpmgr startup traces using the following command. Here d_dir is the installation directory where Connect:Direct for UNIX is installed, cd_node is the node name and output will be captured in cdpmgr_startup.trc file.
$ d_dir/ndm/bin/cdpmgr -i d_dir/ndm/cfg/cd_node/initparm.cfg -t 4 >> cdpmgr_startup.trc 2>&1

A partial sample trace output is illustrated in the following section. A trace identifies the Process ID and the function, the month and day, and the time in microseconds. The first column contains the Process ID. Column two indicates the month and day in the form of MM/DD. Column three indicates the time in the form of HH:MM:SSSS. The last column indicates the function. An arrow pointing to the right indicates the function was entered. An arrow pointing to the left indicates the function was exited. Some of the functions are indented, which indicates nesting. An indented arrow indicates that the function was called by the preceding function.

indicates that the function was called by the preceding function.
===================================================================================
498    05/18 15:13:0104   cm_sendcmd_1 entered.
498    05/18 15:13:0206    -> ndm_error_destroy
                         <- ndm_error_destroy: ok
498    05/18 15:13:0506    -> ndm_error_create
                         <- ndm_error_create: ok
498    05/18 15:13:0708    ndm_cmds_free entered.
                         ndm_cmds_free exited.
498    05/18 15:13:0801    ->ndm_parser_jdi
498    05/18 15:13:0806    -> ndm_error_create
                          <- ndm_error_create: ok
498    05/18 15:13:0916     ->Parser: SELPRO
498    05/18 15:13:0926      ->bldexp
                           <-bldexp: Null argument value,
                                  don&apos;t add.
498    05/18 15:13:1116      ->bldexp
498    05/18 15:13:1136       -> ndm_crit_comp
498    05/18 15:13:1155        ->compile
                             <-compile
                            <- ndm_crit_comp: Handle
                           <-bldexp: ok
                        .
                        .
                        .
===================================================================================