[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 5

trcrpt Command

Purpose

Formats a report from the trace log.

Syntax

trcrpt-c ] [ -d List ] [ -e Date ] [ -h ] [ -j ] [ -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.
-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.
-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.
-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.
-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.
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 time stamp associated with an event in the trace report. The possible values are:
0
                          Time elapsed since the trace was started. Values for elapsed seconds and milliseconds are returned to the nearest nanosecond and microsecond, respectively. This is the default value.
1 Short elapsed time.
2 Microseconds.
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.
-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.
-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

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, trcnm command, trcstop command, trcupdate command.

The trace daemon.

The trcfmt file format.

Trace Facility Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

AIX Performance Monitoring and Tuning Commands in AIX Versions 3.2 and 4 Performance Tuning Guide.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]