Diagnosing RTclient Problems


RTclient can use API functions to help diagnose problems. Options and commands can also be used to debug RTclient in many situations without requiring any programming. RTmon should be used whenever possible to help pinpoint and debug problems within RTclients.

Connections and Messages

RTclient uses connections and messages, and you need the techniques described in the previous sections. Always use TipcSrvDefaultCbCreate to create a default callback in the connection to RTserver. The callback function then calls TipcMsgPrintError to immediately expose unwanted messages. The function TipcSrvPrint can be used to print all the information about the connection to RTserver.

Why RTclient Is Not Receiving Data

During the development of a project with RTclient, it can be puzzling why an RTclient process does not appear to be receiving data. There are several reasons why this might occur, including:

Tracing Lost Messages

Message files can often be used to incrementally track down why data is not being received. You can start at either the sending or receiving RTclient process and work through the connections to find the problem. The RTclient and RTserver logging options can be used to trap the flow of data at various points.

For example, if a subscribing RTclient does not appear to be receiving any messages from a publishing RTclient, try setting the option Log_In_Data in the subscribing RTclient to see if it is really receiving the messages. If the messages appear in the resulting message file, then the problem lies in that subscribing RTclient. It might not be creating the proper connection process callbacks.

If the messages do not appear in the resulting message file, try setting the option Log_Out_Data in the publishing RTclient to determine if it is really sending the messages.

If the problem appears to lie in RTserver, you can log messages in RTserver to debug the problem. See Useful Commands for more information on RTserver debugging commands.

Useful Options

These RTclient options can be used for debugging:

have RTclient provide feedback on commands executed.
file to write incoming data-related messages.
file to write incoming internal messages.
file to write incoming status messages.
file to write outgoing data-related messages.
file to write outgoing internal messages.
file to write outgoing status messages.

The Log_* options allow you to easily write messages into message files when entering or leaving RTclient.

Useful Commands

These RTclient commands are provided to make debugging easier:

sets or displays the value of an option.
returns information on memory usage, elapsed wall clock, and CPU time.
lists the subjects being subscribed to.

The setopt command (when issued without any arguments) prints the current setting of all RTclient options.

The stats command provides information about the CPU usage of RTclient. The information includes the total amount of CPU and wall clock time since RTclient was started, the amount of memory the program is using (sbrk address), and the differences since the last stats command was issued. Below is an example of the stats command:

CLIENT> stats 
Total accumulated CPU time: 3.866 seconds 
Total frames processed: 12 
Current sbrk address: 251840 
Differences since last stats command: 
 CPU time, 0.383 seconds, wall time, 11.174 seconds 
 Frame count: 5, Frame rate: 0.447 frames per second 
 Sbrk address changed by 0 bytes. 
CLIENT> 

The subscribe command (when issued without any arguments) prints a list of the subjects to which RTclient is currently subscribing.


TIBCO SmartSockets™ User’s Guide
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com