HP-UX HB v13.00 Ch-07 - Kernel Configuration
HP-UX Handbook – Rev 13.00 Page 8 (of 33)
Chapter 07 Kernel Configuration
October 29, 2013
2) Backup the current system file:
# cp /stand/system /stand/system.prev
3) Is the system file up to date?
If you are not sure that the current system file (/stand/system) corresponds to the
current kernel (/stand/vmunix), then use the system_prep script to extract a system
file from the current kernel:
# /usr/lbin/sysadm/system_prep [-s /stand/system]
Compare the new system file to the original one. The diff command should not
produce any results:
# diff /stand/system /stand/system.prev
4) Modify the system file
Use kmtune(1M) to modify kernel tunables. Use kmsystem(1M) to add/remove driver.
These commands do nothing more than modifying /stand/system. Due to various
dependencies, the system file should not be edited by hand, for example:
# kmtune –s dbc_max_pct=35 (changes tunable in system files)
# kmsystem –c y diag2 (adds driver diag2 to system file)
# kmsystem –c n diag2 (removes driver diag2 from system file)
The “km” commands are explained below in greater detail.
5) Generate the kernel
After you modified the system file, you can generate the new kernel using the mk_kernel
script. The name of the new kernel will be /stand/build/vmunix_test, unless explicitly
specified through the -o option. The -s option specifies the system file to use,
/stand/system is the default:
# mk_kernel
6) Schedule kernel update
kmupdate is used to initiate the move of the new kernel (/stand/build/vmunix_test)
and the corresponding files to their appropriate places at the next shutdown or startup. The
current kernel will be copied to /stand/vmunix.prev, then.
# kmupdate
7) Restart the system
The new kernel will be activated by restarting the system:
# cd /