HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)
k
kl(1M) kl(1M)
NAME
kl - control kernel logging
SYNOPSIS
/usr/sbin/kl -e [-q qsize][-s
fsize][-w (on|off)] [-l {d|e|w
|i}{subsys_name...| all}]
/usr/sbin/kl -d
/usr/sbin/kl -l
{d|e|w
|i}{subsys_name...| all}
/usr/sbin/kl -w {on [-s fsize ]|
off}
/usr/sbin/kl -s fsize
/usr/sbin/kl -i
/usr/sbin/kl -p
filename [-w on
[-s fsize ]]
/usr/sbin/kl -q qsize
DESCRIPTION
The kl command controls the operation of the Kernel Logging facility. Kernel Logging is a high-
availability feature that gives system administrators the ability to collect the information necessary to diag-
nose problems with the HP-UX kernel while the system is running. kl is used to specify the levels of
events to be logged and the kernel subsystems that will write messages to memory or disk. kl
also pro-
vides for managing the contents of the logfile in memory and on disk.
At startup, Kernel Logging determines its default configuration by reading the file
/etc/nettlgen.conf
. See nettlgen.conf(4) for an explanation of the file format. The kl command
permits only temporary changes to the default Kernel Logging configuration without having to stop and
restart Kernel Logging facility. Note that any values you specify on the
kl command line do not modify
the contents of the /etc/nettlgen.conf
file. To make permanent changes to the values in the
/etc/nettlgen.conf
file, run nettlconf(1M).
Only users with appropriate privileges (root) can invoke the
kl command to control the Kernel Logging
facility.
Options
kl recognizes the following options, which can be used only in the combinations indicated in the
SYNOPSIS section. All options and keywords are case-sensitive.
-e Enable the Kernel Logging facility and start up default logging as defined in the file
/etc/nettlgen.conf
.
If the
-l option is used in conjunction with the -e option, the -l option must be specified
as the last option on the command line.
-d Disable the Kernel Logging facility. Once this option is issued, Kernel Logging stops
accepting logging calls from the kernel subsystems.
-w {on|off} Turn on/off write-to-disk logging. If write-to-disk logging is enabled, log messages residing
on the log queue in memory are written to disk and removed from the queue.
The name of the log file on disk is formed by adding the suffix .KLOG0 to the log file name
specified in the /etc/nettlgen.conf file. If the log file (including suffix) already
exists, one of the following events takes place:
• If the existing file contains messages logged during the system run when a panic
occurred, the file will be preserved (in a new location). See the USAGE section for more
information on how this situation is handled.
• Otherwise, the existing file and whatever information it contains will be lost; that is, the
contents of the file are overwritten with new kernel logging data.
When write-to-disk logging is turned off, messages are not written out to disk, but continue
to be collected in memory (circular buffer).
-l { d | e | w | i }{subsys_name ... | all }
Modify the level of log messages to be captured for the specified subsystem(s).
The subsys_name argument is a subsystem name specified in the file
/etc/nettlgen.conf. The list of available subsystem names can be obtained using
Section 1M−−394 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005