Search This Blog

Thursday, February 6, 2014

How to change kernel parameters using CLI in HP-UX 11.0 and 11i

How to change kernel parameters using CLI in HP-UX 11.0 and 11i

The kernel rebuilding process is accomplished through the following steps:
1. Change directory to /stand/build
# cd /stand/build

2. Create a kernel parameter system file from the running system
# /usr/lbin/sysadm/system_prep -s system

A file called system will be created under /stand/build, and that will be the temporary system configuration file.

3. Make changes to the current system configuration using the kmsystem, kmtune or kmadmin commands.
#/stand/build # kmtune -S /stand/build/system -q semume
Parameter             Current Dyn Planned                    Module     Version
===============================================================================
semume                     10  -  10    

For example we will be changing the maxusers paremeter from a value of 10 to 256

#/stand/build # kmtune -S /stand/build/system -s semume=256
To verify that this new value has been included in the system file, by checking the difference from the original set:

#/stand/build # kmtune -S /stand/build/system -d
Parameter             Current Dyn Planned                    Module     Version
===============================================================================
semume                     10  -  256 

4. While you are in the /stand/build directory, build a new kernel using mk_kernel command:
#/stand/build # /usr/sbin/mk_kernel -s ./system
Generating module: krm...
Generating module: rng...
Compiling conf.c...
Generating module: emcp...
Generating module: emcpmpx...
Generating module: emcpcg...
Generating module: emcpsapi...
Generating module: emcpgpx...
Generating module: emcpgpx_dm...
Loading the kernel...
Generating kernel symbol table...
#/stand/build # 

5. Backup the old kernel and system files, just in case something goes wrong:
# cp /stand/system  /stand/system.old
# cp /stand/vmunix /stand/vmunix.old
# cd /stand
# cp -R dlkm dlkm.vmunix.old
6. Schedule installation of the new kernel using the kmupdate command. Copy the /stand/build/system file to the /stand/system file.
# kmupdate

 Kernel update request is scheduled.

 Default kernel /stand/vmunix will be updated by  newly built kernel /stand/build/vmunix_test  at next system shutdown or startup time.

# cp /stand/build/system /stand/system 

7. Reboot the system
# cd /
# shutdown -ry 0 
After the reboot make sure to check that the parameter has been changed successully with either kmtune or kmsystem commands.

After Reboot:
#/var/adm/crash # kmtune -q semume
Parameter             Current Dyn Planned                    Module     Version
===============================================================================
semume                    256  -  256

No comments:

Post a Comment