The general trace system is primarily for tracing the PROIV Virtual Machine. It is also used for the PROIV Bus Manager and the Pro4 API Interface (P4API). It also effects, to a limited extent, tracing in other programs, including BUILD and the PROISAM utility programs (ISIN, etc.).

These general trace options are designed  mainly for PROIV development internal use only, to debug problems with the product, and so can produce rather cryptic information. However, they can still be extremely useful to isolate issues in application code. They may also be useful in identifying what application feature might be uncovering a product problem, and so how the application might be able to work around the issues until a future release fixes it.

Trace messages are appended to the trace files, which can get very large. Make sure you delete them periodically or you could
rapidly run out of disk space.

Each trace-enable option enables tracing for a particular functional area. The value specifies how much information to trace for that area: Level 0 = critical errors only through Level 9 = everything useful. (Values from 10 through to 15 do exist and display extremely detailed information. Typically, only the PROIV development group uses these levels for detailed analysis of a particular fault. The example values specified below indicate useful starting settings for a particular area.

In addition to general trace options, you can also use dynamic tracing feature to examine the behavior of a specific area of your PROIV application. You can set dynamic tracing ON/OFF at session level. If you set tracing at session level, the trace file generates the log for all the activities performed in the current session. However, if you set the tracing using environment variables in control panel, the trace file generates the log for all the sessions.

For example, in the global INI file (for Win32 this is typically called: C:\windows\pro4v[n].ini; for Unix: /etc/pro4v[n].ini):

[Environment]

   TRACEFILE=8

   TRACEGUI=8

   TIMESTAMP=y

   TR_PATH=c:\temp\

   TR_MAX_FILE_SIZE=0

   TR_MAX_FILES_PER_VM=1

General Trace Enable Options 

The trace options to enable tracing of the various functionality areas (categories) are:

Option Name

Suggested Level

Description

TRACE (obsolete)

NA

Equivalent to TRACEUSER.

TRACEALL

 

Abbreviated method to set the same level for all trace categories. Individual areas may be set to a different level by also specifying them.

TRACEBLK

NA

File record data field deblock / block. (Not currently used.)

TRACECRT

3

High-level screen interface.

TRACEDAEMON

9

Pro4 Bus Manager.

TRACEENV

4

Processing of Environment settings.

TRACEFILE

8

File system access.

TRACEGEN

8

Function GEN info.

TRACEGUI

8

GUI Client hints.

TRACEIO

9

Screen client I/O.

TRACELGC

5

Logic execution.

TRACEMEM

4

Memory allocation.

TRACEMFIN

4

Screen Input field set structures.

TRACEMFOUT

NA

Screen output field set structures. (Not used for Unix, Windows.)

TRACEMISC

 

Miscellaneous trace.

TRACEREC

3

File recovery (file commit / rollback processing).

TRACEREP

4

Report output.

TRACESER

6

Product Licensing.

TRACESQL

3

SQL File Interface.

TRACETASK

9

Pro4 Tasks and Pro4 Bus Interface.

TRACEUSER

3

User (developer) application trace information. (This is currently very limited in scope.)

TRACEUSRTB

NA

Win32 ProAdmin administration tool interface. (Not currently used.)

TRACEFILE levels 

Tracefile is used to trace the file system access interface. For SQL files, see TRACESQL

2

sysfopnfile open failures

4

displays successful file open (sysfopn)

5

all file closes (sysfcls)

8

record read (sysfrd) - display the first 32 bytes of every record read.

9

will display the contents of the entire record.

The following options are used to track down problems in PROIV itself, and are not generally useful for end users.

-      Trace function reGEN: tracegen=8

-      Trace input field set structures: tracemfin=4

-      Global enable for all TRACExxxx options: traceall=9

Setting TRACEFILE=8 can be useful in tracking down file access problems (it will show which files are being accessed and what key values are being used). In particular, lines starting with:

-  "sysfopn"/"sysfcls" = file open/close;

-  "sysfrd"/"sysfwrt"/"sysfdel" = read/write/delete record;

-  "sysfacc"/"sysftest" = filename accessibility check.

Setting TRACEGUI=9 can be useful in seeing where your application is executing. In addition to a lot of detailed and difficult to interpret GUI info, it shows:

-  current function name (look for lines starting “guiHint: 1d=FUNCT_NAME);

-  current LS (“guiHint: 1b=LS_START" and “guiHint: 1c=LS_END");

-  current field number ("guiFldVisit:");

-  messages (“guiHint: 03=UMSG? = logic UMSG and status messages (such as report/regen in progress ..); “..04=MSG" = logic MSG and PROIV system error messages; “..05=HMSG" = help messages);

-  wait for terminal input (“guiHint: 10=INPUT")

Comment on this topic

Topic ID: 750024