Enabling Adabas Tracing

#### Search Results

Search

# Enabling Adabas Tracing

Tracing should only be used if errors occur, and only with assistance from our support.

| Warning: Activating the trace version will massively degrade the performance of Adabas.

- Enabling Tracing on Linux

- Enabling Tracing on Windows

## Enabling Tracing on Linux

To enable tracing on Linux

1. Change to the directory Adabas/trace/INSTALL.

2. Source the adaenv file to change the ADAPROGDIR variable.

3. Set the environment variable PT_TRACELEV to a reasonable value (with the help of our support).

4. Set the environment variable SAGTMP to a directory of your choice as the location of the trace files. Note that the trace files can get very large in a short time.

5. Set the environment variable PT_MAXFILESIZE (this step is optional).

   This defines the maximum size (in bytes) for a PT trace file. If the PT output exceeds this limit, output will be written to the wrap file named <user>.WRP.<trace-name>; if the wrap file becomes too big, output will be written to the original trace file <user>.<trace-name>, and so on. This feature is useful if you have too much PT output in your program.

   Note that the minimum value for PT_MAXFILESIZE is 1024; all values less than this (other than zero) will be automatically adjusted to 1024. A reasonable initial value is 10000000, which will create a maximum file size of 10MB.

## Enabling Tracing on Windows

To enable tracing on Windows

1. Ensure that the correct Adabas version was activated.

2. Open an Adabas command prompt window.

3. Change to the directory Adabas\trace\INSTALL.

4. Call the adaenv.bat command file. This will set the trace environment.

5. As an alternative, the trace environment can be started by running the starttraceenv.cmd script. This script can be found in the folder Adabas\trace\INSTALL.

6. If you want to trace the adanuc process which is under Adabas System Service control (adasrv), you must de-install the services of the optimized (release) version by executing the following commands. Make sure you run these commands with Windows Administrator permissions:

   - adasrv stop

   - adasrv remove

   - adashm stop

   - adashm remove

   Install the trace versions of the Adabas System Services:

   - adashm install

   - adashm start

   - adasrv install

   - adasrv start

7. Set the environment variable PT_TRACELEV to a reasonable value (with the help of our support).

8. Set the environment variable SAGTMP to a directory of your choice as the location of the trace files. Note the trace files can get very large in a short time.

9. Set the environment variable PT_MAXFILESIZE (this step is optional).

   This defines the maximum size (in bytes) for a PT trace file. If the PT output exceeds this limit, output will be written to the wrap file named <user>.WRP.<trace-name>; if the wrap file becomes too big, output will be written to the original trace file <user>.<trace-name>, and so on. This feature is useful if you have too much PT output in your program.

   Note that the minimum value for PT_MAXFILESIZE is 1024; all values less then this (other than zero) will be automatically adjusted to 1024. A reasonable initial value is 10000000, which will create a maximum file size of 10MB.

10. If you have performed step 5, revert back to the release versions of the Adabas Systems Services by performing the following steps:

    - Open an Adabas command prompt window from the Windows Start menu. Make sure you have Windows Administrator privileges (“Run As Administrator”).

    - Remove the trace versions of the Adabas System Services:

      - adasrv stop

      - adasrv remove

      - adashm stop

      - adashm remove

    - Install the release versions of the Adabas System Services:

      - adashm install

      - adashm start

      - adasrv install

      - adasrv start

### On this page

- Enabling Tracing on Linux
- Enabling Tracing on Windows