ktracer.1m (2010 09)
k
ktracer(1M) ktracer(1M)
NAME
ktracer - kernel tracer
SYNOPSIS
Getting Started
ktracer [-R][-L
][-b][-B][-h][-w workload ][
-g numsec]
Changing the Function List
[
-a func]... [-e
[mod:]pattern]... [-l lib ]... [-m mod]... [
-r func]... [-S func ]... [-z]
Installing the Function List
[
-I][-U]
Managing Memory for Traces
[
-A numtraces ][-f
][-Z]
General Interest
[
-?][-t][
-D ktracedump-options][
-p pid]
Remarks
See
http://hp.com/go/ktracer
.
DESCRIPTION
HP-UX kernel tracing is a powerful, indispensable facility for debugging kernel problems and for under-
standing kernel behavior. It gives insight into kernel events and activity by capturing data across all
CPUs about kernel function call sequence, parameters, and timing.
Kernel tracing on HP-UX is comprised of kernel and userspace components.
The
ktracer component in the kernel collects and stores trace records in trace buffers in kernel
memory. The ktracer program is a userspace component that gives its user control over how much
memory to allocate for trace buffers, which functions to trace, and when to start and stop tracing on a live
system.
The
ktracedump program is another userspace component that retrieves the trace records and traced
function list either from the live kernel or from a kernel dump. ktracedump then formats the output in
accordance with user specifications.
NOTE: The word ktracer is used for both the individual
ktracer program and for the whole kernel
tracing facility (which includes the kernel component, the ktracer program, and the ktracedump pro-
gram). See ktracedump (1M) for more information about ktracedump.
Kernel tracing is particularly useful in understanding what the kernel is doing, for the purpose of educa-
tion, as well as analysis. Kernel tracing is useful to debug panics and hangs, and useful in making
software design choices.
HP-UX is capable of tracing kernel calls along the boot path.
With the September 2008 release of HP-UX 11i Version 3 Update 3, ktracer is newly supported for cus-
tomer use on Integrity systems only.
Kernel support for
ktracer is sensitive to the underlying HP-UX release version and processor architec-
ture on which it runs.
ktracer runs on HP Integrity Virtual Machines (HPVM) running HP-UX 11i v3 Update 3 or later.
Information about Virtual Machines is at http://www.docs.hp.com/en/vse.html
.
Functions
ktracer can trace thousands of kernel functions. ktracer is capable of tracing almost all nonleaf
functions written in C, most leaf functions on Integrity platforms, and also some functions written in
assembly. The set of traced functions can be any subset of the traceable functions. To produce a list of all
traceable functions in a given system, run the following command:
# ktracer -R -h; ktracedump -DNF > traceable_functions
Processes
ktracer can trace all processes or a selected process. See the -p option.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1