Tivoli Header

[ Previous Page | Next Page | Table of Contents | Index ]

Reference Manual

Tivoli Management Framework Reference Manual, 3.7.1, March, 2001


wtrace

Provides information to debug methods.

Syntax

wtrace [-hjlnuvDEHIJOV] [format_options] -k db_dir

Description

The wtrace command is used to diagnose problems in custom methods and executable files by examining method input, transactions, and method output.

To use wtrace, you must first turn on tracing within the Tivoli object dispatcher. This causes the creation of a trace log named odtrace.log. This file is created in the database directory of the specified clients. By default, the trace log is 1 MB (512 2-KB-trace records), but this can be changed by restarting the object dispatcher and specifying a new size with the -t option.

Tracing is persistent across invocations of the object dispatcher. This means that if the object dispatcher restarts, you do not have to reenable tracing. Because wtrace examines the trace log directly, it does not require the object dispatcher to be active, although having an object dispatcher available to run odstat is helpful.

You can use the odadmin command to enable tracing for single or multiple object dispatchers. The following are some examples:

  1. Enable tracing for all object calls on the current object dispatcher:
    odadmin trace objcalls 
    
    
  2. Enable tracing for all object calls on all object dispatchers:
    odadmin trace objcalls all 
    
    
  3. Enable tracing for error conditions on the current object dispatcher:
    odadmin trace errors 
    
    
  4. Enable tracing for object service calls on all object dispatchers:
    odadmin trace services all 
    
    
  5. Enable tracing of object service calls and errors on all object dispatchers:
    odadmin trace services all
    
    odadmin trace errors all
    
    

Output Format

The wtrace command has numerous formatting options that provide varying amounts of displayed data. This section describes two of the common usages of wtrace. See Options for a full list of formatting options.

Four general rules apply to the output format of wtrace:

  1. Structure output is enclosed in curly braces ({}).
  2. Arrays are enclosed in square brackets ([]).
  3. Sequences are structures that have a count field followed by an array of elements.
  4. A top-level transaction has the following general format:
    {
    
      111111:1,111111:1,2:3311
    
    }
    
    #4
    
    

The most common usage of wtrace is as follows:

wtrace -jk /usr/Tivoli/spam.db

The j flag produces a preselected set of information. Output similar to the following is displayed:

loc-ec 676 15:10:36 M-H    1-289    0 NOT_FOUND     

Object ID:  333333.1.387#FpPol::FilePackagePolDef#

     Method:   o_setattr

     Method Args: fp_def_src_host 

     Principal:  root@albundy (0/0)

     Path:    o_setattr

     Trans Id:  

        {

         333333:1,333333:1,2:405

        },        {

         333333:1,333333:1,2:406

        }

        #3

This is a local object call on thread ID 676 run at 15:10:36 local time. The method o_setattr was invoked on object reference 333333.1.387#FpPol::FilePackagePolDef# with the option fp_def_src_host. Error status of NOT_FOUND was returned.

In this verbose form, the transaction ID, the principal invoking the method, the effective user ID and group ID of the method, and the path to the method are also provided.

The following example entry shows an error condition (exception) that was detected:

loc-ec 6073 16:28:01 M-hdoq  1-6047    26 e=12    

Object ID: 333333.1.26

    Method:   get_all

    Principal: root@ajax (60001/60001)

    Helper pid: 2419   

    Path:    /home/Tivoli/bin/solaris2/TMF/BASESVCS/TNR_prog1

    Trans Id:

       {

        333333:1,333333:1,7:4042

       },

       {

        333333:1,333333:1,7:4063

       }

       #3

     

    Input Data: (encoded): "NisDomain" 9999

    Results: (encoded):

     "Exception:UserException:SysAdminException::ExException:

      SysAdminException::ExInvalid:SysAdminException::ExNotFound

      {

       "Exception:UserException:SysAdminException:

       :ExException:SysAdminException::ExInvalid:

       SysAdminException::ExNotFound" "TNR_errors"

       1 "The resource type %7$s was not found." 

       779578081

       {

         0

       }

       "NisDomain"

      }

In this example, root@ajax invoked the get_all method on the name registry (object reference 333333.1.26) with the effective user ID of "nobody" (60001). Input Data shows that the option NisDomain was passed to the method. From the error code (e=12) and the output in Results, you can see an exception was detected indicating that a specific resource of type NisDomain was not found.

Options

-D
Prints large blocks of input data.

-E
Suppresses printing of error records.

-h
Prints header used in the "old" format.

-H
Suppresses printing of hex dumps.

-I
Suppresses printing of input records.

-j
Prints the preferred format for normal screens (80 columns).

-J
Prints the preferred format for wide screens (132 columns).

-k db_dir
Specifies the Tivoli database directory.

-l
Prints the long form output.

-n
Prints additional new lines between transactions.

-O
Suppresses printing of output records.

-u
Prints the command's usage message.

-v
Prints in verbose mode (included for backward compatibility).

-V
Prints the version number of the command.

format_options
Specifies additional options that modify formatting of the output. The available formatting options are as follows:

-e lines
Specifies the threshold for line breaks. The default is 5.

-f
Turns off printing of abbreviated numbers (for example, 3.2K instead of 3219).

-t tab_size
Specifies the tab increment. The default is four characters.

-w width
Specifies maximum width of the formatted line. The default is 80.

-W width
Specifies minimum width of the formatted line. The default is 70.

Defects

A corrupt trace log can cause wtrace to dump core.

See Also

odadmin


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]