LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Changing Kernel Parameters (https://www.linuxquestions.org/questions/linux-newbie-8/changing-kernel-parameters-29478/)

aslamg 09-03-2002 06:17 AM

Changing Kernel Parameters
 
Hi

Does anyone out there know how to change kernel parameters and then recompile the kernel ?

I need to do this before I can install Oracle8i.

I am using RH 7.3

Thanks

Aslam

hanzerik 09-03-2002 07:31 AM

A little more specific on your question please. Didnt give us much to go on.

neo77777 09-03-2002 07:47 AM

cd /usr/src/linux
make menuconfig ----------> re-configure your kernel and recompile it http://tldp.org/HOWTO/Kernel-HOWTO.html

aslamg 09-03-2002 07:56 AM

Changing Kernel Parameters
 
Hi

I am trying to change the following parameters :
SHMMAX to 128
SHMMIN to 1
SHMMIN to 100
SHMSEG to 10
SEMMNI to 100
SEMMSL to 128
SEMMNS to 128
SEMOPM to 100
SEMVMX 32767

I dont know how to do this in RedHat 7.3 Linux.

In SCO UNIX however I use

/etc/conf/bin/idtune SHMMAX 128
to change the value of the kernel parameter.

I assume that I would have to do something similar ?

Aslam

aslamg 09-03-2002 08:08 AM

Change kernel Parameters
 
HI

I have had a look at /usr/src/linux but I cannot find where I need to set these values ?

Any help ?

Aslam

neo77777 09-03-2002 08:34 AM

I thought about different params, sorry. look under
/proc/sys/kernel
there are entries for shm and sem. You can use echo "param">/proc/sys/kernel/file
Let me look how to get it set permanently on boot up, instead of echoing the parameters into /proc

dwd 09-03-2002 08:53 AM

On RedHat, there's a handy file called /etc/sysctl.conf into which you can put the options in sysctl format.

Essentially, sysctl format is the same as the /proc/sys/ layout, but with the '/' changed to a '.'.

So for the max SvsV shm segment size, you can either play with the file:

/proc/sys/kernel/shmmax

Or the sysctl variable:

kernel.shmmax

However, exactly what this actually is is beyond my knowledge by quite a way. Some of these cannot be altered, some can be but will have no effect. Some will actually work, and changing others may force a kernel panic.

They're documented, at least usually, in the /usr/src/linux-*/Documentation/sysctl/ directory of your kernel source tree, or in the /usr/share/doc/kernel-*/sysctl/ if you have installed the kernel-doc package.

neo77777 09-03-2002 08:56 AM

I was going to suggest the same, thanks dwd

aslamg 09-03-2002 09:36 AM

Changing kernel Parmaters
 
I have had a look at the doc's, but I am not sure whether I will need to create other entries such as

kernel.semmni and other's just to see what would happen.

As this is a test box I can always reinstall.

What do you think ?

neo77777 09-03-2002 10:37 AM

Why not, as long as it is not a critical situation there is always room for experimentation

neo77777 09-03-2002 05:16 PM

Forgot to mention, there is no need to double post, if want to correct something in your original post use edit button at the right buttom corner of the post frame.

aslamg 09-04-2002 02:36 AM

Thanks all for your help, I will try and add to this thread what my findings are.

huykhoi 01-19-2006 08:44 PM

Have I got to reboot my computer to finish the changes after configuring kernel parameters?

dwd 01-20-2006 02:57 AM

If you only change the sysctl settings in the file /etc/sysctl.conf, then yes, those are only acted upon on boot. (This file exists on RedHat derivatives, and Debian derivatives - I think it's pretty much universal).

If you only change them in the /proc/sys filesystem, then no, those are acted upon immediately, and the new values are lost when you reboot.

So really, you need to do both.

Incidentally, "cat /proc/sys/....." will give you the current value that's actually being used - I don't think we ever made this clear - stuff in /proc/ isn't on your hard disk, it's a kind of view into the kernel of its current structures and Stuff. Changing the values here (usually with "echo 1 >/proc/sys/..." or similar) actually changes the live setting in the kernel, and not any file at all. Reading the file is actually reading the setting directly from the kernel.

For obvious reasons, you can't create a new setting by creating a new file. Although that'd be a very impressive patch. :-)


All times are GMT -5. The time now is 09:18 AM.