WebSphere Virtual Enterprise, Version 6.1.1
             Operating Systems: AIX, HP-UX, Linux, Solaris, Windows, z/OS


Using the binary trace facility

WebSphere® Virtual Enterprise provides a binary trace facility (BTF) that, by default, gathers trace information in a production environment that is useful for customers and development teams, because the level of trace gathered facilitates troubleshooting problems without having to reproduce the problem. Further, optimal performance in your environment is not compromised.

About this task

The primary advantage of using the BTF is to provide an efficient means, with respect to CPU and disk space, of gathering trace information in a production environment that is usable and understandable to customers, support, or development teams. With a more efficient trace facility, the level of trace gathered by default facilitates troubleshooting problems without having to reproduce the problem or affecting good performance in your environment. There are three ways to use the BTF:
  1. Use the trace data that is generated by default.
  2. Modify trace dynamically by setting a cell custom property. See Binary trace facility custom properties .
  3. Modify the <WAS_install>/etc/trace-cfg.xml file. All BTF tracing is done to each server’s log directory. By default, the files are currently named btrace.#, where # is a monitonically increasing integer starting at 1. You can edit and copy this file into the <ProfileRoot>/config/cells/<cellName> directory and/or into the same directory as your process's server.xml file.
    Note: Modifying the trace-cfg.xml is not recommended. It is not a dynamic file, is a more technical method, and could break during future migrations.

Procedure

  1. To get a complete usage description of the trace command, run the following command from <Install_root>/bin/trace. The following is a sample output:
    myServer:/opt/WAS611/bin #./trace
    Usage error: too few arguments
    Options:
       To read binary trace:
          read <logDirectory> [<traceSpec>] [-filePrefix <prefix>]
       To get information about trace groups, records, and fields:
          info [<groupOrRecordOrFieldName>] [-depth <maxDepth>]
    where:
       <logDirectory> is the path to a server log directory
       <traceSpec> is trace specification, which is a comma-separated list of elements of the form:
          <groupOrRecord>[:<traceLevel>]
       <prefix> is the trace file prefix name (default value is 'btrace.')
       <groupOrRecordOrFieldName> is the name of a group, record, or field for which information is needed
       <maxDepth> is the maximum depth to recurse when printing group, record, or field information.
    xdblade01b02:/opt/WAS611/bin #
  2. To get an XML description of everything that can be traced, run the following command:
    <InstallRoot>/bin/trace info
  3. To control the amount of information printed use the -depth <maxDepth> option. See Options for filtering information in the trace-cfg.xml . In order to control the type of information that is printed, add an additional argument specifying the name of a group, record, or field. For example, to see everything immediately below the HTTP group, type:
    <InstallRoot>/bin/trace info http.request -depth 1
  4. For example, to display everything immediately below the group named http, type:
    <InstallRoot>/bin/trace info http.request -depth 1



Related information
Binary trace facility custom properties
Task topic    

Terms of Use | Feedback

Last updated: Oct 30, 2009 1:32:42 PM EDT
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r1m1/index.jsp?topic=/com.ibm.websphere.ops.doc/info/odoe_task/todoebtf.html