HP-UX 11i Version 1.5 Kernel Logging
Kernel Logging
Using Kernel Logging
Chapter 112
#kl -l
level subsystem_ID ...
For example, the following command sets
level
to INFORMATION for the KL_DLKM
subsystem: #kl -l i KL_DLKM.
That means that messages of classes DISASTER, ERROR, WARNING, and
INFORMATIVE, coming from the KL_DLKM subsystem, will now be logged.
Classes of messages coming from other subsystems remain unchanged.
Complete definitions of
level
and
subsystem_ID
are given on the kl(1M)
manpage.
Step 2. Temporarily set the size of the file used to store logged messages when write-to-disk
is enabled, by executing the following command:
#kl -s
fsize
The value of
fsize
is an integer in the range [8KB-1GB], optionally followed by the
letter k, m, or g, to explicitly specify kilobytes, megabytes, or gigabytes (the default
is bytes).
fsize
should be as large as your system can handle.
Step 3. Temporarily set the number of individual messages that will be stored in the log file
by executing the following command:
#kl -q
qsize
qsize
must be an integer in the range [100-10000] representing the number of
messages that can be logged.
qsize
should be as large as your system can handle.
Step 4. To restore the default values (as listed in the file /etc/nettlgen.conf) for any
parameters you have temporarily changed:
a. Disable Kernel Logging (kl -d).
b. Enable Kernel Logging (kl -e).
Using kl and netfmt to Obtain and Format KL Reports
Taking a Picture of the KL Logfile
Taking an isolated picture (a snapshot) of what’s in memory and writing it out to disk is useful
when you don’t want to use system resources by having KL write to disk full-time.
Step 1. Take a picture of the KL logfile and save it in
filename
, by executing the following
command:
#kl -p
filename