HP-UX SNAplus2 Diagnostics Guide

Using Logging and Tracing
Tracing
Chapter 3 83
CSV
NOF
Performing API Tracing
To set up and control API tracing, complete the following steps before
starting the application program using the API:
Step 1. Use the SNATRC environment variable to specify one or two trace data
files and whether to activate tracing when the application starts. The
syntax for the SNATRC environment variable is:
file1
[:[
file2
][:]]
Specify the following parameters:
file1
Name of the trace file.
file2
Optionally included name of a second trace file. Use
a colon to separate the two file names.
Final colon (:) The optional final colon indicates that tracing is
active as soon as the application is started. If
tracing is not active when the application is started,
activate it from within the application by using the
CSV DEFINE_TRACE verb or the HLLAPI function
Set Session Parameters. If you specify only one
file name, use two colons to make tracing active as
soon as the application is started.
For example:
If you type export SNATRC=file1.trc:file2.trc at the command
line, tracing is to two files, and tracing is inactive when the API
application is started. However, you can start it later, as described in
“Controlling API Tracing from within an Application”.
If you type export SNATRC=file.trc:: at the command line, tracing
is to one file, and tracing starts when the API application starts.
Step 2. If you specify two file names, use the SNATRACESIZE environment
variable to set the maximum size of each trace file. (If you specify only
one file name, the size of the trace file has no limit.) For more
information about how to use SNATRACESIZE, see “Controlling Trace
File Contents”.