Display the contents of the instrumented kernel trace file
traceprinter [-nv] [-f file] [-o out_file] [-p fmt]
QNX Neutrino, Linux, Mac, Microsoft Windows
They follow the same syntax as printf() format specifiers with one addition: a negative precision truncates the leading characters instead of the trailing characters. For example, the default string is "t:0x%08c CPU:%02C %-16Z:%-18z" and gives output like this:
t:0x4be9a514 CPU:01 SYSTEM :
If you specify "e:%06e t:%014t c:0x%010c CPU:%02C %-16Z:%-18z" for fmt, the output looks like this:
e:0000000010 t:0.000.016us c:0x004be9a514 CPU:01 SYSTEM :
The traceprinter utility displays the contents of a trace file generated by tracelogger. The utility parses the linearly stored time events stored in the named trace file and sends the resulting formatted stream to standard output (or to the file identified by the -o option).
The formatted stream looks like this:
t:clk_time CPU:cpu [class: event: [P1: [P2: [P3: ... [Pn:]]]]]
The stream always shows the clk_time and cpu variables; the variables in brackets are optional.
Class | Event | Parameters |
---|---|---|
CONTROL | TIME |
|
INT_ENTR, INT_EXIT | Interrupt number in hexadecimal (and decimal) notation |
|
THREAD |
|
|
VTHREAD |
|
|
PROCESS |
|
|
KER_CALL | Kernel call name |
|
KER_EXIT | Kernel call name |
|
The number of arguments and return values depends on the event and whether the trace file was produced using fast or wide tracing mode. For more information, see the Current Trace Events and Data appendix of the System Analysis Toolkit User's Guide.
Here's an example of the first few lines of output from traceprinter:
TRACEPRINTER version 0.94 -- HEADER FILE INFORMATION -- TRACE_FILE_NAME:: /scratch/quadlog TRACE_DATE:: Fri Jun 8 13:14:40 2001 TRACE_VER_MAJOR:: 0 TRACE_VER_MINOR:: 96 TRACE_LITTLE_ENDIAN:: TRUE TRACE_ENCODING:: 16 byte events TRACE_BOOT_DATE:: Fri Jun 8 04:31:05 2001 TRACE_CYCLES_PER_SEC:: 400181900 TRACE_CPU_NUM:: 4 TRACE_SYSNAME:: QNX TRACE_NODENAME:: x86quad.gp.qa TRACE_SYS_RELEASE:: 6.1.0 TRACE_SYS_VERSION:: 2001/06/04-14:07:56 TRACE_MACHINE:: x86pc TRACE_SYSPAGE_LEN:: 2440 -- KERNEL EVENTS -- t:0x1310da15 CPU:01 CONTROL :TIME msb:0x0000000f, lsb(offset):0x1310d81c t:0x1310e89d CPU:01 PROCESS :PROCCREATE_NAME ppid:0 pid:1 name:./procnto-smp-instr t:0x1310eee4 CPU:00 THREAD :THCREATE pid:1 tid:1 t:0x1310f052 CPU:00 THREAD :THRUNNING pid:1 tid:1 t:0x1310f144 CPU:01 THREAD :THCREATE pid:1 tid:2 t:0x1310f201 CPU:01 THREAD :THREADY pid:1 tid:2 t:0x1310f32f CPU:02 THREAD :THCREATE pid:1 tid:3 t:0x1310f3ec CPU:02 THREAD :THREADY pid:1 tid:3 t:0x1310f52d CPU:03 THREAD :THCREATE pid:1 tid:4 t:0x1310f5ea CPU:03 THREAD :THRUNNING pid:1 tid:4 t:0x1310f731 CPU:02 THREAD :THCREATE pid:1 tid:5 t:0x1310f7ee CPU:02 THREAD :THRECEIVE pid:1 tid:5 t:0x1310f921 CPU:03 THREAD :THCREATE pid:1 tid:6 t:0x1310f9de CPU:03 THREAD :THRECEIVE pid:1 tid:6 t:0x1310fb0b CPU:01 THREAD :THCREATE pid:1 tid:7 t:0x1310fbc8 CPU:01 THREAD :THRECEIVE pid:1 tid:7 t:0x1310fd1d CPU:02 THREAD :THCREATE pid:1 tid:8 t:0x1310fdda CPU:02 THREAD :THRECEIVE pid:1 tid:8 t:0x1310ff35 CPU:02 THREAD :THCREATE pid:1 tid:9 t:0x1310fff2 CPU:02 THREAD :THRECEIVE pid:1 tid:9 t:0x131100cc CPU:01 THREAD :THCREATE pid:1 tid:10 t:0x13110189 CPU:01 THREAD :THRECEIVE pid:1 tid:10 t:0x131102d5 CPU:03 THREAD :THCREATE pid:1 tid:11 t:0x13110392 CPU:03 THREAD :THRECEIVE pid:1 tid:11 t:0x1311084d CPU:01 PROCESS :PROCCREATE_NAME ppid:1 pid:2 name:proc/boot/slogger2 t:0x13110c13 CPU:03 THREAD :THCREATE pid:2 tid:1 t:0x13110ce0 CPU:03 THREAD :THRECEIVE pid:2 tid:1
Severe errors cause traceprinter to terminate; noncatastrophic errors are displayed in verbose mode (if the -v option is set).
You must run tracelogger before running traceprinter. The tracelogger utility creates an event file containing trace data; traceprinter parses and prints the data in this file.