HP Caliper Ktrace Features Guide
to ktracedump. Save your ktracedump report to a file if you want to view it again
later before restarting ktracer.
Each CPU has its own interval timer. ktracer captures the interval timer value shortly
after entering each traced function, adjusts it by tod_info.offset_correction,
and reports it as AbsTime.
You can modify how many traces the kernel collects by using ktracer -A numtraces.
The more traces the kernel collected, the longer ktracedump will take to run, the larger
the ktracedump output will be, and the more data you will have available for your
analysis.
ktracedump can be invoked repeatedly with different options. The trace data is not
changed by ktracedump. On a live system, the trace data will remain unchanged until
ktracer is restarted.
You should halt ktracer before running ktracedump to show traces on a live system.
If you invoke ktracedump while ktracer is active, ktracedump will print a message
indicating that the results might be inconsistent, then it will produce a report based on
the contents of each trace at the time it was copied out of the kernel.
You can run ktracedump-DNF while ktracer is active. The installed function list
stays constant while ktracer is active. The traces change, but the list of functions to
trace is separate, and remains unchanged.
Kernel Trace Report Output
Each kernel trace is printed on one line of a detailed report. The columns shown in a
ktracedump report are in the following order. Sequence#, Zero-based Sequence#,
CPU#, Process ID, Thread ID, Function name, Caller Name and Offset, Elapsed Time
since last trace in cycles and in nanoseconds, Absolute Time, Stack Pointer, System
Mask (PSR), TPR, 1st 4 Function Arguments, Spinlock Depth, and 4 kernel Global
variables. The ktracedump options -A, -J, -j, -a, and -g control which columns of
data to show.
Use a text editor such as vim instead of vi to view ktracedump output. vim can
handle large files, and it has the option :set nowrap to view long lines without
occupying 2-3 lines of the screen for each full trace printed. Also, vim has color
highlighting of search strings, split screen, and other useful features. vim can be obtained
from http://www.vim.org/download.php
Some fields of trace data are architecture specific. The ktracedump output provides
header information before printing traces for each CPU.
Header information that is architecture specific is:
• AbsTime - Interval Time Counter (ar44)
• SyMsk - PSR -/ic/pk/dt/i = _QPDI when on, _off
• TPR - Task Priority Register (TPR)
The SyMsk (System Mask) is explained as follows:
30 ktracedump: Kernel Trace Reporter