If you turn on component trace, WebSphere Application Server enterprise
services stores trace data in one or more trace logs, which must be formatted
before you can read their contents.
After you have formatted a trace log,
as described in related tasks, you can use the protrace utility to filter
the formatted trace information. You can use the protrace utility to filter
the formatted trace information, to perform one or more of the following actions:
- Filtering: each entry in the trace is reduced to a single line (with the
exception of raw data).
- Filtering: entry and exit trace points are used to control indenting of
the output. A separate indent is maintained for each thread in the trace.
- Formatting: parenthesis are added to the output to allow editors such
as vi to match entry and exit trace points.
- Filtering: the utility is configurable. For example, fields (for example,
PID) can be switched off.
- Sorting: the output is sorted into date and time sequence.
To use the protrace utility to filter a formatted trace log file, complete the following steps
-
Open a command-line window on the host where the formatted trace log
is stored.
-
On the command line, type the following command
protrace inputfile [outputfile] [-t thread] [-i maxindent] [-r] [-m]
[-s(b,e,d,n,p,t,r,i)] [-inc stringlist] [-exc stringlist] [-v]
Where:
- inputfile
- is the file output from the showlog or combtrace command.
- outputfile
- (if specified) the output is sent to this file rather than sent to standard output.
- -t thread
- displays entries for the specified thread.
- -i maxindent
- specifies the maximum indent level. Set it to 0 (zero) to disable indenting.
- -r
- includes any raw data in the output.
- -m
- displays the primary message.
- -s(b,e,d,n,p,t,r,i)
- suppresses output specified by one or more of the following characters appended to the -s:
- b
- disables braces. ({})
- e
- disables extended message.
- d
- disables date/time.
- n
- disables entry numbering.
- p
- disables process Id.
- t
- disables thread Id.
- r
- disables the thread indent report generated after each run.
- i
- disables the raw data indicator.
For example, the option -sedp means that extended message, date/time, and processId information is suppressed.
- -inc stringlist
- specifies a set of inclusion strings. The primary or extended message must contain at least one of these strings to be output. Separate each entry in the list with white space.
- -exc stringlist
- specifies a set of exclusion strings. The primary or extended message must not contain any of these strings to be output. Separate each entry in the list with white space.
- -v
Notes:
- By default, open and close braces ({...}) are added to entry and exit trace points. This allows bracket matching in editors such as vi.
- The list separator in the inclusion and exclusion options is a space character. Inclusion or exclusion strings that contain a space character must be delimited with quote (") symbols. For example: -exc "was entered".
- The R field in the output is the raw data indicator field. This field is only displayed when the raw data display is disabled and is used to highlight entries that have raw data associated with them. Such entries have a dash (-) in this field. To remove the indicator, and append the raw data to the output, specify the -r flag on the command line.
- The protrace utility warns you if any invalid entries are found in the input file. A trace entry is invalid if the function name is missing or the date/time field is missing or incorrectly formatted.
The output in the outfilename file can be displayed in
a text editor (or some other utility).