Operating System - HP-UX
1830870 Members
1851 Online
110017 Solutions
New Discussion

rebuild kernel increase semmns

 
Kurt Beyers.
Honored Contributor

rebuild kernel increase semmns

Hi,

My OS is HP-UX11.00 and after an install of Oracle9i, I had to increase the maximum numbers of semaphores semmns from 400 to 1000. After the modification of the parameter via SAM, the kernels was rebuild and the system rebooted.

However if I look in SAM, the value of semmns still is 400. The value in /stand/system is 1000. Further on, the time stamp of /stand/vmunix is too old (older than the modification of the kernel). The time stamp of /stand/build/vmunix_test corresponds with the modification of semmns.

So it seems that /stand/build/vmunix_test wasn't copied towards /stand/vmunix.

Does anybody knows why the increase of the kernel parameter failed? Do I have to increase semmns again via sam again? I don't find anything strange in syslog.log or OLDsyslog.log.

Thanks,

Kurt
15 REPLIES 15
John Carr_2
Honored Contributor

Re: rebuild kernel increase semmns

Hi

if the date on the new vmunix_test is todays the kernel build was probably ok try backing up the original and copying the test version over and rebooting.

you can also look through the sam log to see what happened during the build.

just remembered sam asks you if you want to copy the new build into place are you sure you said yes ?


cheers

John.
ashish nanjiani
Frequent Advisor

Re: rebuild kernel increase semmns

Make sure that you to sam to move your kernel to the new place. Also say no to automatic rebooting, that way you can check if the new kernel has been moved under /stand

ashish
Kurt Beyers.
Honored Contributor

Re: rebuild kernel increase semmns

I didn't make the first modification via SAM, so I'm not sure wether it was indicated that the new kernel could be moved to the new place.

I'll try it again, but it can't be done for the moment (production server).

Thanks,
Kurt
John Carr_2
Honored Contributor

Re: rebuild kernel increase semmns

Hi again

I think you might be wise to do it manually here are the steps if you wish to do so.

cd /stand/build
usr/lbin/sysadm/system-prep -s system
edit system file and make desired changes
mk_kernel -s system
mv /stand/system /stand/system.prev
mv /stand/vmunix /stand/vmunix.prev

mv /stand/build/vmunix_test /stand/vmunix

cd /

etc/shutdown -ry now


cheers
John.
Pete Randall
Outstanding Contributor

Re: rebuild kernel increase semmns

I think you would be best off to do it consistently - either always use SAM or always do it manually.

$.02

Pete

Pete
Kurt Beyers.
Honored Contributor

Re: rebuild kernel increase semmns

John,

I've first rebuild the kernel with SAM and I'm sure that 'Move kernel into place' was specified. After a reboot, the old kernel values were still active.

So I've rebuild the kernel manually following your procedure:

cd /stand/build
usr/lbin/sysadm/system-prep -s system
edit system file and make desired changes
mk_kernel -s system
mv /stand/system /stand/system.prev
mv /stand/vmunix /stand/vmunix.prev

mv /stand/build/vmunix_test /stand/vmunix

cd /
shutdown -r -y 0

The system boots from the new kernel, but when I go now into SAM and choose kernel configuration-Configurable parameters, I get now:

Internal Error: cannot find driver/module """" in the internal configuration data structure

What means this? How can I verify the kernel parameters form command line?

Kurt
U.SivaKumar_2
Honored Contributor

Re: rebuild kernel increase semmns

hi,
use kmtune
#kmtune | grep semmns
also you can use sysdef
#sysdef | grep semmns
I refer kmupdate command may solve your problem. #man kmupdate

regards,
U.SivaKumar

Innovations are made when conventions are broken
Kurt Beyers.
Honored Contributor

Re: rebuild kernel increase semmns

I've queried the kernel parameters with:

/usr/lbin/sysadm/get_sysfile /stand/vmunix

and the parameters were updated as I've changed them into /stand/build.system

Kurt
U.SivaKumar_2
Honored Contributor

Re: rebuild kernel increase semmns

hi,
this is the recommended procedure for kernel
rebuilding.
# cd /stand/build # /usr/lbin/sysadm/system_prep -v -k -s system
# /usr/sbin/mk_kernel -v -s system
# mv /stand/build/system /stand/system
# cd /

For 10.X,
#mv /stand/build/vmunix /stand/vmunix

For 11.X,
#kmupdate /stand/build/vmunix_test
# shutdown -r -y 0

regards,
U.SivaKumar


Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: rebuild kernel increase semmns

hi,

with reference to HP :
With the new Dynamically Loadable Kernel Modules (DLKM) in HP-UX 11.x, both static and dynamic modules are possible. Static modules are handled in the old manner.
that is, linked into the static kernel file still typically named /stand/vmunix). Dynamic modules are separate object files that are not linked into the kernel and thus can be included or excluded without re-linking (re-building the kernel, thus no reboot is required (actually, under DLKM you have to shutdown and reboot, not use the reboot command, but that is different issue).

Under the old static kernel, after a kernel build you would just move the vmunix_test file from /stand/build to /stand as vmunix. At this point, it's worth noting, that in HP-UX 11, there are possibly many files that need to be moved after a kernel build. These include: symtab, the symbol table file, vmunix the kernel and possibly several loadable module files, as well as some static files.

Because of this, there is a new command to move all required files from a newly built kernel to the proper locations (/stand and /stand/dlkm). This command is named kmupdate and requires a shutdown afterwards to complete the file moves, and renames.
The /stand/dlkm directory contains the kernel function set files such as dynamic modules, module registry file and a symbol file. During a kernel rebuild, the new set will be created under /stand/dlkm.vmunix_test. So simply moving
the kernel to /stand directory will not help.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Kurt Beyers.
Honored Contributor

Re: rebuild kernel increase semmns

Ok,

So I have forgotten to:

1. mv /stand/build/system /stand/system before the system reboot
2. I've used 'mv /stand/build/vmunix_test /stand/vmunix' instead of 'kmupdate /stand/build/vmunix_test'

Do I have to rebuild the kernel again and then perform the 2 steps 1 and 2 before the reboot or can I get it right manually?

Kurt

U.SivaKumar_2
Honored Contributor

Re: rebuild kernel increase semmns

hi,
At this stage , i would recommend to use that
steps , because any manual exercises can cause
kernel data structure corruption.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Kurt Beyers.
Honored Contributor

Re: rebuild kernel increase semmns

It took me some time, but I finally found the root cause. The scripts in /sbin/init.d:

kminit
kmbuild

had a size of zero bytes.


Replacing the scripts with their original contents solved (of course) the problem.

Kurt
Jim Butler
Valued Contributor

Re: rebuild kernel increase semmns

The key is the 11 OS -
And U.SivaKumar got it right -
you must do a kmupdate -
then reboot after the mk_kernel.
Man The Bilge Pumps!
Sanjay_6
Honored Contributor

Re: rebuild kernel increase semmns

Hi Kurt,

Did you rebuild the kernel manually. These are the steps in building up a new kernel,

# cd /stand/build
# /usr/lbin/sysadm/system_prep -v -s system
# kmtune -S /stand/build/system -s parm_name=value

or

kmtune -S /stand/build/system -s parm_name+value

# /usr/sbin/mk_kernel -s ./system
# mv /stand/system /stand/system.prev

#new for dynamically linked modules at 11.0

# mv /stand/build/system /stand/system
# kmupdate # kmupdate automates moves the kernel files into the proper directory

# shutdown -ry 0

Hope this helps.

Regds