LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux red hat 7.1 kernel variables (https://www.linuxquestions.org/questions/linux-newbie-8/linux-red-hat-7-1-kernel-variables-218276/)

VeroL 08-16-2004 09:58 AM

linux red hat 7.1 kernel variables
 
Hello,


I have a linux 7.1 kernel 2.4.2-2 machine and i must change the values of certain kernel variables. I have modified the values of some variables that are in the following files:
/usr/src/linux/include/asm/shmparam.h
/usr/src/linux/include/linux/sem.h
/usr/src/linux/include/linux/msg.h

but i don't know what to do in order to have these changes taken into account by the system? Is it absolutely necessary to recompile the kernel (I'd rather not to...)?

Any help would be welcome.

Oliv' 08-16-2004 10:29 AM

Hello,

If you make change in these header files, you need to recompile your kernel... A way not to recompile it is to check wether you can make these changes thanks to /proc directory...

Oliv'

VeroL 08-16-2004 10:33 AM

What do you mean by "make these changes thanks to /proc directory?" I don't understand, sorry. Are there any special files that i must modify in the /proc directory?

amosf 08-16-2004 10:36 AM

Compiling the kernel is not a big deal. Changing variables, however, might lead to unexpected results. You would have to compile the kernel to make any changes have any effect.

That kernel is also fairly old. You should d/l a more recent kernel, like 2.4.27

Oliv' 08-16-2004 10:48 AM

Well, /proc directory contains some file that can dynamically modify kernel behaviour (and other files that show system info). For example:
Code:

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
will disable ICMP_ECHO_REPLY, so you'll not respond to ping anymore...
So have a look in /proc/sys/kernel/ ... You may find interesting file. The only problem is to know/find what to put in which file.

Oliv'

VeroL 08-17-2004 03:54 AM

Thank you, it seems more clear now but I still have questions.

The variables I am looking for are:
msgmap,
msgmax,
msgmnb,
msgseg,
msgssz,
msgtql,
semmap,
semmni,
semmns,
semmsl,
shmmni,
shmmax.

I found files (that contain values) for msgmax, msgmnb, msgmni, shmmni, shmmax in the /proc/sys/kernel directory but I can't find any file for the other variables. Does that mean that the kernel uses default values for them? If yes, is there a way to know these values and if necessary to modify them?

Oliv' 08-17-2004 08:07 AM

Quote:

Does that mean that the kernel uses default values for them?

I think yes... but be careful, for example /proc/sys/kernel/sem file contains 4 values. For other values, if you really need to change them, I think that you have to modify kernel source code and so recompile kernel. But don't worry, kernel recompilation is quite simple ;)

Oliv'


All times are GMT -5. The time now is 11:13 PM.