Chapter 07 Kernel Configuration HP-UX Handbook Revision 13.
Chapter 07 Kernel Configuration October 29, 2013 TERMS OF USE AND LEGAL RESTRICTIONS FOR THE HP-UX RECOVERY HANDBOOK ATTENTION: PLEASE READ THESE TERMS CAREFULLY BEFORE USING THE HP-UX HANDBOOK. USING THESE MATERIALS INDICATES THAT YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THESE TERMS, DO NOT USE THE HP-UX HANDBOOK. THE HP-UX HANDBOOK HAS BEEN COMPILED FROM THE NOTES OF HP ENGINEERS AND CONTAINS HP CONFIDENTIAL INFORMATION.
Chapter 07 Kernel Configuration October 29, 2013 TABLE OF CONTENTS Introduction ______________________________________________________________________ 4 Kernel Configuration at HP-UX 11.11 __________________________________________________ 4 The System file /stand/system ______________________________________________________________ 5 Kernel Configuration changes at HPUX 11.11 ____________________________________________ 7 1. Procedure to generate a kernel at HPUX 11.
Chapter 07 Kernel Configuration October 29, 2013 Introduction The architecture of the HP-UX kernel has been undergoing changes over several releases. The kernel is becoming more modular and more capable of being tuned while running. For HP-UX 11.11, the KM-commands should be used instead of editing the system file manually like the previous HPUX version (i.e. 10.X, 11.0). The dynamic tunables were introduced that could be modified without rebooting the system. For HP-UX 11.23 and 11.
Chapter 07 Kernel Configuration October 29, 2013 NOTE: The bundled C compiler /usr/ccs/bin/cc is used for kernel compilation not the ANSI C compiler. The System file /stand/system The system file is the user-provided description of an HP-UX system. It comprises of three parts: Device driver Swap & dump devices Tunable system parameters Details regarding the syntax can be found in the config(1M) manual page.
Chapter 07 Kernel Configuration October 29, 2013 I/O Statements for Devices An I/O statement is used to link a device driver in the kernel with a dedicated HW address. This is necessary for devices that do not use a standard driver (like spt) An I/O statement has the following syntax: driver hw_path driver_name Example: driver 10/4/8.1.1 spt Tunable Parameters This part of the system file holds the settings of the kernel tunables.
Chapter 07 Kernel Configuration October 29, 2013 * Tunable parameters nstrpty msgmax msgmni msgseg msgssz msgtql 60 32768 50 7168 8 256 Kernel Configuration changes at HPUX 11.11 With the introduction of DLKM (Dynamically Loadable Kernel Modules) as of HP-UX 11.11, the kernel now is made of a static part and a number of dynamically loadable modules. The kernel does not only consist of a single file ( /stand/vmunix), but of multiple files and directories (e.g.
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.
Chapter 07 Kernel Configuration October 29, 2013 # shutdown –r 0 NOTE: Do not use the reboot command. Otherwise the movement of the kernel files will be skipped and the system boots from the original kernel again. If you really need to reboot instead of shutdown, then execute the rc script manually before rebooting: # /sbin/init.d/kmbuild stop Overview about standard kernel files: /stand/vmunix /stand/vmunix.prev /stand/system /stand/system.prev /stand/dlkm/ /stand/dlkm.vmunix.prev/ /stand/build/dlkm.
Chapter 07 Kernel Configuration October 29, 2013 The product is not on the application CD (DART) but on the Support Plus CD together with the standard patch bundles. It is bundled with the Diagnostics bundle (OnlineDiag). See http://software.hp.com/. For HPUX 11.31, it’s a MegaBundle which contains many sub-products such as OnlineDiag, SFM, WBEM, and so on. It contains the following files: /dev/krm /etc/opt/resmon/lib/krm/mod.
Chapter 07 Kernel Configuration October 29, 2013 kmadmin activates the module, i.e. it loads it into the running kernel. # kmadmin -L krm kmadmin: Module krm loaded, ID = 1 kmadmin is also useful to check whether the module has been loaded successfully: # kmadmin -Q krm Module Name Module ID Module Path Status Size Base Address BSS Size BSS Base Address Hold Count Dependent Count Unload Delay Description Type Block Major Character Major Flags krm 1 /stand/dlkm/mod.
Chapter 07 Kernel Configuration October 29, 2013 # cat /stand/system.d/krm * @(#)$Revision: 1.1 $ $Date: 2000-04-18 11:18:16-06 $ * Kernel Resource Monitor system file * (C) Copyright 1999 Hewlett-Packard Company $VERSION 1 $CONFIGURE Y The update option (-u) is neccessary whenever the subsystem code (mod.o) has changed. Refer to kminstall(1M) man page for details kmsystem(1M) Displays/modifies the LOADABLE and CONFIGURATION flags for kernel modules.
Chapter 07 Kernel Configuration October 29, 2013 kmtune(1M) Displays/modifies/resets system tunables. kmtune simply modifies the system file.
Chapter 07 Kernel Configuration -S (status) kmadmin –Q for all modules. -s (status) Short form of kmadmin –S. -k Prints a list of all statically configured modules. -d (directory) Specifies the search path to the modules. Default is October 29, 2013 /stand/dlkm/mod.d/ -D (directory) Sets the search patch to the modules back to default: /stand/dlkm/mod.d/. kmupdate(1M) Update default kernel file and files associated with the kernel, or update specified kernel module(s).
Chapter 07 Kernel Configuration October 29, 2013 With kcweb alarms can be set for certain parameters. It is possible to be alarmed if e.g. nproc usage is greater than 80%. kcweb alarms use EMS notifications. All alarms are managed by kcalarm(1M). Range checking Another change compared to UX 11.00/11.11 is that the range checking of tunables is now performed directly in the kernel. kctune reports out of range errors, kcweb shows stderr output of kctune.
Chapter 07 Kernel Configuration October 29, 2013 To stop the web server do: # kcweb -s stop HP-UX Handbook – Rev 13.
Chapter 07 Kernel Configuration October 29, 2013 Kernel Configuration changes at UX 11.23 (11iv2) and 11.31 (11iv3) General changes HPUX 11.23 and 11.31 introduce some new features. The primary design goals were: No longer compile the kernel and reboot No longer copy kernel executables Instead you manage Kernel Configurations The main feature is the kernel configuration (KC) itself.
Chapter 07 Kernel Configuration October 29, 2013 name, etc. You do not recompile the kernel anymore but modify a KC. New commands There are three new primary commands to manage kernel configurations, kconfig(1M), kctune(1M) and kcmodule(1M). kconfig(1M) is used to manage whole kernel configurations. It allows configurations to be saved, loaded, copied, renamed, deleted, exported, imported, etc. It can also list existing saved configurations and give details about them.
Chapter 07 Kernel Configuration October 29, 2013 or other bodies of kernel code. Each module can be unused, statically bound into the main kernel executable, or dynamically loaded. kcmodule will display or change the state of any module in the currently running configuration or any saved configuration. # kcmodule -v cdfs Module Description State State at Next Boot Capable Depends On # kcmodule -v c8xx Module Description State State at Next Boot Capable Depends On cdfs (0.1.
Chapter 07 kmpath config kmadmin kminstall kmmodreg kmsystem kmupdate Kernel Configuration October 29, 2013 invokes kcpath obsolete obsolete obsolete obsolete obsolete obsolete Overview of changes HPUX 11.11 and before HPUX 11.23 & 11.
Modules Chapter 07 Kernel Configuration Create a user defined tunable not possible Load a module Unload a module Query a module Print status of all modules Print detailed status of all modules Print all static modules Add, delete or update module (Un-)register module with the running kernel List all modules Set module to configured and loadable. Set module to configured and not loadable. Set module to unconfigured.
Chapter 07 Kernel Configuration October 29, 2013 2) Now change the tunable values by editing this file: # vi system_config * * Created on Thu Jul 31 11:08:37 2003 * version 1 configuration nextboot "" [3f27e819] * * Module entries * module drmfglrx auto 0.1.0 module drmfgl auto 0.1.0 module gvid_him_rad auto 0.1.0 ... ...
Chapter 07 Kernel Configuration October 29, 2013 of dynamic tunables will also be held at next boot: # kconfig -i system_config * The automatic 'backup' configuration has been updated. NOTE: The configuration being loaded contains changes that cannot be applied immediately: -- The tunable vx_ninode cannot be changed in a dynamic fashion. NOTE: The changes will be held for next boot. * system_config has been imported. The changes will take effect at next boot.
Chapter 07 Kernel Configuration October 29, 2013 Kernel Tunables Tunable Types There are a few different types of kernel tunables: Type Static Description Traditional tunable parameters Dynamic Automatic Can be changed without rebooting the system If an automatic tunable is set to default then the system determines an appropriate value at boot time.
Chapter 07 Kernel Configuration desfree_pct 0 diskaudit_flush_interval 5 dlpi_max_clones 3992 dlpi_max_ub_promisc 1 dma32_pool_size 268435456 dmp_rootdev_is_vol 0 dmp_swapdev_is_vol 0 dnlc_hash_locks 512 dontdump 0 dst 1 dump_compress_on 1 dump_concurrent_on 1 executable_stack 0 expanded_node_host_names 0 fcache_fb_policy 0 fcache_seqlimit_file 100 fcache_seqlimit_scope 0 fcache_seqlimit_system 100 fcache_vhand_ctl 0 fcd_disable_mgmt_lun 0 fclp_ifc_disable_mgmt_lun 0 fcoc_ifc_disable_mgmt_lun 0 filecache_
Chapter 07 maxtsiz maxtsiz_64bit maxuprc mca_recovery_on mpas_readonly_text mprotect_reduce_protid_on msgmbs msgmnb msgmni msgtql ncdnode nclist ncsize nflocks nfs2_max_threads nfs2_nra nfs3_bsize nfs3_do_readdirplus nfs3_jukebox_delay nfs3_max_threads nfs3_max_transfer_size nfs3_max_transfer_size_cots nfs3_nra nfs4_bsize nfs4_max_threads nfs4_max_transfer_size nfs4_max_transfer_size_cots nfs4_nra nfs_portmon ngroups_max ninode nkthread nproc npty nstrpty nstrtel nswapdev nswapfs numa_mode numa_policy numa_
Chapter 07 Kernel Configuration semmni 2048 semmns 10000 semmnu 256 semmsl 2048 semume 100 semvmx 32767 shlib_debug_enable 0 shmmax 1073741824 shmmni 400 shmseg 300 streampipes 0 swchunk 2048 sysv_hash_locks 128 tcphashsz 0 timeslice 10 timezone 420 uname_eoverflow 1 vnode_cd_hash_locks 128 vnode_hash_locks 128 vol_checkpt_default 10240 vol_dcm_replay_size 262144 vol_default_iodelay 50 vol_failfast_on_write 0 vol_fmr_logsz 4 vol_kmsg_gab_max_send 512 vol_kmsg_max_receive_q_cnt 6144 vol_kmsg_receive_q_high
Chapter 07 voliomem_chunk_size voliomem_maxpool_sz voliot_errbuf_dflt voliot_iobuf_default voliot_iobuf_limit voliot_iobuf_max voliot_max_open volpagemod_max_memsz volraid_rsrtransmax vps_ceiling vps_chatr_ceiling vps_pagesize vx_dexh_sz vx_era_nthreads vx_maxlink vx_ninode vxfs_bc_bufhwm vxfs_ifree_timelag vxtask_max_monitors Kernel Configuration 65536 134217728 16384 8192 131072 65536 32 65536 1 16 1048576 16 524287 5 32767 0 0 0 32 Default Default Default Default Default Default Default Default Default
Chapter 07 Kernel Configuration October 29, 2013 Allowed values 100 - 60000 Overview of HP SMH for Kernel Configuration You can configure and manage the kernel without remembering the syntax of the kernel configuration commands or the exact names of modules and tunables by using HP SMH, the web- and text-based HP-UX kernel configuration tool to configure and manage the kernel of your system. HP SMH has the following features: • Web-based and text-based interfaces.
Chapter 07 Kernel Configuration October 29, 2013 For example: # kcmodule -P ALL autofs cachefs name autofs desc Automounter File System version 1.0 timestamp Tue Sep 12 21:53:28 2006 [45078EC8] state static cause best next_state static next_cause best capable static unused depend module nfswrp:0.0.0 depend interface HPUX_11_31_PERF:1.0 Each kernel module in the currently running configuration has a state, which describes how the module is being used.
Chapter 07 Kernel Configuration October 29, 2013 When kcmodule is giving information about a saved configuration, the same states are used. Next to each module state is a Cause that tells why the module is (or will be) in that state. The causes are: explicit The system administrator explicitly chose the state. best The system administrator chose to use the module, but didn’t choose a specific state, so the module is in its best state as determined by the module developer.
Chapter 07 Kernel Configuration October 29, 2013 canauto n default y auto_default n next_default y signed n flags 0x6c3 constraint nproc >= 100 constraint nproc <= 131072 174 Configuring the Kernel constraint nproc >= semmnu + 4 constraint nproc >= maxuprc + 5 constraint nproc <= nkthread – 100 Use a comma-separated list with the -P option to display the categories you want.
Chapter 07 Kernel Configuration October 29, 2013 system is running, in response to changing system resources and needs. When a tunable is set to default, its expression is reported as Default, as seen in the examples above. In these cases, the system is free to choose the value it thinks optimal, and to change it as needed. HP recommends that tunables be left set to default unless the default is known to be unsatisfactory.