Options for filtering information in the trace-cfg.xml

Various options are available for controlling the output of the trace-cfg.xml, and for reading the output when using the binary trace facility.

Overview

There are three types of information defined in the trace-cfg.xml file: groups, records, and fields. These three types of information are arranged hierarchically as follows:
  1. Groups: can contain groups or records
  2. Records: can contain records or fields
  3. Fields are the leaf of the tree and cannot contain sub-elements.

Using the -depth and read options in the BTF, you can control what information is printed, and determine what you want filtered out of trace by specifying a traceSpec.

-depth options

You can use the -depth <maxDepth> option to control the types of information you want printed. To do this, add an additional argument specifying the name of a group, record, or field that you want to use as a filter. For example, to see all information immediately following the http group, you would specify<InstallRoot>/bin/trace info http –depth 1. To see information immediately below the http.request group, you would run <InstallRoot>/bin/trace info http.request –depth 1.

-depth with arguments

Add arguments to the -depth command to further filter your information. The depth that you specify will include all groups, records, and fields that are within the specified depth from the initial argument provided. For example, to see all information immediately following the http group in the trace-cfg.xml, run the following command:
<InstallRoot>/bin/trace info http –depth 1
To see all information immediately following the http.request group, run the following command:
<InstallRoot>/bin/trace info http.request –depth 1

Reading trace

To read the btrace files in the logs directory, run the following command, where <logsDirectory> is the log directory, and <traceSpec> is the variable:
<Root>/bin/trace read <logsDirectory> [<traceSpec>]
For example, to see all trace in the http group in the logs from the current directory, run the following:
<InstallRoot>/bin/trace read. http

The URL for this topic is: