Scenario: Using watch support with a communications trace
Suppose that Telnet sessions are dropping intermittently on the system, but nothing else seems to be wrong. When the sessions drop,
message TCP2617 is sent to the QSYS/QSYSOPR message queue. To solve the problem,
you need to perform a communications trace using watch support.
With watch support, the trace is automatically stopped when the TCP2617 message is sent to QSYSOPR. This allows you to capture only the data that you need to analyze the problem and prevents the trace from running longer than necessary.
To perform the communications trace using watch support, follow these steps:
- Start the communications trace:
- At the command line, type STRCMNTRC and press F4.
- For the Configuration object prompt, specify the name of the line, such as TRNLINE.
- For the Type prompt, specify the type of resource, such as *LIN.
- For the Watch for message, Message identifier prompt,
type TCP2617.
- For the Watched message queue, Message queue prompt,
type *SYSOPR. This ensures that the communications trace stops running when the TCP2617 message is sent to the QSYSOPR message queue.
- For the Length of time to watch prompt, type 2880.
The value 2880 indicates that the communications trace runs for a maximum of two days (2880 minutes) if the message does not occur. When two days elapse,
the trace ends. If you do not want the trace to end if the message does not occur during the specified time, specify *NOMAX for this parameter.
- Verify that the watch support started:
- At the command line, type WRKWCH and press F4.
- For the Watch prompt, type *TRCCMD. You should see QSCCMNxxxx session listed under Trace type. Note that CMN in the middle of the session identifier indicates that the watch session was started by the STRCMNTRC command. xxxx indicates a unique identifier for the watch session.
- Verify that the watch support is running:
- At the command line, type WRKACTJOB SBS(QUSRWRK).
- You should see the watch job QSCCMNxxxx running in the QUSRWRK subsystem.
The job is typically in DEQW status if the watched message has not been sent.
- After the TCP2617 message is sent to the QSYS/QSYSOPR message queue,
you should verify that the trace has ended:
- At the command line, type DSPMSG MSGQ(*SYSOPR).
- You should see the CPI3999 message which indicates that the QSCCMNxxxx watch session associated with STRCMNTRC command was ended because of reason code 02. Reason code 02 indicates that Watch for event criteria met because of message id TCP2617 found in QSYS/QSYSOPR.
- You can also verify that the watch session has ended using WRKWCH command as indicated in step 2.
- Format the trace output using the Print Communications Trace (PRTCMNTRC) command to analyze the collected trace data. You might see that information is sent to the remote system but a response is not sent back. This indicates that the problem lies outside the local system.
Parent topic:
Scenarios: Using watch support with traces