Operating System - HP-UX
1830899 Members
2514 Online
110017 Solutions
New Discussion

how can i use command line to config kernel parameter

 
SOLVED
Go to solution
常有慈悲心
Regular Advisor

how can i use command line to config kernel parameter

not use sam.
5 REPLIES 5
Nguyen Anh Tien
Honored Contributor
Solution

Re: how can i use command line to config kernel parameter



1. Backup current kernel
#cd /stand
#cp system system.bak
#cp vmunix vmunix.bak
2. setting new values:
#/usr/lbin/sysadm/system_prep -s /stand/system
#kmtune -s kernel_parameter=newvalues
for Example
#kmtune -s nproc=2234
3.make new kernel
#mk_kernel -o /stand/vmunix
#kmupdate
4. reboot
#cd /
#shutdown -ry 0
HP is simple
Hoang Chi Cong_1
Honored Contributor

Re: how can i use command line to config kernel parameter

Hi China Demo

Strongly recommend: Have to backup the current kernel parameter configuration:
Make a backup of /stand/system, /stand/vmunix and /stand/dlkm in the /stand directory.

Then you can do it follow these steps:

1. login as root user
2. cd /stand/build
3. excute the command :/usr/lbin/sysadm/system_prep -s system_kernel
# vi system_kernel (and add make your changes as you want)
4. save that file

5. Build a bootable HP-UX kernel with command: /usr/sbin/mk_kernel -s system_kernel
6. Update default kernel file and files associated with the kernel or update specified kernel modules with this command: /usr/sbin/kmupdate
7. cd /
8. Reboot the server: shutdown -r -y 0

For more information, you can also refer to the System and network Administrator I document and see on the man page of all command.

Hope this helps
Regard,
Chi Cong
Looking for a special chance.......
Timothy Chen_1
Advisor

Re: how can i use command line to config kernel parameter

Hi, China Demo

In or after HP-UX 11.11, you can run the kmtune command to configure dynamic kernel parameters online:
# /usr/sbin/kmtune -u -s {name{=|+}value}

For example:
# /usr/sbin/kmtune -u -s shmseg=256
or
# /usr/sbin/kmtune -u -s shmseg+50

Then you run this command to query the result:
# /usr/sbin/kmtune -q shmseg

Or refer to the manpage for the details.
Nguyen Anh Tien
Honored Contributor

Re: how can i use command line to config kernel parameter

Hi China Demo
Why did not you closed this thread when you assign 10 point for us??
HP is simple
Phillip Renner
Advisor

Re: how can i use command line to config kernel parameter

Just a tip for you all, even when I do manual kernel rebuilds I first change the parameter using sam but I cancel out of sam before I implement the kernel change. Sam will tell you if you're trying to enter a bad kernel parameter. You can unknowningly force bad parameters into the kernel using manual rebuilds.