1827303 Members
3530 Online
109961 Solutions
New Discussion

Re: kernel parameter

 
SOLVED
Go to solution
Fadia Almarei
Super Advisor

kernel parameter

Dear All
in my Redhat9 linux system I have change some kernel parameters using the command line like the shmmax,

echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax

and when i reboot the system the parameter return it's old value,so what should i do to keep the new value even after reboot

BR,
Fadia
fadia.marei
6 REPLIES 6
Sergejs Svitnevs
Honored Contributor
Solution

Re: kernel parameter

You have to add the following line to the /etc/sysctl.conf file which is used during the boot process:

kernel.shmmax=1073741824

Adding this line to the /etc/sysctl.conf file will cause the system to change these kernel parameters after each boot using the /etc/rc.d/rc.sysinit script which is invoked by /etc/inittab.

Regards,
Sergejs
Alexander Chuzhoy
Honored Contributor

Re: kernel parameter

edit the file /etc/sysctl.conf


append a line to it:
kernel.shmmax = 1073741824
then save and reboot-you should have this setting after reboot.
Regards.
Durgaprasad Ala
Advisor

Re: kernel parameter

After changing parameters in /etc/sysctl.conf,just using the command
sysctl -p will update all parameters to kernel.
NiCK_76
Respected Contributor

Re: kernel parameter

Hi Almarei,

Append "echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax" to /etc/rc.local.

NiCK
just for fun
dirk dierickx
Honored Contributor

Re: kernel parameter

i wouldn't go for nick's approach, the others have it right, use the sysctl config file.
in fact i never write directly to /proc anymore, but use sysctl instead which is agruably(?) safer.
Wim Van den Wyngaert
Honored Contributor

Re: kernel parameter