Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

trace

The trace command is used to get detailed information about the program flow for IRAPI applications and other system processes.

In general, tracing an application is one of the best ways to debug an application. It provides minimal additional overhead on the process being debugged. In very rare cases, tracing may change the behavior of the problem by changing the timing of events.

The trace command options can be used to significantly alter the verbosity of the output. If in doubt about how much information to collect, it is best to collect more than enough information into a trace output file that can be searched later (using vi, grep, awk, etc.). When a small amount of trace output is expected, it may be useful to send the output through the tee(1) command. The tee command displays the output on the screen and saves it to a file for viewing later. When a large amount of trace information is expected, redirect the output directly to a file. Directing a large amount of information to the screen using tee causes delays in writing to the terminal, and thus messages may be lost.

The following example of the trace command provides detailed tracing information about TSM using the tee command. The lbolt option includes the system lbolt in the trace output. The lbolt option is a counter that starts with 0 when the system is booted and incremented every 1/100th of a second.

trace tsm date lbolt chan all area all level all | tee /tmp/trace.out

The following example of the trace command provides detailed tracing information about TSM to the /tmp/trace.out file.

trace tsm date chan all area all level all > /tmp/trace.out

The date option causes the trace output to include date and time stamps. This helps establish the time between events and helps reconcile the trace output with events and alarms displayed by the logCat command (described above).

IRAPI applications can use trace functions to provide application-specific tracing messages. These application-specific trace messages can complement the trace messages generated by internal IRAPI functions.

© 2006 Avaya Inc. All Rights Reserved.