Record APPX session and process activity

Use the Usage Log to answer questions such as which processes ran or when a session ended. Choose the events before starting a test session.

Log just the session boundaries

  1. Set APPX_USAGE_LOG=ULOG.dat for the APPX engine. A bare filename ending in .dat selects the shared APPXIO log in the System Administration data directory.
  2. Set APPX_USAGE_BITS=0x00000200 to select session start and end. To record process starts and ends instead, use 0x00000001.
  3. Start and end a test session. Use the ULOG layout from application 0LC to read the resulting records.

The APPX Usage log gives you the ability to track session log on/off, process execution and more.

Overview

The APPX Usage log can be used to track the execution of APPX processes, session start/end, error messages and C-asserts. It is controlled by setting 2 environment variables. See Setting Environment Variables for a discussion on setting them.

Activation

Set APPX_USAGE_LOG to the output filename. For a shared APPXIO log, use a bare filename ending in .dat, such as ULOG.dat. APPX creates it in the 0SA/Data directory under APPXPATH.

For a text log, give each session its own output file. Multiple sessions writing to the same text file can overwrite or mix records.

The ULOG file in 0LC contains the layout of the log file.

To control what events are logged, set APPX_USAGE_BITS according the following:

FlagWhat APPX records
00000001 (dec 1)logs process begin and end (OS process ID, application ID, version, database, process type, and process name)
00000002 (dec 2)engine system errors
00000004 (dec 4)CASSERT messages
00000008 (dec 8)subprocess invocations
00000010 (dec 16)CANCEL
00000020 (dec 32)CANCEL and ERROR
00000040 (dec 64)CANCEL, ERROR and WARNING
00000080 (dec 128)CANCEL, ERROR, WARNING and MESSAGE
00000100 (dec 256)log TRACE messages
00000200 (dec 512)log session start/end
80000000include timestamps in the log

Use hexadecimal notation with a 0x prefix when combining flags. For example, APPX_USAGE_BITS=0x80000200 selects timestamps and session start/end records. Use 0x80000201 to include process start/end records as well.

When APPX_USAGE_LOG is set and APPX_USAGE_BITS is omitted, the engine defaults to timestamps, process start/end and CASSERTs (0x80000005).

Reading the Usage Log

To read the usage log, design transfer the ULOG file from 0LC to an application of your choice and then create any reports or inputs you require. Since the actual log file is stored in $APPXPATH/0SA/Data, which is not normally readable by standard APPX processes, you will have to copy to a standard location within a database.

For example, if we design transferred ULOG to the DMO application in Database ABC, then on a Linux/Unix server we could:

$ cp $APPXPATH/0SA/Data/ULOG.dat $APPXPATH/ABC/DMO/Data/ULOG.dat

We could also use the .FILE COPY API to copy the file without regard to the underlying operating system.

Comments

 

-- %USERSIG{JeanNeron - 2016-04-06}%
Topic revision: r4 - 03 Dec 2026, AdminUser - This page was cached on 03 Dec 2026 - 19:32.

Powered by Foswiki. Wiki content belongs to its contributing authors.