HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)
k
kconfig(5) kconfig(5)
Some configuration changes can be made without using the kernel configuration commands. No log file
entries are made for such changes.
The format of the log file may be changed without notice. Programs must use the
kclog command to
retrieve entries from the file rather than attempting to parse the file format.
PARSING OUTPUT
Most of the kernel configuration commands produce tabular output describing the details of a
configuration. Such output may be attractive for humans, but can be difficult for scripts and applications
to parse. Also, the tabular output format can change at any time: for example, between different types of
systems or between releases of HP-UX.
For these reasons, each of the kernel configuration commands that produce such output accept a
-P
option, which changes the output format. The
-P format is designed to be easy to parse, and is
guaranteed not to change. HP will not support applications and scripts which parse the output of the
kernel configuration commands unless they use the
-P option.
The
-P option must be followed by a comma-separated list of field names. Each kernel configuration
command supports a different set of field names; refer to the manpage for the command for a list. The
field names must appear in a single argument, so there should be no spaces anywhere in the list. For
example,
kcmodule -P name,state,desc
The kernel configuration command will produce output that consists of a series of lines describing one
object, a blank line, a series of lines describing the next object, a blank line, and so on until all objects are
described. Each line in the series consists of a field name, a single tab character (ASCII 9), and the value
of that field for the object being described. The lines occur in the same order as requested. So the above
command might produce this output:
name module1
state loaded
desc This is the first sample module.
name module2
state unused
desc This is a different sample module.
Some fields may occur multiple times within an object, or may not occur at all. This will be noted in the
description of the field. For example, the command
kcmodule -P name,state,depend
might produce this output:
name module1
state loaded
name module2
state unused
depend module1
depend module4
This shows that module1 has no dependencies, but module2 is dependent on two other modules.
New fields may be added at any time, but they will not be included in the output unless specified in a
-P
option. Fields will not be removed. In rare cases, future developments may render a field meaningless.
In these cases, the field name will still be accepted but the corresponding lines will be omitted from the
output.
SEE ALSO
hpux(1M), hpux.efi(1M), kclog(1M), kcmodule(1M), kconfig(1M), kcpath(1M), kctune(1M),
mk_kernel(1M), system(4).
HP-UX 11i Version 2: September 2004 − 3 − Hewlett-Packard Company Section 5−−155