HP-UX 11i Version 1.5 Kernel Logging

Kernel Logging
Instrumenting Kernel Subsystems for Kernel Logging
Chapter 16
parameter. The kernel developer has assigned the name SETTUNE_EVENT to this
event. Thus, the event ID for this kernel event becomes
KL_DYNTUNE_SETTUNE_EVENT
Step 3. Add your event IDs to your local header file, or to your .c file, and assign each an
integer value. It is good practice to keep all #define statements of a particular
subsystem in one file, typically in a local header file. However, if you do not have a
local header file, you can define event IDs in your .c file.
Use the following format:
eventID
=
n
where
eventID
is constructed as described in Step 2, and
n
is the unique value
assigned to this event.
In addition to being unique to this event ID in this subsystem, the assigned integer
value
n
also serves to specify the “event class” of the event.Four event classes for
Kernel Logging are defined in the subsys_id.h file. The following table lists and
defines them, and identifies the range of integer values that can be assigned in each
class:
Table 1-1
Event Class Definition Recommended
Integer Values
DISASTER The DISASTER class signals an event or
condition which affects the operation of
an entire subsystem, or the kernel,
causing several programs to fail or the
machine to panic
1000 - 1999
ERROR The ERROR class signals an event or
condition which does not affect the overall
operation of an entire subsystem, but
may cause an application to fail.
2000 - 2999
WARNING The WARNING class indicates an
abnormal event, possibly caused by
problems in an individual subsystem.
3000 - 4999
INFORMATIVE The INFORMATIVE class describes
important routine operations and current
system values.
5000 and up