You can use the function Activity Tracing to record processing steps made in the system when a user carries out an action. You can display the results in the Log Viewer of the J2EE Engine and analyze them for performance information and errors.
If you activate activity tracing, TREX processing steps that take place internally are also recorded. TREX data is particularly useful if you want to analyze actions such as searching, classifying, or creating an index.
You have to register the paths of the TREX activity traces on the log viewer server before you can display them in the Log Viewer.
For more information about activity tracing for TREX, see Activity Tracing.
In the standard configuration, TREX writes all error messages that occur during routine operation to trace and alert files. The TREX daemon, the individual TREX servers, and other TREX components all write their own trace files. As soon as a new process starts, a trace file is generated for the process in question. An alert file is written for each TREX server. In the standard configuration, the alert files contain all error messages that the index server, name server, preprocessor, queue server, and Web server produce.
Monitoring systems such as CCMS can analyze these files and make system administrators aware of new error messages. A CCMS agent analyzes the alert files and reports changes to the monitoring system. The monitoring system handles the alerts reported to it and makes a system administrator aware of them. The TREX alert server also analyzes the trace files. The alert server regularly checks important TREX functions and reports an alert to the administrator in the event of errors.
Trace files contain messages that the TREX components return during routine operations. In the standard configuration, the trace files only contain error messages. By default, trace files are located in the directory <TREX_DIR>\<trex_hostname>\trace.
<TREX_DIR> is the installation directory for TREX. The path to the directory is:
■ On UNIX: /usr/sap/<SAPSID>/TRX<instance_number>
■ On Windows: <disk_drive>:\usr\sap\<SAPSID>\TRX<instance_number>
The file names are formed as follows so that you can distinguish between the various trace files:
<prefix>.<process_ID>.<sequential_number>.trc
TrexIndexServer.1468.001.trc
TrexIndexServer.1468.002.trc
...
TrexIndexServer.982.003.trc
TrexIndexServer.982.001.trc
Important Trace and Configuration Files
TREX Component |
Trace File |
Configuration File |
|
||
Attribute engine |
TrexIndexServer.<number>.trc |
TREXIndexServer.ini |
|||
Daemon |
TrexDaemon.<number>.trc |
TREXDaemon.ini |
|||
Filter |
TrexFilter.<number>.trc |
TREXFilter.ini |
|||
Index provider |
TrexWebServer.<number>.trc |
TREXWebServer.ini |
|||
Index server |
TrexIndexServer.<number>.trc |
TREXIndexServer.ini |
|||
Name server |
TREXNameServer.<number>.trc |
TREXNameServer.ini |
|||
Preprocessor |
TrexPreprocessor.<number>.trc |
TREXPreprocessor.ini |
|||
Queue server |
TrexQueueServer.<number>.trc |
TREXQueueServer.ini |
|||
Python extensions |
PythonExtension.log |
– |
|||
RFC server |
TREXRfcSvr.<number>.trc |
imsconfig.cfg |
|||
Search engine |
TrexIndexServer.<number>.trc |
TREXIndexServer.ini |
|||
Text-mining engine |
TrexIndexServer.<number>.trc |
TREXIndexServer.ini |
|||
Index server clients |
TrexTCPClient.<number>.trc |
TREXTcpipClient.ini |
|||
Web server |
TrexWebServer.<number>.trc |
TREXWebServer.ini |
|||
The configuration files contain the following trace settings:
● Path to the trace file
● Maximum size of a trace file
● Maximum number of trace files for a process
● Trace level
● Specification as to whether performance is measured
You can also choose TREX admin tool (stand-alone) ® Landscape Area ® Trace to display the TREX trace and log files.
The TREX components each write separate trace files. As soon as a new process starts, a trace file is generated for the process in question.
These trace and log files are automatically deleted by TREX at regular intervals. In the configuration files for the individual TREX servers (TREXIndexServer.ini, TREXQueueServer.ini and so on) you can define the values and conditions regarding when the system should delete these files. You can find these settings in the [trace] section of the configuration file in question. The following parameters are relevant for this:
maxfilesize: Maximum Size of a Trace File
Value |
<size in bytes> |
Default |
10,000,000 (10 MB) |
As soon as the maximum file size of 10 MB is reached, TREX writes a new trace file.
TREX calculates the file size using the trace information that comes from the TREX subcomponents. If SAP base components write trace information, the maximum file size can be exceeded.
maxfiles: Maximum number of trace files for a process
Value |
Value 1 – 999 |
Default |
10 |
If the maximum number for a process is reached, TREX deletes the oldest trace file belonging to the process in question.
The TREX alert server regularly checks the trace files and sends an alert if the size and number exceed a certain value. In the TREX alert server, you can configure the intervals at which a check run is performed. Using the TREX admin tool (stand-alone) you can check the corresponding trace files in the Landscape Area ® Trace and delete them if necessary.
You can record a Python trace for certain TREX components. If you activate the Python trace, all calls that the TREX components receive are logged. You can use the Python trace function to record actions as executable Python script that you can make available to TREX Support for troubleshooting.
You can activate servertrace.py in the file TREXIndexserver.ini and clienttrace.py in the file TREXTCPClient.ini:
[pythontrace]
trace = on/off
By default, the Python traces are located in the directory <TREX_DIR>\trace. The table below gives an overview of the TREX components that write a Python trace, the name of the trace files, and the configuration files in which you can activate the Python trace.
Python Trace
TREX Component |
Python Trace |
Configuration File |
Index server, search engine, text-mining engine |
servertrace.py |
TREXIndexServer.ini |
Attribute engine |
attrtrace.py |
TREXAttributes.ini |
Content store |
contentStoreTrace.py |
TREXContentStore.ini |
Index server clients |
clienttrace.py |
TREXTcpipClient.ini |