16.2 HP-UX

SAM is still the easiest way to build a new kernel under HP-UX. However, you can build one manually if you prefer:[4]

[4] This command is also useful for simply listing the modified variables in the current kernel.

# cd /stand                                      Move to kernel directory. # mv vmunix vmunix.save                          Save current kernel. # cd build                                       Move to build subdirectory. # /usr/lbin/sysadm/system_prep -v -s system      Extract system file. # kmtune -s var =value  -S /stand/build/system     Modify kernel parameters.   ... # mk_kernel -s ./system -o ./vmunix_new          Build new kernel. # kmupdate /stand/build/vmunix_new               Schedule  kernel install. # mv /stand/system /stand/system.prev            Save old system file. # mv /stand/build/system /stand/system           Install new system file.

The system_prep script creates a new system configuration file by extracting the information from the running kernel. The kmtune command(s) specify the values of kernel variables for the new kernel.

The mk_kernel script calls the config command and initiates the make process automatically. Once the kernel is built, you use the kmupdate command to schedule its installation at the next reboot. You can then reboot to activate it.

If there is a problem with the new kernel, you can boot the saved kernel with a command like the following:

ISL> hpux /stand/vmunix.save

To determine what kernel object files are available, use the following command to list the contents of the /stand directory:

ISL> hpux ll /stand

The system file contains information about system devices and settings for various kernel parameters. Here are some examples of the latter:

maxfiles_lim   1024     Maximum open files per process. maxusers        250     Number of users/processes to assume when sizing kernel                          data structures. nproc           512

You can also use SAM to configure these parameters and then rebuild the kernel. Figure 16-1 illustrates using SAM to modify a kernel parameter (in this case, the length of the time slice: the maximum period for which a process can execute before being interrupted by the scheduler).

Figure 16-1. Configuring an HP-UX kernel via SAM

The SAM interface also provides descriptions of the available parameters (illustrated in Figure 16-2).

Figure 16-2. SAM Help for kernel parameters

You can build the new kernel by selecting the Actions figs/u2192.gif Process New Kernel menu option.

HP also provides various sets of kernel parameters for specific system uses. You can access them via the Actions figs/u2192.gif Apply Tuned Parameter Set menu option. Selecting it results in a list of available sets. For example, the CAE/ME/General Eng. Workstation 64-Bit Kernel is a good choice for any systems whose workload will be dominated by high-performance, compute-intensive 64-bit applications. Once you have selected a set, you can modify the parameters further or simply build a new kernel.

A few kernel parameters can be modified dynamically, most easily via SAM. You can also use the sysdef command to view the system parameters:

# sysdef NAME           VALUE    BOOT      MIN-MAX        UNITS   FLAGS acctresume         4       -      -100-100                 - acctsuspend        2       -      -100-100                 - maxdsiz       503808       -       0-655360      Pages     - maxfiles        1024       -       30-2048                 - maxuprc           75       -       3-                      - nbuf          262598       -       0-                      - timeslice         10       -      -1-2147483648  Ticks     -

(This output includes only selected parameters.) The output columns display the parameter name, current value, the value when the system was booted (only if the value has been altered since then), the valid range of values, the units in which the value was measured, and a flag indicating whether the parameter can be modified on a running system (M means it is modifiable).

Essential System Administration
Essential System Administration, Third Edition
ISBN: 0596003439
EAN: 2147483647
Year: 2002
Pages: 162

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net