When you have an HP-UX kernel configuration that
satisfies your needs, you may want to save a copy of it to protect
yourself against inadvertent configuration changes. Or, you may want
to have multiple kernel configurations, so that you can switch between
them easily. HP-UX allows you to save as many kernel configurations
as you wish (subject to available disk space in /stand), and to modify them and use them at will.
Getting Information about Saved Configurations |
 |
When you run kconfig with no
options, it shows you the saved configurations on your system. There
will always be a saved configuration called backup, which is automatically maintained by the system; any other saved
configurations on the system will also be listed. (For more information
on the backup configuration, see “Recovering from Errors”.)
The output of kconfig can be
varied with several options. The output can be restricted to specific
configurations by listing them on the command line.
To control the output format, use the -a (all), -v (verbose), or -P (parse) options.
With No Options With no options, the output looks like this:
# kconfig
Configuration Title
backup Automatic Backup
day Configuration for daytime multiuser processing
last_install Created by last OS install
night Configuration for nighttime batch processing |
With the -v Option The -v option gives verbose,
multiline information about each saved configuration:
# kconfig -v day
Configuration day
Title Configuration for daytime multiuser processing
Created Thu Oct 12 01:33:36 2006 by allanp
as a copy of ’last_install’
Modified Thu Oct 12 01:37:14 2006 by allanp
Kernel Path /stand/day/vmunix |
With the -a Option The -a option is the equivalent
of the command sequence:
# kcmodule -a -v -c config
# kctune -v -c config
# kconfig -v config |
for each specified or implied configuration (config). This gives a detailed record of all settings
in the configuration. The following output is edited.
# kconfig -a day
Module DeviceFileSystem (1.0)
Description DevFS File System
Timestamp Mon Sep 11 15:31:18 2006 [4505E3B6]
State unused
Capable static unused
Depends On module OocCore:0.0.0
interface HPUX_11_31_PERF:1.0
...
Tunable NSTREVENT
Description Maximum number of concurrent Streams bufcalls
Module hpstreams
Current Value 50 [Default]
Default Value 50
...
Configuration day
Title Configuration for daytime multiuser processing
Created Thu Oct 12 01:33:36 2006 by allanp
as a copy of ’last_install’
Modified Thu Oct 12 01:37:14 2006 by allanp
Kernel Path /stand/day/vmunix |
With the -P Option The -P option, which is designed
for use by scripts or programs, gives complete control over what information
is printed. For more information, see “Parsing Command Output” or the kconfig(5 )manpage.
The special keyword ALL displays
all the possible categories. Compare with the -v option.
# kconfig -P ALL day
name day
title Configuration for daytime multiuser processing
createtime Thu Oct 12 01:33:36 2006
createuser allanp
modifytime Thu Oct 12 01:37:14 2006
modifyuser allanp
kernel /stand/day/vmunix |
Use a comma-separated list with the -P option to display the categories you want.
# kconfig -P name,title,modifyuser night
name night
title Configuration for nighttime batch processing
modifyuser allanp |
Interpreting Saved Configuration Information |
 |
Referring to the examples above, each saved configuration
has a name, title, time signatures, user signatures, and kernel location.
The name must start with a letter; contain only
letters, digits, and underscores; and be at most 32 characters long.
Except for the backup configuration, you choose
the name for each saved configuration when you create it, and you
can rename it at will.
Each saved configuration can also have a title.
The title can be used to provide yourself with a longer description
of the configuration’s purpose or settings. It is optional.
Each saved configuration also has a pair of timestamps.
The Created/createtime stamp indicates when the
configuration was created (kconfig –s).
The Modify/modifytime stamp indicates when the
configuration was last changed. Each timestamp is associated with
the login name of the user who performed the action.
The kernel itself is located in a subdirectory
of /stand that has the same name as the configuration.
Associated with each saved configuration is a
complete set of module state settings and tunable value settings.
These can be seen by using:
and
or by using
Using and Modifying Saved Configurations |
 |
Creating Saved Configurations
Saved kernel configurations can be created in
three ways: by saving the currently running configuration, by copying
an existing saved configuration, or by reading a system file.
To save the currently running configuration, use kconfig -s (save). The resulting saved configuration will
include any changes to the currently running configuration that are
being held for next boot.
An existing saved configuration can be copied
using kconfig -c (copy).
For information on working with system files,
see “Managing Configurations with System Files”.
Using Saved Configurations
A saved configuration can be loaded using kconfig -l (load). This changes the configuration of the
currently running kernel to match what was saved. If the configuration
can be changed without a reboot, the changes will take effect immediately.
Otherwise, all of the changes will be held for next boot.
Sometimes you may want to force the configuration
change to be held for next boot, instead of applying it immediately.
In these cases, you can mark the saved configuration for use at next
boot using kconfig -n (next boot). HP recommends
that this option be used only when the next boot is expected to be
soon. If, for example, the next boot doesn’t happen for months
after you make such a change, the system administrator could be unpleasantly
surprised at the effect of a pending change that had been forgotten.
To find out which saved configuration is marked
for use at next boot, use kconfig -w (which). This
command also identifies the saved configuration that was most recently
loaded or booted, or the system file that was most recently imported.
Modifying Saved Configurations
To modify the module state settings and tunable
value settings in a saved configuration, use the -c (configuration) option of the kcmodule and kctune commands, respectively. Saved configurations can
also be changed by changing their system file and then importing it;
see “Managing Configurations with System Files”.
Several options of kconfig allow
other changes to saved configurations. The -r (rename)
option will rename a saved configuration. (The backup configuration cannot be renamed.) The -t option
will change the title on a saved configuration. The -d (delete) option will delete a saved configuration.
If a configuration has been marked for use at
next boot, and you decide you want to continue using the currently
running configuration instead, use kconfig -H (unhold)
to discard all changes being held for next boot.