ktracer.1m (2010 09)

k
ktracer(1M) ktracer(1M)
Option Status Description
Getting Started
-R on Reasonable. Start tracing all functions (heavyweight)
-L on Lightweight. Start tracing key functions (lightweight)
-b on Begin tracing.
Start intercepting and tracing functions
-B on Begin tracing. Same as -b
-h off Halt. Stop intercepting and tracing functions
-g numsec off Reset, begin tracing, sleep numsec, halt, report
-w workload off Reset, begin tracing, run workload, halt, report
Changing the Function List
-a func off Add func to the list of functions to trace
-e mod:patn off Add functions from mod matching patn to the list
-l library off Add the functions within library to the list
-m module off Add the functions within module to the list
-r func off Remove func from the function list
-S func off Stop tracing when func is executed
-z off Zero. Remove all functions from the function list
Installing the Function List
-I off Deprecated. Use -b
-U off Deprecated. Use -h
Managing Memory for Traces
-A numtraces off Allocate trace buffers
-f off Free all trace buffers
-Z off Zero trace buffers
General Interest
-? . Print ktracer usage message
-t . Print current status of ktracer
-D ktd-opts . ktracedump options to use with -g or -w
-p pid off Trace only the specified PID (0 for all)
In the Tracing Status (on/off) column:
on indicates tracing will be ON if the option succeeds.
off indicates tracing will be OFF after the option completes.
. indicates tracing will not be changed after the option completes.
The
ktracer -t option reports whether kernel tracing is currently ON or OFF.
Tracing Status
The tracing status includes:
1. The allocated size and content of the trace buffers.
2. Which functions are selected to trace (see Changing the Function List ).
3. Whether trace points are inserted (see Installing the Function List ).
4. Whether trace collection is on (begin/halt).
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.
OPTION DETAILS
This section describes the command-line options in more detail. Options are executed in the order
specified, meaning their order on the command line makes a difference.
Getting Started
-R Reasonable defaults: An easy way to get started tracing everything. The -R option does the
following tasks:
Clear previous tracing state (-h, -U, -z).
Allocate trace buffers (-A).
Add all functions (-a).
Insert trace points (-I).
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3