[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5

trcrpt Command

Purpose

Formats a report from the trace log.

Syntax

trcrpt-c ] [ -C [ CPUList | all ]] [  -d List ] [ -D Event-group-list ] [  -e Date ] [ -G ] [ -h ] [  -j ] [ -k List ] [ -K Group-list ] [ -n Name ] [  -o File ] [  -p List ] [  -r ] [  -s Date ] [  -t File ] [  -T List ] [  -v ] [ -O Options ] [  -x ] [ File ]

Description

The trcrpt command reads the trace log specified by the File parameter, formats the trace entries and writes a report to standard output. The default file from which the system generates a trace report is the /var/adm/ras/trcfile file, but you can specify an alternate File parameter.

You can use the System Management Interface Tool (SMIT) to run the trcrpt command by entering the SMIT fast path:

smit trcrpt

Flags

-c Checks the template file for syntax errors.
-C [ CPUList | all ] Generates a report for a multicpu trace with trace -C. The CPUs can be separated by commas, or enclosed in double quotation marks and separated by commas or blanks. To report on all CPUs, specify trace -C all. The -C flag is not necessary unless you want to see only a subset of the CPUs traced, or have the CPU number show up in the report. If -C is not specified, and the trace is a multicpu trace, trcrpt generates the trace report for all CPUs, but the CPU number is not shown for each hook unless you specify -O cpu=on.
-d List Limits report to hook IDs specified with the List variable. The List parameter items can be separated by commas or enclosed in double quotation marks and separated by commas or blanks.
-D Event-group-list Limits the report to hook ids in the Event groups list, plus any hook ids specified with the -d flag. List parameter items can be separated by commas or enclosed in double quotation marks and separated by commas or blanks. Event groups are described in "Debug and Performance Tracing".
-e Date Ends the report time with entries on, or before the specified date. The Date variable has the form mmddhhmmssyy (month, day, hour, minute, second, and year). Date and time are recorded in the trace data only when trace data collection is started and stopped. If you stop and restart trace data collection multiple times during a trace session, date and time are recorded each time you start or stop a trace data collection. Use this flag in combination with the -s flag to limit the trace to data collected during a certain time interval.
Note
If you specify -e with -C the -e flag is ignored.
-G List all event groups. The list of groups, the hook ids in each group, and each group's description is listed to standard output.
-h Omits the header information from the trace report and writes only formatted trace entries to standard output.
-j Displays the list of hook IDs. The trcrpt -j command can be used with the trace -j command that includes IDs of trace events or the trace -k command that excludes IDs of trace events.
-k List Excludes from the report hook IDs specified with the List variable. The List parameter items can be separated by commas or enclosed in double quotation marks and separated by commas or blanks.
-K Event-group-list Excludes from the report hook ids in the event-groups list, plus any hook ids specified with the -k flag. List parameter items can be separated by commas or enclosed in double quotation marks and separated by commas or blanks. Event groups are described in "Debug and Performance Tracing".
-n Name Specifies the kernel name list file to be used to interpret address for output. Usually, this flag is used when moving a trace log file to another system.
-o File Writes the report to a file instead of to standard output.
-O Options Specifies options that change the content and presentation of the trcrpt command. Arguments to the options must be separated by commas. Valid options are:
2line=[on|off]
Uses two lines per trace event in the report instead of one. The default value is off.
cpuid=[on|off]
Displays the physical processor number in the trace report. The default value is off.
endtime=Seconds
Displays trace report data for events recorded before the seconds specified. Seconds can be given in either an integral or rational representation. If this option is used with the starttime option, a specific range can be displayed.
exec=[on|off]
Displays exec path names in the trace report. The default value is off.
hist=[on|off]
Logs the number of instances that each hook ID is encountered. This data can be used for generating histograms. The default value is off. This option cannot be run with any other option.
ids=[on|off]
Displays trace hook identification numbers in the first column of the trace report. The default value is on.
pagesize=Number
Controls the number of lines per page in the trace report and is an integer within the range of 0 through 500. The column headings are included on each page. No page breaks are present when the default value of 0 is set.
pid=[on|off]
Displays the process IDs in the trace report. The default value is off.
reportedcpus=[on | off ]
Displays the number of CPUs remaining. This option is only meaningful for a multicpu trace, trace -C. For example, if you're reading a report from a system having 4 CPUs, and the reported CPUs value goes from 4 to 3, then you know that there are no more hooks to be reported for that CPU.
 
starttime=Seconds
Displays trace report data for events recorded after the seconds specified. The specified seconds are from the beginning of the trace file. Seconds can be given in either an integral or rational representation. If this option is used with the endtime option, a specific range of seconds can be displayed.
svc=[on|off]
Displays the value of the system call in the trace report. The default value is off.
tid=[on|off]
Displays the thread ID in the trace report. The default value is off.
timestamp=[0|1|2|3]
                         
Controls the reporting of the time stamp associated with an event in the trace report. The possible values are:
0
                         
Time elapsed since the trace was started and delta time from the previous event. The elapsed time is in seconds and the delta time is in milliseconds. Both values are reported to the nearest nanosecond. This is the default.
1
Short elapsed time. Reports only the elapsed time (in seconds) from the start of the trace. Elapsed time is reported to the nearest microsecond.
2
Microsecond delta time. This is like 0, except the delta time is in microseconds, reported to the nearest microsecond.
3
No time stamp.
-p List Reports the process IDs for each event specified by the List variable. The List variable may be a list of process IDs or a list of process names. List items that start with a numeric character are assumed to be process IDs. The list items can be separated by commas or enclosed in double quotation marks and separated by commas or blanks.
-r Outputs unformatted (raw) trace entries and writes the contents of the trace log to standard output one entry at a time. Use the -h flag with the -r flag to exclude the heading. To get a raw report for CPUs in a multicpu trace, use both the -r and -C flags.
-s Date Starts the report time with entries on, or before the specified date. The Date variable has the form mmddhhmmssyy (month, day, hour, minute, second, and year). Date and time are recorded in the trace data only when trace data collection is started and stopped. If you stop and restart trace data collection multiple times during a trace session, date and time are recorded each time you start or stop a trace data collection. Use this flag in combination with the -e flag to limit the trace to data collected during a certain time interval.
Note
If you specify -s with -C the -s flag is ignored.
-t File Uses the file specified in the File variable as the template file. The default is the /etc/trcfmt file.
-T List Limits the report to the kernel thread IDs specified by the List parameter. The list items are kernel thread IDs separated by commas. Starting the list with a kernel thread ID limits the report to all kernel thread IDs in the list. Starting the list with a ! (exclamation point) followed by a kernel thread ID limits the report to all kernel thread IDs not in the list.
-v Prints file names as the files are opened. Changes to verbose setting.
-x Displays the exec path name and value of the system call.

Examples

  1. To format the trace log file and print the result, enter:

    trcrpt | qprt
  2. To send a trace report to the /tmp/newfile file, enter:

    trcrpt -o /tmp/newfile
  3. To display process IDs and exec path names in the trace report, enter:

    trcrpt -O pid=on,exec=on
  4. To create trace ID histogram data, enter:

    trcrpt -O hist=on
  5. To produce a list of all even group, enter:

    trcrpt -G
    The format of this report is shown under the trcevgrp command.

Files

/usr/bin/trcrpt Contains the trcrpt command.
/var/adm/ras/trcfile Contains the default log file.
/etc/trcfmt Contains the trace format file.

Related Information

The trcdead command, the trcevgrp command, trcnm command, trcstop command, trcupdate command.

The trace daemon.

The trcfmt file format.

Trace Facility Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

Monitoring and Tuning Commands and Subroutines in AIX 5L Version 5.2 Performance Management Guide.

Debug and Performance Tracing in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]