ktracedump.1m (2010 09)

k
ktracedump(1M) ktracedump(1M)
NAME
ktracedump - display ktracer output for live system or crashdump
SYNOPSIS
ktracedump [-D|-m][
-H][-J col][-j col][-S
col][-a][-g][-A][-f
col:egrep_opts :regexp]
[
-N][-F
][-X ext]
DESCRIPTION
ktracedump displays kernel trace output for live system or crashdump, after trace records are captured
by ktracer.
The kernel trace feature (
ktracer) provides two commands:
ktracer: captures trace record on a live system, controls which kernel functions to traced, when to
start and stop tracing, and how many trace records to collect per CPU (see ktracer (1M)), and
ktracedump: produces a formatted report of trace records collected by
ktracer.
The output from
ktracedump goes to Unix standard output (typically a terminal screen) unless saved to
a file (> filename), or sent to a printer (
|lp), or piped to another program (|
program_name).
ktracedump also reports a list of kernel function names that were selected by
ktracer to be traced.
ktracedump reads the trace records and traced function names from kernel memory.
The
ktracedump -D command reads trace records for a live kernel from /dev/kmem. The ktra-
cedump -m command reads trace records from a crash dump.
In case of a crash dump,
ktracedump can be run in the dump directory to report which kernel pro-
cedure calls on a CPU led up to a panic or hang. However, kernel trace data will be found only if
ktracer was activated and running before the crash.
ktracedump does not write to the kernel, does not change kernel path flow, and does not incur a
system-wide performance cost. ktracedump incurs only the performance cost of running the ktra-
cedump process.
ktracedump can be used concurrently by multiple superusers analyzing different dumps on the same
system. However, for consistent results on a live system, the sole superuser running ktracer should be
the only superuser running ktracedump -D on a live system.
Each kernel trace record contains the raw data needed to show the following information:
Awk Parse Info
Sequence#
Zero-based Sequence#
CPU#
Process ID (PID)
Thread ID (TID)
Spinlock Depth
Function (name of callee that is traced)
Caller (name of calling function)
Caller Offset
Absolute Time (adjusted interval timer)
Absolute Seconds (Absolute Time converted to seconds)
Elapsed Time since previous trace record, in units of machine cycles
Elapsed USec (Elapsed Time converted to microseconds)
Stack Pointer (from Kernel Stack or Interrupt Control Stack)
Processor Status Register (PSR)
Task Priority Register (TPR)
Function Parameters (arg0 through arg3 or arg7)
4 kernel Global variables
The ktracedump options -A, -J, -j, -a, and -g control which columns of data to show. The columns
shown follow the order of the options listed above.
Each trace record is displayed on one line of the
ktracedump output, with each one column for each
field of the trace.
ktracer uses circular buffers in which the oldest data is overwritten by the newest data when
ktracer is active. Once the oldest data is overwritten, it is no longer available to ktracedump.Asa
precaution on a live system, save your ktracedump report to a file in order to view it again after
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (10 pages)