To troubleshoot problems in the APX component's functionality it is possible to define tracing its activity. The daemon and the Natural application with the APX lib can be traced separately. In order to determine which of the two components' activity should be traced follow these guidelines: when the problem seems to be to do with connecting the ApplinX server to the APX daemon (including authentication problems), trace the daemon component. For any other problems trace the Natural application. Note that it is not recommended to use the trace file in the production environment on a regular basis.
To trace the APX daemon
Go to the $NATDIR/$APXNODE directory.
Edit the apxsrvd.sh file.
Find EXECUTABLE=apxsrvd, and change it to EXECUTABLE=apxsrvd.tr
Define the following environment variables (the following is an example of how these should be defined in sh/bash):
> PT_TRACELEV=i6000 > SAGTMP=$HOME/tmp > export PT_TRACELEV > export SAGTMP
The trace files are created in the $SAGTMP directory. In the example above this is $HOME/tmp.
Restart the daemon:
> apxsrvd.sh servicename stop > apxsrvd.sh servicename start
or
> apxsrvd.sh portnumber stop > apxsrvd.sh portnumber start
To trace the Natural Application with the APX library
Go to the $NATDIR/$APXNODE directory.
Edit the apx.sh file.
$NATDIR/$NATVERS/bin/natapx parm=$PARAMETERS etid=$$
>/dev/null 2>&1
Change natapx to natapx.tr
Uncomment (by removing the # from the beginning of the rows) the TRACE section.
The trace files are created in the $SAGTMP directory.
By default it is $HOME/tmp. It will take effect when next connecting to the daemon.
See Installing APX Component for Natural UNIX Protocol for more information.