Use the binary trace facility - Intelligent Management
Intelligent Management provides a binary trace facility (BTF) that permits the gathering of trace information in a production environment with a minimal impact on performance. The BTF is useful for both customers and development teams because its efficiency facilitates leaving a basic level of trace on all the time; thus, it is frequently the case that the data necessary for troubleshooting a problem has been captured the first time it occurs.
The binary trace facility (BTF) is rule-based, and deeper tracing can be enabled based on conditions detected at runtime. The BTF can:
- Use the trace data generated by default.
- Use the cell custom property to capture additional debug information and not impact your performance.
Do not modify the trace-cfg.xml file syntax. Instead, use of the cell custom properties to control the BTF. The trace-cfg.xml contains the initial trace enablement settings used by the trace facility. After being loaded, trace-cfg.xml is not loaded again by the JVM..
If we restart the server all btrace files will disappear and get regenerated from scratch.
The trace command has two main parameters:
The "read" parameter: Reads the BTF file and displays it. The "info" parameter: Displays information about what types of information are going to be printed.
Tasks
- To translate the binary trace files that are produced by the BTF into a human readable form.
cd app_server_root/bin/trace
app_server_root/bin/trace read <logDirectory> [<traceSpec>]
<logDirectory> Path to a server log directory. <traceSpec> Trace specification, which is a comma-separated list of elements of the form <groupOrRecord>[<:traceLevel>], where groupOrRecord specifies the name of a group or record, and traceLevel identifies the level of debug desired, as defined by the group or record. -filePrefix Indicates that a non-default trace file prefix name is being supplied. <prefix> Trace file prefix name. The default is btrace For example, to read the btrace files in the current directory for all records,
cd app_server_root/bin
trace read .To see all btrace in the http group in the logs from the current directory, down to level 2 trace...
cd app_server_root/bin/
trace read . http:2- To get a description of everything that can be traced...
cd app_server_root/bin/
trace info [<groupOrRecordOrFieldName>] [-depth <maxDepth>]
<groupOrRecordOrFieldName> Name of a group, record, or field for which information is needed. -depth Indicates that a maximum depth is being supplied. <maxDepth> The depth specified will include all groups, records, and fields that are within the specified depth from the initial argument provided. Use the field descriptors to limit your output, and -depth to further refine that by limiting how deep into the hierarchy the filter should go. If we do not specify a maximum depth, all of the information is displayed.
For example, for information on the http.request group, but no deeper,:
app_server_root/bin/trace info http.request -depth 1
Subtopics
- Intelligent Management: binary trace facility custom properties
We can modify trace dynamically and persistently by setting a cell custom property.
Intelligent Management: binary trace facility custom properties