CLI uses these environment variables to decide whether to collect any CLI trace.
- Minimal tracing without parcel dumps
- Tracing with parcel dumps
- Tracing on a thread basis (Windows platforms only)
COPANOMLOG
COPANOMLOG should be set to the file name in which the user intends to collect the trace. On Windows platforms, the trace file name provided in the COPANOMLOG is appended with a .txt extension.
- Unix
my_copalog, my_copalog_0001, my_copalog_0002, my_copalog_0003
- Windows
my_copalog.txt, my_copalog_0001.txt, my_copalog_0002.txt, my_copalog_0003.txt
The COPANOMLOG_SIZE environment variable can change the maximum size of copanomlog. Most operating systems support files up to 2 GB.
Use the COPANOMLOG_COUNT environment variable to set the number of COPANOMLOG files to keep if the log size exceeds the value in COPANOMLOG_SIZE. With log pruning enabled, once the desired number of log files is created, the oldest log file will be deleted when a new log file needs to be created. The initial log file will always be kept, because it contains valuable information that is only logged at startup. The minimum value is 2 because the initial log file is always kept, so there will always be at least two log files present. Using the example above, if COPANOMLOG_COUNT is set to 3, when my_copalog_0003 is created, the file named my_copalog_001 will be deleted. This variable is useful when reproducing a problem with COPANOMLOG tracing enabled, and the problem takes a long time to reoccur which results in many gigabytes of log data.
CLIERRLOG
- my_errlog_tduser.txt
There is no size limit on the error log file, but it grows much more slowly than the COPANOMLOG file.
NETRACE
- NETRACE = 0: (or environment variable not set) incoming/outgoing parcel dumps are disabled, only minimal tracing enabled.
- NETRACE = 1: enable incoming/outgoing parcel dumps
- NETRACE = 2: disable timestamps
- NETRACE = 4: enable session and request level CLIv2 options dumps
- NETRACE = 8: enable DBCAREA dumps
- NETRACE = 16: enable LCC logging
- NETRACE = 64: enable federated SSO logging
- NETRACE = 128: enable HTTP protocol logging
The above values can be added together to enable logging multiple items. For example, to enable incoming/outgoing parcel dumps and DBCAREA dumps, set NETRACE=9 (1 + 8). To enable federated SSO and HTTP protocol logging, set NETRACE=192 (64 + 128).
The NETRACE_BUF_LEN variable can be set to limit the number of bytes that are dumped to the COPANOMLOG file when incoming/outgoing parcel dumps are enabled (i.e., NETRACE=1). For example, setting NETRACE_BUF_LEN=64 will only dump the first 64 bytes of each incoming/outgoing parcel.
THREADLOGGING
If the THREADLOGGING variable is set to 1 (default value is 1), CLI trace is collected on a thread basis. All other values do not enable the thread-logging feature. For example, if COPANOMLOG is set to c:\tmp\coplog on Windows, and /tmp/coplog on non-Windows, three threads would create the following three files:
• Windows:
- C:\tmp\coplog.23fc.3fc0.txt
- C:\tmp\coplog.23fc.3fc1.txt
- C:\tmp\coplog.23fc.3fc2.txt
where 23fc is a process ID, and 3fc0, 3fc1, and 3fc2 are thread IDs.
• Non-Windows:
- /tmp/coplog.23fc.3fc0
- /tmp/coplog.23fc.3fc1
- /tmp/coplog.23fc.3fc2
where 23fc is a process ID, and 3fc0, 3fc1, and 3fc2 are thread IDs.
If data encryption is enabled by applications for a request, then request and response messages printed for that particular request in the trace will be encrypted.
On Windows platforms, the COPANOMLOG file names contain thread IDs. On Non-Windows platforms, the COPANOMLOG file names contain a thread ID and a process ID.
When each coplog file reaches the COPANOMLOG_SIZE (in MB), new files with serial numbers are created, as follows:
• Windows:
- c:\tmp\coplog.23fc.3fc0.txt
- c:\tmp\coplog.23fc.3fc0_0001.txt
- c:\tmp\coplog.23fc.3fc0_0002.txt
- c:\tmp\coplog.23fc.3fc0_0003.txt
where 23fc is a process ID, and 3fc0 is a thread ID.
• Non-Windows:
- /tmp/coplog.23fc.3fc0
- /tmp/coplog.23fc.3fc0_0001
- /tmp/coplog.23fc.3fc0_0002
- /tmp/coplog.23fc.3fc0_0003
where 23fc is a process ID, and 3fc0 is a thread ID.
THREADONOFF
The environment variable THREADONOFF turns multithreaded support on or off (default value is 1). Setting the variable to 1 turns on multithreaded support; 0 turns it off. Values other than 1 or 0 have no effect.