HP-UX 11i Version 1.5 Kernel Logging

Chapter 1 5
Step 3. If you and the KL team determine that a new subsystem ID must be defined--
because there is no pre-existing subsystem ID suitable for your code, or because the
pre-existing subsystem IDs are too general (for example, in a huge subsystem like
VM, a subsystem ID that further subdivides it might be very useful)--then the
following source files must be modified to support the new subsystem ID:
/ux/core/kern/common/sys/subsys_id.h -- this file must include a line for
your new subsystem like the lines shown in the example in the introduction to
this procedure.
/ux/core/lan/src/NETTRACELOG/conf/NETTL-MIN/nettlgen.conf --
this file must include a line for your new subsystem like the following sample
line taken from the section of the file captioned # Subsystems supported by
the Kernel Logging facility:
SS:513:KL_VM:8:k:NULL:klfmt:NULL:NULL:Kernel Logging
Clear explanations of the fields in this entry are given in the section of notes captioned #
SUBSYSTEM RECORD, earlier in the file.
Step 4. Copy the modified nettlgen.conf file to the /etc directory on your target
machine.
Step 5. Before you submit these modified files to the final product, notify the KL team so a
final review can be done.
Create a Local Header File for Kernel Events Specific to Your Subsystem
You will be adding instrumentation points to your kernel subsystem code wherever you want
to identify an event to be logged. Each such point must be given an “event ID,” which is a
string that identifies that event to the KL infrastructure. Each must be unique among the
event IDs for your subsystem, and is assigned an integer value in the range [1-65535]. You,
not the KL team, assign integer values to event IDs in your subsystem.
Step 1. Add the following line to both your local header file (if you have one) and your .c
file:
#include <sys/net_diag.h>
Step 2. Construct an event ID for each instrumentation point in your subsystem. Event IDs
are constructed according to the following convention:
subsystemID
_
eventName
where
subsystemID
is the subsystem identifier you and the KL team previously
agreed upon, and
eventName
is an identifier for the particular event you are
instrumenting. For example, the Dynamic Tuning subsystem has the ID
KL_DYNTUNE. In that subsystem, one of the kernel events is setting a tunable