HP Caliper Ktrace Features Guide

Supported Hardware and Operating Systems
The Ktrace features are supported on HP Integrity systems and HP Integrity Virtual
Machines (HPVM) running HP-UX 11i v3 Update 3 or later.
User Requirements and Security Restrictions
ktracer requires superuser privilege. The security of ktracer depends upon the
protection of superuser privilege. For systems using fine-grained privileges,
PRIV_DEVOPS is required (see the privileges(5) manpage). Only one superuser at a
time can run kracer on a system.
The tracing status is system-wide. For that reason, ktracer is intended for only one
user at a time on a given system. If multiple users run ktracer simultaneously, then
each time one superuser updates the tracing status, all other users will experience a
change in tracing status that was not of their own doing.
ktracedump does not write to the kernel, does not change kernel path flow, and does
not incure a system-wide performance cost. ktracedump incurs only the performance
cost of running the ktracedump process itself.
ktracedump can be used concurrently by multiple people analyzing different dumps
on the same system. However, for consistent results on a live system, a single superuser
running ktracer should be the only superuser running ktracedump D on a live
system. The D option specifies reading the trace data from the live kernel.
Sample Trace
The following command traces a few key functions (system calls, idles, interrupts, and
process switching):
ktracer -L -w 'workload' > ktrace.out
results in the following actions:
-L turns on tracing of a few key functions
-w starts tracing the execution of the 'workload' program
-w also invokes ktracedump which creates a formatted report in ktrace.out.
Following the termination of the 'workload' program, tracing is halted
You can use a text editor such as vim to look at the formatted report in the ktrace.out
file. You need a text editor that can view large files and long lines easily.
The trace data can also be formatted and displayed using ktracedump.
You can also save the formatted reports to an output file. Saving a report allows you
to run another trace and still retain the formatted report. For example,
ktracedump -D -A > trace_report.out
reads the trace records from the kernel, formats them into a trace report, and saves the
report output in a text file named trace_report.out.
Supported Hardware and Operating Systems 13