Operating System - HP-UX
1833184 Members
3224 Online
110051 Solutions
New Discussion

Kernel Update do not work I expected

 
Hakki Aydin Ucar
Honored Contributor

Kernel Update do not work I expected

Please look at the following, my steps to update static kernel via commandline in HP-UX 11i v1, it did not work and I did on SAM kernel update, it worked. Could you tell me what is wrong with it ? why it did not work ?

# cd /stand/build
# /usr/lbin/sysadm/system_prep -v -s ./system
NOTE: Saving the current system file at "./system" to
"./system.prev"
NOTE: Dynamic tunable values (if applicable) have been added to
"./system".
NOTE: The template file has been extracted from "/stand/vmunix"
It has been placed in "./system" where it will be used
to build a new kernel.
# kmtune -s npty=128
# kmtune -l -q npty

Parameter: npty
Current: 60
Planned: 128
Default: 60
Minimum: -
Module: -
Version: -
Dynamic: No
# mk_kernel -s ./system

Generating module: krm...
Compiling conf.c...
Loading the kernel...
Generating kernel symbol table...
# kmupdate
# reboot
7 REPLIES 7
Matti_Kurkela
Honored Contributor

Re: Kernel Update do not work I expected

# cd /stand/build
# /usr/lbin/sysadm/system_prep -v -s ./system

Apparently there wasn't a /stand/build/system file, because the system_prep command had to extract the template file from /stand/vmunix and place it to /stand/build/system. Any dynamic tunable values were applied to that file too.

# kmtune -s npty=128

Here's the mistake.
Because the option "-S ./system" was not used, this change was made to the real /stand/system, not to /stand/build/system.

# mk_kernel -s ./system
# kmupdate

These commands created a kernel using the settings at /stand/build/system, and replaced the currently-active kernel with it.
Because this replaced your /stand/system, your npty change was lost.

MK
MK
Hakki Aydin Ucar
Honored Contributor

Re: Kernel Update do not work I expected

>Matti: Here's the mistake.
Because the option "-S ./system" was not used, this change was made to the real /stand/system, not to /stand/build/system.

there is no option like -S (Capital S) but -s for system_prep in HP-UX 11i v1 ;

What is the correct syntax ? I did not get exactly the fault ; I was on the correct path, if you look at the first commands ;

# cd /stand/build
# /usr/lbin/sysadm/system_prep -v -s ./system
Johnson Punniyalingam
Honored Contributor

Re: Kernel Update do not work I expected

Procedures for Kernel Parameter changes
====================================
# cd /stand
# cp system system.prev.<050112>
# cp vmunix vmunix.prev.<050112>

# cd /stand/build
# /usr/lbin/sysadm/system_prep -s /stand/build/system
# vi /stand/build/system (....edit the file to make the necessary changes --> e.g. "max_thread_proc 3072")
# /usr/sbin/mk_kernel -s /stand/build/system
# mv system /stand/system
# /usr/sbin/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.
Problems are common to all, but attitude makes the difference
Hakki Aydin Ucar
Honored Contributor

Re: Kernel Update do not work I expected

>Johnson:

Your procedure worked in my test server ; HP-UX 11i v1.

however in my customer server it did not work again , in the first place I noticed that
during startup , it did not work to update new kernel parameters:

->>
Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).

/sbin/auto_parms: DHCP access is disabled (see /etc/auto_parms.log)


HP-UX Start-up in progress
__________________________

Configure system crash dumps ........................................ OK
VxVM device node check .............................................. OK
VxVM general startup ................................................ OK
VxVM reconfiguration recovery ....................................... OK
Mount file systems .................................................. OK
Update kernel and loadable modules .................................. N/A
Initialize loadable modules ......................................... OK
Setting hostname .................................................... OK
Start Kernel Logging facility ....................................... N/A
Set privilege group ................................................. N/A
Display date ........................................................ N/A
Copy processor logs to /var/tombstones .............................. OK
Save system crash dump if needed .................................... N/A
->>


and besides, edited /etc/rc.log and looked for kernel update :

Update kernel and loadable modules
Output from "/sbin/rc1.d/S110kmbuild start":
----------------------------
"/sbin/rc1.d/S110kmbuild start" SKIPPED

Johnson Punniyalingam
Honored Contributor

Re: Kernel Update do not work I expected

from the rc.log check what's error for (kmbulid) was not able to start


/sbin/init.d/kmbuild start

>>customer server<< does all kernal patches are up to date ..? in your Customer Server
Problems are common to all, but attitude makes the difference
Hakki Aydin Ucar
Honored Contributor

Re: Kernel Update do not work I expected

>Johnson : from the rc.log check what's error for (kmbulid) was not able to start

No Error, just : "/sbin/rc1.d/S110kmbuild start" SKIPPED

in fact, I checked rc.log in my test server, and found that same phrase: "/sbin/rc1.d/S110kmbuild start" SKIPPED
BUT it worked ??


>>customer server<< does all kernal patches are up to date ..? in your Customer Server

I am checking now.
chris huys_4
Honored Contributor

Re: Kernel Update do not work I expected

Hi,

Matti>> # kmtune -s npty=128

Matti>> Here's the mistake.
Matti>> Because the option "-S ./system" was
Matti>> not used, this change was made to the
Matti>> real /stand/system, not to
Matti>> /stand/build/system.

Hakki> there is no option like -S (Capital S)
Hakki> but -s for system_prep in HP-UX 11i
Hakki> v1 ;

Matti was referring to the "-S ./system" option, of the kmtune command, that had not been added, to the kmtune command.

Also in "hakki's" procedure, the reboot command is used, to reboot the system, after executing kmupdate, instead of the "shutdown" command, while its while executing the "shutdown" scripts, which are only executed, with the shutdown command, that the kernel files from /stand/build will be "put in place".. i.e. replace the current kernel files..

Better "controlling" example.

gsesrv8 # kmtune
Parameter Current Dyn Planned Module Version
===============================================================================
maxvgs 32 - 32

gsesrv8 # bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vx/dsk/rootdg/standvol
295024 40336 225184 15% /stand


gsesrv8:/stand/build
gsesrv8 # /usr/lbin/sysadm/system_prep -v -s system
NOTE: Dynamic tunable values (if applicable) have been added to
"system".
NOTE: The template file has been extracted from "/stand/vmunix"
It has been placed in "system" where it will be used
to build a new kernel.

gsesrv8 # more /stand/build/system
* Drivers and Subsystems

DlkmDrv
GSCtoPCI
PCItoPCI
arp
asio0
asp
autofsc
bs_osm
btlan
c720
cachefsc
cb
[..]
* Tunable parameters

evp
STRMSGSZ 65535
dbc_max_pct 5
dnlc_hash_locks 512
maxdsiz_64bit 0X40000000
maxssiz 0X800000
maxssiz_64bit 0X800000
maxswapchunks 8192
maxtsiz 0x4000000
maxtsiz_64bit 0x40000000
maxvgs 32
npty 256
nstrpty 60
scsi_max_qdepth 2
shmmax 0x4000000

topaz # man kmtune
[..]
-s name{=|+}value
Set the value to a system parameter. If the separator is an
equal sign (=), the parameter is set to the value specified.
If the separator is a plus sign (+), the parameter is
incremented by the value specified. Negative values cannot
be used with plus sign (+). The name{=|+}value format must
not include spaces or tabs.


gsesrv8 # kmtune -s maxvgs=64

gsesrv8:/stand/build
gsesrv8 # kmtune -d
Parameter Current Dyn Planned Module Version
===============================================================================
maxvgs 32 - 64


gsesrv8:/stand/build
gsesrv8 # more /stand/build/system
[..]
* Tunable parameters

evp
STRMSGSZ 65535
dbc_max_pct 5
dnlc_hash_locks 512
maxdsiz_64bit 0X40000000
maxssiz 0X800000
maxssiz_64bit 0X800000
maxswapchunks 8192
maxtsiz 0x4000000
maxtsiz_64bit 0x40000000
maxvgs 32
npty 256
nstrpty 60
scsi_max_qdepth 2
shmmax 0x4000000

>> CONCLUSION -- not updated...

gsesrv8:/stand/build
gsesrv8 # kmtune -s maxvgs=64 -S system

gsesrv8:/stand/build
gsesrv8 # more /stand/build/system
* Drivers and Subsystems

DlkmDrv
GSCtoPCI
PCItoPCI
arp
asio0
asp
autofsc
bs_osm
btlan
[..]
evp
STRMSGSZ 65535
dbc_max_pct 5
dnlc_hash_locks 512
maxdsiz_64bit 0X40000000
maxssiz 0X800000
maxssiz_64bit 0X800000
maxswapchunks 8192
maxtsiz 0x4000000
maxtsiz_64bit 0x40000000
maxvgs 64
npty 256
nstrpty 60
scsi_max_qdepth 2
shmmax 0x4000000

>> conclusion -- now its updated..

gsesrv8 # /usr/sbin/mk_kernel -s ./system
Generating module: krm...
/usr/bin/mkdir -p /stand/build
Compiling conf.c...
Loading the kernel...
Generating kernel symbol table...

gsesrv8 # 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.

gsesrv8:/stand/build
gsesrv8 # shutdown -ry 0

gsesrv8 # kmtune|grep maxvgs
maxvgs 64 - 64

Greetz,
Chris